From e66948ab420f9bb32f14473c7bc5d819d86871ce Mon Sep 17 00:00:00 2001 From: Brad House Date: Thu, 8 Jan 2004 02:09:03 +0000 Subject: [PATCH] add makeopts params, and fixes for if old coreutils is in root git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@38 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- gen_cmdline.sh | 7 +++++-- gen_determineargs.sh | 6 +++++- generic/linuxrc | 6 +++++- parisc/config.sh | 2 ++ sparc/config.sh | 2 ++ sparc64/config.sh | 2 ++ x86/config.sh | 2 ++ x86_64/config.sh | 2 ++ 8 files changed, 25 insertions(+), 4 deletions(-) diff --git a/gen_cmdline.sh b/gen_cmdline.sh index bcb36b6..1a42700 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -36,6 +36,7 @@ usage() { echo " --utils-ld= Linker to use for utils" echo " --utils-as= Assembler to use for utils" echo " --utils-make= GNU Make to use for utils" + echo " --makeopts= Make Opts such as -j2, etc" echo " Internals" echo " --arch-override= Force to arch instead of autodetect (cross-compile?)" echo " --busybox-config= Busybox configuration file to use" @@ -96,12 +97,14 @@ parse_cmdline() { CMD_UTILS_MAKE=`parse_opt "${x}"` print_info 2 "CMD_UTILS_MAKE: $CMD_UTILS_MAKE" ;; - + --makeopts*) + CMD_MAKEOPTS=`parse_opt "${x}"` + print_info 2 "CMD_MAKEOPTS: $CMD_MAKEOPTS" + ;; --debuglevel*) CMD_DEBUGLEVEL=`parse_opt "${x}"` DEBUGLEVEL="${CMD_DEBUGLEVEL}" print_info 2 "CMD_DEBUGLEVEL: $CMD_DEBUGLEVEL" - ;; --menuconfig) CMD_MENUCONFIG=1 diff --git a/gen_determineargs.sh b/gen_determineargs.sh index d5d2d59..af7f52e 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -16,7 +16,11 @@ get_KV() { } determine_real_args() { - MAKEOPTS="-j2" + if [ "${CMD_MAKEOPTS}" != "" ] + then + MAKEOPTS="${CMD_MAKEOPTS}" + fi + if [ "${CMD_KERNELDIR}" != "" ] then KERNEL_DIR=${CMD_KERNELDIR} diff --git a/generic/linuxrc b/generic/linuxrc index 67f27a0..de97732 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -171,7 +171,11 @@ echo "STEP 6: pivot_root and exec/chroot real init" cd /newroot pivot_root . tmp/.initrd -if [ "${USE_DEVFS_NORMAL}" -eq "1" -a "${CDROOT}" -eq "0" ] +# We cannot use if [ this = that ] after a pivot_root as +# an old version of coreutils in real_root does not support +# that style, noted by Weeve + +if test "${USE_DEVFS_NORMAL}" -eq "1" -a "${CDROOT}" -eq "0" then # must mount a new devfs before we can # umount the old one for some reason diff --git a/parisc/config.sh b/parisc/config.sh index f122c8c..dfcf56a 100644 --- a/parisc/config.sh +++ b/parisc/config.sh @@ -22,3 +22,5 @@ UTILS_LD=ld COMPRESS_INITRD=yes +MAKEOPTS="-j2" + diff --git a/sparc/config.sh b/sparc/config.sh index c995bae..59be438 100644 --- a/sparc/config.sh +++ b/sparc/config.sh @@ -9,6 +9,8 @@ KERNEL_BINARY="vmlinux" # other stuff seems to compile fine though USE_DIETLIBC=0 +MAKEOPTS="-j2" + KERNEL_MAKE=make UTILS_MAKE=make diff --git a/sparc64/config.sh b/sparc64/config.sh index 68ab591..39aae4b 100644 --- a/sparc64/config.sh +++ b/sparc64/config.sh @@ -9,6 +9,8 @@ KERNEL_BINARY="arch/sparc64/boot/image" # can turn this flag on USE_DIETLIBC=0 +MAKEOPTS="-j2" + KERNEL_MAKE=make UTILS_MAKE=make diff --git a/x86/config.sh b/x86/config.sh index 29f566f..7a2f372 100644 --- a/x86/config.sh +++ b/x86/config.sh @@ -9,6 +9,8 @@ KERNEL_BINARY="arch/i386/boot/bzImage" # other stuff seems to compile fine though USE_DIETLIBC=1 +MAKEOPTS="-j2" + KERNEL_MAKE=make UTILS_MAKE=make diff --git a/x86_64/config.sh b/x86_64/config.sh index 651172c..c210b5b 100644 --- a/x86_64/config.sh +++ b/x86_64/config.sh @@ -7,6 +7,8 @@ KERNEL_BINARY="arch/x86_64/boot/bzImage" USE_DIETLIBC=1 +MAKEOPTS="-j2" + KERNEL_MAKE=make UTILS_MAKE=make -- 2.26.2