CLFS/master.sh, boot method now has its own makefile-. text changes to makefile-functions.
This commit is contained in:
parent
6c7fe49573
commit
39d4d5c5ac
3 changed files with 92 additions and 16 deletions
|
@ -283,10 +283,7 @@ boot_Makefiles() { #
|
||||||
PREV=$this_script
|
PREV=$this_script
|
||||||
|
|
||||||
done
|
done
|
||||||
# This will force the Makefile to exit and not allow it to be restarted with
|
echo -e "\t@\$(call echo_boot_finished,$VERSION)" >> $MKFILE.tmp
|
||||||
# the command <make>, The user will have to issue the cmd <make chapterXX>
|
|
||||||
echo -e "\t@\$(call echo_boot_finished,$VERSION) && \\" >> $MKFILE.tmp
|
|
||||||
echo -e "\tfalse" >> $MKFILE.tmp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -422,6 +419,7 @@ bm_testsuite_tools_Makefiles() { #
|
||||||
|
|
||||||
# First append each name of the script files to a list (this will become
|
# First append each name of the script files to a list (this will become
|
||||||
# the names of the targets in the Makefile
|
# the names of the targets in the Makefile
|
||||||
|
PREV=
|
||||||
testsuitetools="$testsuitetools $this_script"
|
testsuitetools="$testsuitetools $this_script"
|
||||||
|
|
||||||
# Grab the name of the target, strip id number, XXX-script
|
# Grab the name of the target, strip id number, XXX-script
|
||||||
|
@ -532,6 +530,9 @@ bm_final_system_Makefiles() { #
|
||||||
#-----------------------------#
|
#-----------------------------#
|
||||||
echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system${R_arrow}"
|
echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system${R_arrow}"
|
||||||
|
|
||||||
|
# The makesys phase was initiated in bm_testsuite_tools_makefile
|
||||||
|
[[ "$TEST" = 0 ]] && PREV=""
|
||||||
|
|
||||||
for file in final-system/* ; do
|
for file in final-system/* ; do
|
||||||
# Keep the script file name
|
# Keep the script file name
|
||||||
this_script=`basename $file`
|
this_script=`basename $file`
|
||||||
|
@ -540,6 +541,9 @@ bm_final_system_Makefiles() { #
|
||||||
case $this_script in
|
case $this_script in
|
||||||
*stripping*) [[ "$STRIP" = "0" ]] && continue
|
*stripping*) [[ "$STRIP" = "0" ]] && continue
|
||||||
;;
|
;;
|
||||||
|
*psmisc*) # Build fails on creation of this link. <pidof> installed in sysvinit
|
||||||
|
sed -e 's/^ln -s/#ln -s/' -i $file
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# First append each name of the script files to a list (this will become
|
# First append each name of the script files to a list (this will become
|
||||||
|
@ -901,7 +905,7 @@ build_Makefile() { # Construct a Makefile from the book scripts
|
||||||
bm_bootscripts_Makefiles
|
bm_bootscripts_Makefiles
|
||||||
bm_bootable_Makefiles
|
bm_bootable_Makefiles
|
||||||
fi
|
fi
|
||||||
# the_end_Makefiles
|
# the_end_Makefiles
|
||||||
|
|
||||||
|
|
||||||
# Add a header, some variables and include the function file
|
# Add a header, some variables and include the function file
|
||||||
|
@ -934,6 +938,7 @@ EOF
|
||||||
|
|
||||||
# Drop in the main target 'all:' and the chapter targets with each sub-target
|
# Drop in the main target 'all:' and the chapter targets with each sub-target
|
||||||
# as a dependency.
|
# as a dependency.
|
||||||
|
if [[ "${METHOD}" = "chroot" ]]; then
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
all: chapter2 chapter3 chapter4 chapter5 chapter6 chapter7 chapter8
|
all: chapter2 chapter3 chapter4 chapter5 chapter6 chapter7 chapter8
|
||||||
|
@ -954,7 +959,7 @@ chapter7: chapter6 $bootscripttools
|
||||||
chapter8: chapter7 $bootabletools
|
chapter8: chapter7 $bootabletools
|
||||||
|
|
||||||
clean-all: clean
|
clean-all: clean
|
||||||
rm -rf ./{${PROGNAME}-commands,logs,Makefile,dump-clfs-scripts.xsl,functions,packages,patches}
|
rm -rf ./{${PROGNAME}-commands,logs,${PROGNAME}-Makefile,clfs.xsl,makefile-functions,packages,patches}
|
||||||
|
|
||||||
clean: clean-chapter4 clean-chapter3 clean-chapter2
|
clean: clean-chapter4 clean-chapter3 clean-chapter2
|
||||||
|
|
||||||
|
@ -999,8 +1004,82 @@ restore-lfs-env:
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "${METHOD}" = "boot" ]]; then
|
||||||
|
(
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
all: 023-creatingtoolsdir 024-creatingcrossdir 025-addinguser 026-settingenvironment \
|
||||||
|
$cross_tools \
|
||||||
|
$temptools \
|
||||||
|
$chroottools \
|
||||||
|
$boottools
|
||||||
|
@\$(call echo_boot_finished,$VERSION)
|
||||||
|
|
||||||
|
makeboot: 023-creatingtoolsdir 024-creatingcrossdir 025-addinguser 026-settingenvironment \
|
||||||
|
$cross_tools\
|
||||||
|
$temptools \
|
||||||
|
$chroottools \
|
||||||
|
$boottools
|
||||||
|
@\$(call echo_boot_finished,$VERSION)
|
||||||
|
|
||||||
|
makesys: $basicsystem $bootscripttools $bootabletools
|
||||||
|
@\$(call echo_finished,$VERSION)
|
||||||
|
|
||||||
|
|
||||||
|
clean-all: clean
|
||||||
|
rm -rf ./{${PROGNAME}-commands,logs,${PROGNAME}-Makefile,clfs.xsl,makefile-functions,packages,patches}
|
||||||
|
|
||||||
|
clean: clean-makesys clean-makeboot clean-jhalfs
|
||||||
|
|
||||||
|
clean-jhalfs:
|
||||||
|
-if [ ! -f user-lfs-exist ]; then \\
|
||||||
|
userdel lfs; \\
|
||||||
|
rm -rf /home/lfs; \\
|
||||||
|
fi;
|
||||||
|
rm -rf \$(MOUNT_PT)/tools
|
||||||
|
rm -f /tools
|
||||||
|
rm -rf \$(MOUNT_PT)/cross-tools
|
||||||
|
rm -f /cross-tools
|
||||||
|
rm -f envars user-lfs-exist
|
||||||
|
rm -f 02* logs/02*.log
|
||||||
|
|
||||||
|
clean-makeboot:
|
||||||
|
rm -rf /tools/*
|
||||||
|
rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools
|
||||||
|
rm -f restore-lfs-env sources-dir
|
||||||
|
cd logs && rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools && cd ..
|
||||||
|
|
||||||
|
clean-makesys:
|
||||||
|
-umount \$(MOUNT_PT)/sys
|
||||||
|
-umount \$(MOUNT_PT)/proc
|
||||||
|
-umount \$(MOUNT_PT)/dev/shm
|
||||||
|
-umount \$(MOUNT_PT)/dev/pts
|
||||||
|
-umount \$(MOUNT_PT)/dev
|
||||||
|
rm -rf \$(MOUNT_PT)/{bin,boot,dev,etc,home,lib,lib64,media,mnt,opt,proc,root,sbin,srv,sys,tmp,usr,var}
|
||||||
|
rm -f $basicsystem
|
||||||
|
rm -f $bootscripttools
|
||||||
|
rm -f $bootabletools
|
||||||
|
cd logs && rm -f $basicsystem && rm -f $bootscripttools && rm -f $bootabletools && cd ..
|
||||||
|
|
||||||
|
|
||||||
|
restore-lfs-env:
|
||||||
|
@\$(call echo_message, Building)
|
||||||
|
@if [ -f /home/lfs/.bashrc.XXX ]; then \\
|
||||||
|
mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
|
||||||
|
fi;
|
||||||
|
@if [ -f /home/lfs/.bash_profile.XXX ]; then \\
|
||||||
|
mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
|
||||||
|
fi;
|
||||||
|
@chown lfs:lfs /home/lfs/.bash* && \\
|
||||||
|
touch \$@
|
||||||
|
|
||||||
|
EOF
|
||||||
|
) >> $MKFILE
|
||||||
|
fi
|
||||||
|
|
||||||
# Bring over the items from the Makefile.tmp
|
# Bring over the items from the Makefile.tmp
|
||||||
cat $MKFILE.tmp >> $MKFILE
|
cat $MKFILE.tmp >> $MKFILE
|
||||||
rm $MKFILE.tmp
|
rm $MKFILE.tmp
|
||||||
|
|
|
@ -77,25 +77,23 @@ define echo_boot_finished
|
||||||
@echo -e \\t- Enter to the chroot using the command found
|
@echo -e \\t- Enter to the chroot using the command found
|
||||||
@echo -e \\tin 8.4 Entering the Chroot Environment
|
@echo -e \\tin 8.4 Entering the Chroot Environment
|
||||||
@echo
|
@echo
|
||||||
@echo -e \\t- Set a password for the root user
|
@echo -e \\t- Edit /etc/fstab,
|
||||||
@echo
|
|
||||||
@echo -e \\t- Edit /etc/fstab, /etc/hosts, /etc/sysconfig/clock,
|
|
||||||
@echo -e \\t/etc/sysconfig/console, /etc/sysconfig/network,
|
|
||||||
@echo -e \\t/etc/sysconfig//network-devices/ifconfig.eth0/ipv4 and
|
|
||||||
@echo -e \\tany other configuration file required to suit your needs.
|
@echo -e \\tany other configuration file required to suit your needs.
|
||||||
@echo
|
@echo
|
||||||
@echo -e \\t- Set-up Grub.
|
@echo -e \\t- Set-up Grub.
|
||||||
@echo
|
@echo
|
||||||
@echo -e \\t- Unmount the filesystems.
|
@echo -e \\t- Exit chroot environment.
|
||||||
@echo
|
@echo
|
||||||
@echo If you are an experienced LFS user, several of those steps can be
|
@echo If you are an experienced LFS user, several of those steps can be
|
||||||
@echo skipped or done in a different way. But then, that is something
|
@echo skipped or done in a different way. But then, that is something
|
||||||
@echo that you already know and there is no need to discuss it here.
|
@echo that you already know and there is no need to discuss it here.
|
||||||
@echo $(BOLD)
|
@echo $(BOLD)
|
||||||
@echo $(BOLD)$(YELLOW)
|
@echo $(BOLD)$(YELLOW)
|
||||||
@echo Boot the new partition. Once you are logged in issue the following cmds
|
@echo 1.If necessary transfer the newly created partition to the target machine
|
||||||
@echo -e \\t cd /jhahlfs
|
@echo 2.Boot the new partition.
|
||||||
@echo -e \\t make XXXXXXXX
|
@echo 3.Once you are logged in issue the following cmds
|
||||||
|
@echo -e \\t $(BOLD})cd /jhahlfs
|
||||||
|
@echo -e \\t $(BOLD)make -f clfs-Makefile makesys
|
||||||
@echo The build process should resume. Follow any instructions that appear.
|
@echo The build process should resume. Follow any instructions that appear.
|
||||||
@echo --------------------------------------------------------------------------------
|
@echo --------------------------------------------------------------------------------
|
||||||
@echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)
|
@echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)
|
||||||
|
|
|
@ -40,7 +40,6 @@ if [ ! -L $0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PROGNAME=$(basename $0)
|
PROGNAME=$(basename $0)
|
||||||
VERSION="0.0.1"
|
|
||||||
COMMON_DIR="common"
|
COMMON_DIR="common"
|
||||||
PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z])
|
PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z])
|
||||||
MODULE=$PACKAGE_DIR/master.sh
|
MODULE=$PACKAGE_DIR/master.sh
|
||||||
|
|
Reference in a new issue