# Destination path where to install new Linux-HV system. This is usually where
# you have mounted your new LFS partition, but it can also be any directory.
# This is relevant only for stage 0 and 1.
-LFS="/mnt/hvlinux-temp"
+LFS="/mnt/hvlinux"
LFS_PARTITION="/dev/sdb7"
BOOT_PARTITION="/dev/sdb1"
SWAP_PARTITION="/dev/sdb2"
rscr mult "Performing pre-install" pre-install
ipkg -l "${PERL}-pass1" ${PERL}
-ipkg -m noac ${KERNEL}
+ipkg -c -m noac -l "kernel-headers" -s "kernel-headers" ${KERNEL}
ipkg -m noac ${MANPAGES}
ipkg ${EGLIBC}
rscr once "Adjusting toolchain" toolchain-adjust
ipkg ${NANO}
ipkg -m noac ${ACPID}
+ipkg -c -m noac -l "kernel" -s "kernel" ${KERNEL}
rscr once "Installing HV-utilities" install-hv-utilities
rscr once "Installing bootscripts" install-bootscripts
rscr mult "Compressing man pages" compressdoc
#rscr mult "Stripping" stripping
-echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
-
# Creating root password
passwd root
rscr mult "Performing post-install" post-install
ldconfig
-echo "Stage2 successfully completed."
-echo "You must now compile a new kernel (go to /usr/src/linux)."
-echo "After that, you can reboot and try your new system."
-
write_completed_stage
+display_stage_build_stats
exec /bin/bash --login
--- /dev/null
+#!/bin/bash
+
+hvbuild()
+{
+ # Check if kernel sources are still in /usr/src.
+ # If not, recopy them.
+ if [ ! -d /usr/src/${PACKAGE} ]; then
+ # Decompress kernel sources
+ decompress_package ${PACKAGE} /usr/src
+ fi
+
+ # Copy kernel configuration file in source tree.
+ cp -v ${SCRDIR}/../config/${KERNEL_CONFIG} /usr/src/${PACKAGE}/.config
+
+ # Install HV kernel compilation script:
+ VERSION=$(get_pkg_ver ${PACKAGE})
+ SCRIPT=/usr/src/compile-kernel
+
+ echo "#!/bin/bash" > ${SCRIPT}
+ echo "set -o errexit" >> ${SCRIPT}
+ echo "KERNEL_VERSION=${VERSION}" >> ${SCRIPT}
+ echo "KERNEL_NAME=clfs-\${KERNEL_VERSION}" >> ${SCRIPT}
+ echo "DEST=/boot" >> ${SCRIPT}
+ echo "ARCH=${HVL_TARGET}" >> ${SCRIPT}
+ echo "unset CROSS_COMPILE" >> ${SCRIPT}
+ echo "" >> ${SCRIPT}
+ echo "make" >> ${SCRIPT}
+ echo "make modules" >> ${SCRIPT}
+ echo "make modules_install" >> ${SCRIPT}
+ echo "cp -v arch/${HVL_TARGET}/boot/bzImage \${DEST}/vmlinuz-\${KERNEL_NAME}" >> ${SCRIPT}
+ echo "cp -v System.map \${DEST}/System.map-\${KERNEL_NAME}" >> ${SCRIPT}
+ echo "cp -v .config \${DEST}/config-\${KERNEL_NAME}" >> ${SCRIPT}
+
+ chmod -v u+x ${SCRIPT}
+
+ cd ${LFS}/usr/src/${PACKAGE}
+
+ # The 'yes' command repeatedly output a line with all specified string, or
+ # 'y' by default. So, you can use it to simply "press enter", which will
+ # result in using the defaults value for the 'make oldconfig' command.
+ yes "" | make oldconfig
+
+ # Execute compilation script
+ ${SCRIPT}
+}
--- /dev/null
+#!/bin/bash
+
+hvbuild()
+{
+ # Check if kernel sources from stage0 are still in /usr/src.
+ # If not, recopy them.
+ if [ ! -d /usr/src/${PACKAGE} ]; then
+ # Decompress kernel sources
+ decompress_package ${PACKAGE} /usr/src
+ fi
+
+ # Install headers
+ cd /usr/src/${PACKAGE}
+ make mrproper
+ make headers_check
+
+ # Remove any previous headers install
+ rm -rf dest
+ make INSTALL_HDR_PATH=dest headers_install
+ cp -rv dest/include/* /usr/include
+ find /usr/include -name .install -or -name ..install.cmd | xargs rm -fv
+ rm -rf dest
+}
+++ /dev/null
-#!/bin/bash
-
-hvbuild()
-{
- # Check if kernel sources from stage0 are still in /usr/src.
- # If not, recopy them.
- if [ ! -d /usr/src/${PACKAGE} ]; then
- cp -a ${LFS_TMP}/${PACKAGE} /usr/src
- fi
-
- # Install headers
- cd /usr/src/${PACKAGE}
- make mrproper
- make headers_check
-
- # Remove any previous headers install
- rm -rf dest
- make INSTALL_HDR_PATH=dest headers_install
- cp -rv dest/include/* /usr/include
- find /usr/include -name .install -or -name ..install.cmd | xargs rm -fv
- rm -rf dest
-
- # Install HV kernel compilation script:
- VERSION=$(get_pkg_ver ${PACKAGE})
- SCRIPT=/usr/src/compile-kernel
-
- echo "#!/bin/bash" > ${SCRIPT}
- echo "set -o errexit" >> ${SCRIPT}
- echo "KERNEL_VERSION=${VERSION}" >> ${SCRIPT}
- echo "KERNEL_NAME=clfs-\${KERNEL_VERSION}" >> ${SCRIPT}
- echo "DEST=/boot" >> ${SCRIPT}
- echo "ARCH=${HVL_TARGET}" >> ${SCRIPT}
- echo "unset CROSS_COMPILE" >> ${SCRIPT}
- echo "" >> ${SCRIPT}
- echo "make" >> ${SCRIPT}
- echo "make modules" >> ${SCRIPT}
- echo "make modules_install" >> ${SCRIPT}
- echo "cp -v arch/${HVL_TARGET}/boot/bzImage \${DEST}/vmlinuz-\${KERNEL_NAME}" >> ${SCRIPT}
- echo "cp -v System.map \${DEST}/System.map-\${KERNEL_NAME}" >> ${SCRIPT}
- echo "cp -v .config \${DEST}/config-\${KERNEL_NAME}" >> ${SCRIPT}
-
- chmod -v u+x ${SCRIPT}
-}