summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-08-12 15:09:06 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-12 15:09:06 +0000
commit3b2885c674f6b2ae61d5c88243dccc07bd90762b (patch)
treed379670e887a11b05042a77dc39c2e40a40a1f4e
parentf14bde879adabd525505ba8a12998dd715af9016 (diff)
nslu2.conf: change to the IPKG_ARCHS to include the correct architectures
(armv*b for all armv* suppported by the xscale processor). The old 'generic' armeb is still suppported (of course) and, by default, this is the ARCH of the generated packages - this is technically wrong, the packages are actually armv5teb - but changing this would make the feeds non-functional for existing systems.
-rw-r--r--conf/distro/ucslugc.conf42
-rw-r--r--conf/machine/nslu2.conf113
2 files changed, 113 insertions, 42 deletions
diff --git a/conf/distro/ucslugc.conf b/conf/distro/ucslugc.conf
index bb383b8a66..0376eadd00 100644
--- a/conf/distro/ucslugc.conf
+++ b/conf/distro/ucslugc.conf
@@ -6,25 +6,29 @@
# STANDARD UcSlugC DEFINITIONS
#----------------------------------------------------------------------------------
DISTRO_NAME = "UcSlugC"
-DISTRO_VERSION = "1-beta"
+DISTRO_VERSION = "1.1-beta"
DISTRO_TYPE ?= "beta"
TARGET_FPU = "soft"
TARGET_OS = "linux-uclibc"
+# Select thumb-interwork and (TBD) thumb
+ARM_INTERWORK = ":thumb-interwork"
+#ARM_INSTRUCTION_SET = ":thumb"
+
USE_NLS ?= "no"
USE_NLS_glib-2.0 = "yes"
INHERIT += " package_ipk debian nslu2_flashimg"
# The OVERRIDES are modified here so that 'openslug' overrides are picked up if
-# present (ucslugc overrides take precedence), 'thumb' is used to factor out
-# things where a pack assumes that an arm target implies 32 bit instruction
-# support with no attention to thumb/arm mode (it indicates a bug if it is
-# necessary to use this).
-#NSLU2_THUMB_OVERRIDE = ":thumb"
-NSLU2_THUMB_OVERRIDE = ""
-OVERRIDES = "local:${MACHINE}:${DISTRO}:openslug:${TARGET_OS}${NSLU2_THUMB_OVERRIDE}:${TARGET_ARCH}:build-${BUILD_OS}"
+# present (ucslugc overrides take precedence).
+NSLU2_BASE_DISTRO = ":openslug"
+
+# We are building packages which are armvteb (big endian) for arm or thumbv5tb for
+# thumb instructions. The PACKAGE_ARCH should reflect this because generated code
+# requires that instruction set support.
+PACKAGE_ARCH = "${NSLU2_PACKAGE_ARCH}"
# NOTE: to build new packages set UCSLUGC_EXTRA_BBFILES to the full path name to
# the .bb files for the packages to build - see ucslugc-packages.conf in this
@@ -51,28 +55,6 @@ FEED_URIS_append += "native##http://ipkg.nslu2-linux.org/feeds/ucslugc/native/${
#FEED_URIS_append += "unstable_native##http://ipkg.nslu2-linux.org/feeds/ucslugc/native/unstable"
#----------------------------------------------------------------------------------
-# OVERALL BUILD OPTIONS
-#----------------------------------------------------------------------------------
-#
-# TARGET_CC_ARCH is used to provide architecture specific definitions to the C
-# compiler. For target compilation it is part of "CC" - not part of "CFLAGS" -
-# in the hope that individual package builds will therefore not circumvent it
-# (this doesn't always work, but it is more reliable than a simple setting of
-# CFLAGS values).
-#
-# For UcSlugC the architecture value used is based on the standard NSLU2 value,
-# however it selects both thumb interwork and thumb code generation to minimise
-# build size. The distro allows the choice of thumb or arm code to be overridden
-# on a per-package basis by setting NSLU2_THUMB (to empty) in the package .bb file.
-# See also the 'override' above.
-#NSLU2_THUMB = "-mthumb"
-NSLU2_THUMB = ""
-TARGET_CC_ARCH = "-march=armv5te -mtune=xscale -mthumb-interwork ${NSLU2_THUMB}"
-TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale -mno-thumb-interwork -mno-thumb"
-TARGET_LD_ARCH = ""
-TARGET_LD_KERNEL_ARCH = ""
-
-#----------------------------------------------------------------------------------
# FIRMWARE CONFIGURATION
#----------------------------------------------------------------------------------
# IMAGE BUILD OPTIONS
diff --git a/conf/machine/nslu2.conf b/conf/machine/nslu2.conf
index 136c3187ce..3a9a9d9730 100644
--- a/conf/machine/nslu2.conf
+++ b/conf/machine/nslu2.conf
@@ -2,25 +2,55 @@
#@NAME: Linksys NSLU2
#@DESCRIPTION: Machine configuration for the Linksys NSLU2 product
-TARGET_ARCH = "armeb"
-# NOTE: this used to contain armv5te, but any package marked
-# armv5te is almost certain to be little endian and all NSLU2
-# packages (openslug and unslung) are generated 'armeb', so
-# this list accepts only armeb or nslu2
-IPKG_ARCHS = "all ${TARGET_ARCH} ${MACHINE}"
-PREFERRED_PROVIDER_xserver ?= "xserver-kdrive"
+# NOTE: conf/${DISTRO}.conf is included after this file and may be
+# used to modify variables set here.
-IMAGE_ROOTFS_SIZE_ext2 = "10240"
-IMAGE_ROOTFS_SIZE_ext2.gz = "10240"
+#-------------------------------------------------------------------------------
+# Processor and compilation options
+#-------------------------------------------------------------------------------
+#OVERRIDES
+# ARM processors support both 32('arm') and 16('thumb') bit instruction sets,
+# The procedure call standard has special provision for inter-calling without
+# the need to know whether the instruction set of the target procedure
+# ('interwork'). These options control the instruction set and whether or not
+# interworking is supported.
+#
+# ARM_INTERWORK may be set to :thumb-interwork if required, empty otherwise.
+# ARM_THUMB may be set to ":thumb" (exactly that, with the leading :) if thumb
+# instructions are required, empty otherwise.
+#
+# These two variables define the instruction set used for compilation and
+# whether the other (16 or 32 bit) instruction set is supported by the distro.
+# These options may be changed on a per-package basis, however interwork is
+# required if the package instruction set does not match the distro option.
+# To set these in a package simply set the relevant variable to the correct
+# value, in each case *non-empty* means 'true' - -mthumb-interwork or -mthumb
+# in the compilation options.
+#ARM_INTERWORK = ":thumb-interwork"
+ARM_INTERWORK = ""
+#ARM_INSTRUCTION_SET = ":thumb"
+ARM_INSTRUCTION_SET = ""
+
+# The OVERRIDES are modified here so that 'NSLU2_BASE_DISTRO' overrides are
+# picked up if present (${DISTRO} overrides take precedence), ARM_INTERWORK
+# and ARM_INSTRUCTION_SET overrides are for handling bugs in packages which
+# cannot deal with the -mthumb-interwork or -mthumb settings.
+#NSLU2_BASE_DISTRO = ":openslug"
+NSLU2_BASE_DISTRO = ""
+OVERRIDES = "local:${MACHINE}:${DISTRO}${NSLU2_BASE_DISTRO}:${TARGET_OS}:${TARGET_ARCH}${ARM_INSTRUCTION_SET}${ARM_INTERWORK}:build-${BUILD_OS}"
+
+#COMPILER
+# Compiler options - passed to TARGET_CC_ARCH
+ARM_INTERWORK_M_OPT = "${@['-mthumb-interwork', '-mno-thumb-interwork'][bb.data.getVar('ARM_INTERWORK', d, 1) == '']}"
+ARM_THUMB_M_OPT = "${@['-mthumb', '-mno-thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == '']}"
# This was 'include tune-xscale.conf' but that doesn't work
# (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_CC_ARCH = "-march=armv5te -mtune=xscale ${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
+TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale -mno-thumb-interwork -mno-thumb"
TARGET_LD_ARCH = ""
TARGET_LD_KERNEL_ARCH = ""
-PACKAGE_ARCH = "armeb"
# Optimization settings. Os works fine and is significantly
# better than O2. The other settings are somewhat arbitrary.
@@ -39,10 +69,69 @@ FULL_OPTIMIZATION = "-Os -fomit-frame-pointer -frename-registers \
# these functions must be disabled (this only occurs with -O)
FULL_OPTIMIZATION_append_linux-uclibc = " -fno-builtin-sin -fno-builtin-cos"
+#-------------------------------------------------------------------------------
+# 'ARCH' options - package architecture and the 'target' architecture
+#-------------------------------------------------------------------------------
+# Historically the 'arch' is armeb, but this causes problems because it is
+# generic ('armeb' should really only use instructions present on all ARM
+# processors). Correcting it is difficult, however, because it is written in
+# to so many places.
+#
+# TARGET_ARCH is *wrong* it should be armv5teb or, maybe, thumbv5teb
+# however many packages have been modified to recognised 'armeb' inside
+# configure scripts, fixing this up to handle arm*eb or thumb*eb is a
+# lot of work, so has not yet been done.
+#NOTE: do *not* change this is a distro.conf, a lot of work is required
+# to get this fixed.
+TARGET_ARCH = "armeb"
+
+# The list of valid architectures for thumb or arm on NSLU2. The arm list is
+# derived from the architecture settings known to gcc, the thumb list is then
+# derived from that (only the 't' architectures of course). Note: NSLU2 is
+# assumed to imply 'big-endian', though in fact this need not be the case.
+NSLU2_ARM_ARCHITECTURES = "armeb armv2b armv2ab armv3b armv3mb armv4b armv4tb armv5b armv5tb armv5eb armv5teb xscaleb"
+NSLU2_THUMB_ARCHITECTURES = "thumbeb thumbv4tb thumbv5tb"
+
+# NOTE: this list contains just the things which rootfs_ipk.bbclass does not
+# add, rootfs_ipk.bbclass evaluates:
+#
+# ipkgarchs="all any noarch ${TARGET_ARCH} ${IPKG_ARCHS} ${MACHINE}"
+#
+# This is a priority ordered list - most desireable architecture at the end, so
+# put NSLU2_(ARM_INSTRUCTION_SET)_ARCHITECTURES at the end and, if ARM_INTERWORK
+# precede this with the other architectures.
+IPKG_ARCHS = "${@(lambda arch_thumb, arch_arm, is_arm, interwork: \
+ (interwork and (is_arm and arch_thumb or arch_arm) + ' ' or '') \
+ + (is_arm and arch_arm or arch_thumb)) \
+ (bb.data.getVar('NSLU2_THUMB_ARCHITECTURES', d, 1), \
+ bb.data.getVar('NSLU2_ARM_ARCHITECTURES', d, 1), \
+ bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == '', \
+ bb.data.getVar('ARM_INTERWORK', d, 1) != '')}"
+
+# The package architecture is 'wrong' - it should be armv5teb or thumbv5teb -
+# however this setting is retained for backward compatibility as changing it
+# would mean that old systems would not accept new packages! (armv5teb is not
+# in the old system list).
+#NOTE: new distros with independent feeds are encouraged to fix this, the
+# variable NSLU2_PACKAGE_ARCH is provided for this purpose.
+PACKAGE_ARCH = "armeb"
+NSLU2_PACKAGE_ARCH = "${@['thumbv5tb', 'armv5teb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == '']}"
+
+#-------------------------------------------------------------------------------
+# Miscellany
+#-------------------------------------------------------------------------------
+# JBowler(20050811): I don't think any of the following are required (now).
+PREFERRED_PROVIDER_xserver ?= "xserver-kdrive"
+IMAGE_ROOTFS_SIZE_ext2 = "10240"
+IMAGE_ROOTFS_SIZE_ext2.gz = "10240"
+
SERIAL_CONSOLE = "115200 ttyS0"
KERNEL_CONSOLE = "ttyS0,115200n8"
USE_VT = "0"
+#-------------------------------------------------------------------------------
+# Package versions
+#-------------------------------------------------------------------------------
CVSDATE_gnu-config ?= "20050713"
CVSDATE_gnu-config-native ?= "20050713"
CVSDATE_ipkg-utils-native ?= "20050713"