Gennady Kupava wrote:

> 2. don't do anything on debug/preepmtion/optimization for size issue,
> as it's definetly waste of my time.

Not waste at all. Everybody can build faster kernel without debugging stuff now 
- thanks for this!

We should "just" find way how to include your work. I am now using attached 
patch. Maybe something like this can make it in andy-tracking?

Radek
commit 936fbcb8ef37a4ffd76bb7e282e42c98148f29e5
Author: Radek Polak <[email protected]>
Date:   Mon Jan 11 15:36:24 2010 +0100

    Support for building with debug options disabled in build script.
    
    If you append --nodebug to build script it builds kernel without
    debugging options.
    
    E.g: ./build GTA02 --nodebug
    
    will take config from GTA02 dir and builds the kernel without
    debugging options in directory GTA02_NODEBUG
    
    This is useful for building kernels for end users, where we want
    minimal kernel size and max speed.
    
    If you dont specify --nodebug option, this script will work as
    before.

diff --git a/arch/arm/configs/gta02_debug_options b/arch/arm/configs/gta02_debug_options
new file mode 100644
index 0000000..c79243e
--- /dev/null
+++ b/arch/arm/configs/gta02_debug_options
@@ -0,0 +1,29 @@
+CONFIG_LOCK_KERNEL=y
+CONFIG_PREEMPT=y
+CONFIG_OABI_COMPAT=y
+CONFIG_FPE_NWFPE=y
+CONFIG_MTD_NAND_S3C2410_DEBUG=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_PCM_XRUN_DEBUG=y
+CONFIG_USB_S3C2410_DEBUG=y
+CONFIG_REGULATOR_DEBUG=y
+CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
+CONFIG_TIMER_STATS=y
+CONFIG_DEBUG_PREEMPT=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_LOCKDEP=y
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_LOCKDEP=y
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_SG=y
+CONFIG_DEBUG_ERRORS=y
\ No newline at end of file
diff --git a/build b/build
index a7d15f7..02a1c84 100755
--- a/build
+++ b/build
@@ -24,8 +24,34 @@ fi
 
 mkdir -p $1
 
+#
+# process the --nodebug option that builds kernel without debugging stuff
+#
+
+if [ "$2" = "--nodebug" ] ; then
+	echo "Building without debug options"
+mkdir -p "$1_NODEBUG"
+
+if [ ! -f "$1_NODEBUG/.config" ] ; then
+	echo "Using config from $1"
+	cp $1/.config $1_NODEBUG
+fi
+
+echo "Removing debug options"
+
+N=0
+cat arch/arm/configs/gta02_debug_options | while read LINE ; do
+	N=$((N+1))
+	sed -i "s/$LINE/# $LINE/g" $1_NODEBUG/.config
+done
+fi
+
+#
+# use default toolchain if CROSS_COMPILE was not specified
+#
+
 if [ -z "$CROSS_COMPILE" ]; then
-    export CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-
+    export CROSS_COMPILE=/opt/toolchains/arm920t-eabi/bin/arm-linux-
 fi
 make O=$1 ARCH=arm silentoldconfig
 

Reply via email to