Change the NSLU2 kernel build configuration method to allow the
authorJohn Bowler <jbowler@nslu2-linux.org>
Thu, 11 Aug 2005 20:49:14 +0000 (20:49 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Thu, 11 Aug 2005 20:49:14 +0000 (20:49 +0000)
configuration override to be specified in the machine.conf rather than
hardwiring -mno-thumb-interwork into nslu2-kernel.inc

conf/machine/nslu2.conf
packages/ixp425-eth/ixp425-eth_1.1.bb
packages/ixp4xx/ixp4xx-csr_1.4.bb
packages/linux/nslu2-kernel.inc

index 8384939..136c318 100644 (file)
@@ -17,6 +17,9 @@ IMAGE_ROOTFS_SIZE_ext2.gz = "10240"
 # (it would need to be conf/machine/tune-xscale.conf) and
 # anyway it sets the package architecture to armeb.
 TARGET_CC_ARCH = "-march=armv5te -mtune=xscale"
+TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale"
+TARGET_LD_ARCH = ""
+TARGET_LD_KERNEL_ARCH = ""
 PACKAGE_ARCH = "armeb"
 
 # Optimization settings.  Os works fine and is significantly
@@ -24,8 +27,13 @@ PACKAGE_ARCH = "armeb"
 # The optimisations chosen here include the ones which 'break'
 # symbolic debugging (because the compiler does not include
 # enough information to allow the debugger to know where given
-# values are.)
-FULL_OPTIMIZATION = "-fomit-frame-pointer -frename-registers -fweb -funit-at-a-time -Os"
+# values are.)  The -fno options are an attempt to cancel explicit
+# use of space consuming options found in some packages (this isn't
+# a complete list, this is just the ones which package writers seem
+# to know about and abuse).
+FULL_OPTIMIZATION = "-Os -fomit-frame-pointer -frename-registers \
+       -fno-unroll-loops -fno-inline-functions \
+       -fweb -funit-at-a-time"
 
 # uClibc does not include sinf or cosf, so the gcc auto-use of 
 # these functions must be disabled (this only occurs with -O)
index 84d037d..f10d717 100644 (file)
@@ -19,8 +19,8 @@ inherit module
 # Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
 # required.  Notice that this has to be done for each separately built
 # module as well!
-KERNEL_CC += "${TARGET_CC_ARCH} -mno-thumb-interwork"
-# KERNEL_LD +=
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
 
 #do_ixp425_c_patch_fetch () {
 #      if test ! -e ${DL_DIR}/ixp425_eth.c.patch.md5; then
index 12898a2..0526374 100644 (file)
@@ -16,8 +16,8 @@ inherit module
 # Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
 # required.  Notice that this has to be done for each separately built
 # module as well!
-KERNEL_CC += "${TARGET_CC_ARCH} -mno-thumb-interwork"
-# KERNEL_LD +=
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
 
 #LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
 CFLAGS = "-fno-common -D__KERNEL__ -DMODULE -D__linux -DCPU=33 -DXSCALE=33 \
index f5d7135..8946822 100644 (file)
@@ -221,8 +221,8 @@ CMDLINE = "${CMDLINE_ROOT} ${CMDLINE_DEBUG} ${CMDLINE_CONSOLE}"
 # Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
 # required.  Notice that this has to be done for each separately built
 # module as well!
-KERNEL_CC += "${TARGET_CC_ARCH} -mno-thumb-interwork"
-# KERNEL_LD +=
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
 
 # By putting the added files in place in a separate task before
 # do_patch it becomes possible to patch these files.