X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fpkg%2Flinux;h=dd0af0b8d271e0f2c76c426efe7abd11803953d4;hb=88f5fb0c316fe9a38c3d05a2e2a2dcfbc5c95557;hp=2065bf0bf0912bd444bb63926e3fa7cdbd5e9c0a;hpb=b5bfb2006502b57fab234345a2393fd04e6d55ad;p=hvlinux.git diff --git a/stage2/pkg/linux b/stage2/pkg/linux index 2065bf0..dd0af0b 100644 --- a/stage2/pkg/linux +++ b/stage2/pkg/linux @@ -2,17 +2,24 @@ hvbuild() { - # The kernel sources were already copied into /usr/src in stage0 - cd /usr/src/${PACKAGE} - make mrproper - make headers_check + # Check if kernel sources from stage0 are still there + if [ ! -d /usr/src/${PACKAGE} ]; then + # If no, then copy them. We don't install headers and + # assume that it is a new kernel version installation. + mv ${LFS_TMP}/${PACKAGE} /usr/src + else + # 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 + # 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 + fi # Install HV kernel compilation script: VERSION=$(get_pkg_ver ${PACKAGE})