[kbuild-devel] make -j2 doesn't work anymore

2003-10-12 Thread Burton Windle
Hello. It seems that if you build your kernel with simply 'make -j 2'
instead of 'make -j 2 bzImage', the make system only uses one process
instead of the number specified (I only see one cpp process, and the build
takes twice as long as normal).

Linux dual266 2.6.0-test7-bk1 #18 SMP Thu Oct 9 10:08:14 EDT 2003 i686 GNU/Linux

Gnu C  3.3.2
Gnu make   3.80
util-linux 2.12
mount  2.12
module-init-tools  implemented
e2fsprogs  1.35-WIP
nfs-utils  1.0.5
Linux C Library2.3.2
Dynamic linker (ldd)   2.3.2
Procps 3.1.12
Net-tools  1.60
Console-tools  0.2.3
Sh-utils   5.0




--
Burton Windle   [EMAIL PROTECTED]
Linux: the grim reaper of innocent orphaned children.
  from /usr/src/linux-2.4.18/init/main.c:461



---
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch] deb target

2003-10-12 Thread Wichert Akkerman
For a while now I've been missing a deb target in kbuild, especially
since there is a simple rpm target. While Debian does have a tool
to create kernel packages (make-kpkg from the kernel-package package)
I felt there was a need for a simpler method build into kbuild.

The patch is imperfect and could use some changed from someone who is
more familiar with kbuild, but It Works For Me(tm). I would appreciate
any feedback people have on it (I'm not subscribed to kbuild-devel,
so please cc me on any replies).

Wichert.


diff -wurN linux-2.6.0-test7/Makefile linux-2.5/Makefile
--- linux-2.6.0-test7/Makefile  2003-10-08 21:24:17.0 +0200
+++ linux-2.5/Makefile  2003-10-09 18:08:17.0 +0200
@@ -780,7 +780,7 @@
 
 quiet_cmd_rmclean = RM  $$(CLEAN_FILES)
 cmd_rmclean  = rm -f $(CLEAN_FILES)
-clean: archclean $(clean-dirs)
+clean: archclean debclean $(clean-dirs)
$(call cmd,rmclean)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
@@ -843,6 +843,19 @@
 tags: FORCE
$(call cmd,tags)
 
+# DEB target
+# ---
+
+.PHONY: deb debclean
+
+debclean:
+   rm -rf debian/tmp
+   rm -f debian/changelog debian/control debian/files
+   rmdir debian
+
+deb:
+   $(srctree)/scripts/builddeb
+
 # RPM target
 # ---
 
diff -wurN linux-2.6.0-test7/scripts/builddeb linux-2.5/scripts/builddeb
--- linux-2.6.0-test7/scripts/builddeb  1970-01-01 01:00:00.0 +0100
+++ linux-2.5/scripts/builddeb  2003-10-09 18:13:44.0 +0200
@@ -0,0 +1,74 @@
+#!/bin/sh
+#
+# builddep 0.1
+# Copyright 2003 Wichert Akkerman [EMAIL PROTECTED]
+#
+# Simple script to generate a deb package for a Linux kernel. All the
+# complexity of what to do with a kernel after it is installer or removed
+# is left to other scripts and packages: they can install scripts in the
+# /etc/linux/postinst/ and /etc/linux/prerm/ directories that will be called
+# on package install and removal.
+
+set -e
+
+# Some variables and settings used throughout the script
+version=$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION
+tmpdir=$(pwd)/debian/tmp
+
+# Setup the directory structure
+rm -rf $tmpdir
+mkdir -p $tmpdir/DEBIAN $tmpdir/lib $tmpdir/boot
+
+# Build and install the kernel
+INSTALL_PATH=$tmpdir/boot make install
+INSTALL_MOD_PATH=$tmpdir make modules_install
+
+# Remove the generated symbolic links, those should not be in the package but
+# generated after installation
+rm $(find $tmpdir/boot -type l -print)
+
+# Install the maintainer scripts
+for script in postinst postrm preinst prerm ; do
+   mkdir -p $tmpdir/etc/linux/$script.d
+   cat EOF  $tmpdir/DEBIAN/$script
+#!/bin/sh
+
+set -e
+
+test -d /etc/linux/$script.d  run-parts --arg=$version /etc/linux/$script.d
+exit 0
+EOF
+   chmod 755 $tmpdir/DEBIAN/$script
+done
+
+# Generate a simple changelog template
+cat EOF  debian/changelog
+linux ($version) unstable; urgency=low
+
+  * A standard release
+
+ -- Linus Torvalds [EMAIL PROTECTED]  $(date -R)
+EOF
+
+# Generate a control file
+cat EOF  debian/control
+Source: linux
+Section: base
+Priority: optional
+Maintainer: Linus Torvalds [EMAIL PROTECTED]
+Standards-Version: 3.6.1
+
+Package: linux
+Architecture: any
+Description: Linux kernel, version $version
+ This package contains the Linux kernel, modules and corresponding other
+ files version $version.
+EOF
+
+# Fix some ownership and permissions
+chown -R root:root $tmpdir
+chmod -R go-w $tmpdir
+
+# Perform the final magic
+dpkg-gencontrol -isp
+dpkg --build $tmpdir ..

-- 
Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.



---
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] make -j2 doesn't work anymore

2003-10-12 Thread Sam Ravnborg
On Thu, Oct 09, 2003 at 11:33:39AM -0400, Burton Windle wrote:
 Hello. It seems that if you build your kernel with simply 'make -j 2'
 instead of 'make -j 2 bzImage', the make system only uses one process
 instead of the number specified (I only see one cpp process, and the build
 takes twice as long as normal).

Works for Me (TM)..
The best way to check is to look at the output.
If you see the compiler shifting between two directories you know it works.
Sample output:
  CC  arch/i386/kernel/cpu/mcheck/p5.o
  CC  kernel/printk.o
  CC  arch/i386/kernel/cpu/mcheck/p6.o

As you can see the kernel is being built in arch/i386/kernel/cpu
in parallel with kernel/

If you still see this error then it most be a problem local to your
setup - if more people saw it they would have complained.

Sam


---
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel