Excellent!

I've actually been thinking it would be really nice to be able to do
parallel builds throughout the entire build system.

Please apply.

Cheers, -Brian


Erich Focht wrote:

>Hi Brian,
>
>here's a patch for parallel kernel builds. It reduces the build time
>significantly on SMP machines (as expected).
>
>Regards,
>Erich
>
>  
>
>------------------------------------------------------------------------
>
>--- make.d/kernel.rul.orig     2005-07-27 19:29:16.000000000 +0200
>+++ make.d/kernel.rul  2005-07-27 19:34:00.000000000 +0200
>@@ -126,6 +126,9 @@
>       $(SI_INSTALL) -m 644 $(LINUX_CONFIG) \
>           $(BOOT_BIN_DEST)/config
> 
>+# determine number of CPUs of current machine for parallel build
>+NCPUS = $(shell grep -c ^processor /proc/cpuinfo)
>+
> # build the kernel that autoinstall clients will boot from during
> # autoinstallation
> PHONY += kernel
>@@ -135,11 +138,11 @@
> $(LINUX_IMAGE):       $(SRC_DIR)/patched_kernel-stamp $(INITRD_DIR)/initrd.img
>       cp $(TOPDIR)/initrd_source/initrd.img \
>           ${LINUX_SRC}/arch/ppc64/boot/ramdisk.image.gz
>-      $(MAKE) -C $(LINUX_SRC) $(LINUX_TARGET)
>+      $(MAKE) -C $(LINUX_SRC) -j $(NCPUS) $(LINUX_TARGET)
>       mkdir -p $(TOPDIR)/tmp
> else 
> $(LINUX_IMAGE): $(SRC_DIR)/patched_kernel-stamp
>-      $(MAKE) -C $(LINUX_SRC) $(LINUX_TARGET)
>+      $(MAKE) -C $(LINUX_SRC) -j $(NCPUS) $(LINUX_TARGET)
>       mkdir -p $(TOPDIR)/tmp
> endif
> 
>@@ -172,7 +175,7 @@
> 
> $(SRC_DIR)/modules_build-stamp: $(LINUX_IMAGE)
>       rm -fr $(TOPDIR)/tmp/kernel_modules
>-      $(MAKE) -C $(LINUX_SRC) modules
>+      $(MAKE) -C $(LINUX_SRC) -j $(NCPUS) modules
>       touch $(SRC_DIR)/modules_build-stamp
> 
> PHONY += kernel_clean
>  
>

-- 
Brian Elliott Finley
Mobile:  630.631.6621



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Sisuite-devel mailing list
Sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to