diff options
Diffstat (limited to 'conf/machine')
-rw-r--r-- | conf/machine/nslu2.conf | 199 |
1 files changed, 102 insertions, 97 deletions
diff --git a/conf/machine/nslu2.conf b/conf/machine/nslu2.conf index 737d4e7c17..d0f089be2a 100644 --- a/conf/machine/nslu2.conf +++ b/conf/machine/nslu2.conf @@ -2,127 +2,132 @@ #@NAME: Linksys NSLU2 #@DESCRIPTION: Machine configuration for the Linksys NSLU2 product -# NOTE: conf/${DISTRO}.conf is included after this file and may be -# used to modify variables set here. +#------------------------------------------------------------------------------- +# INPUTS +#------------------------------------------------------------------------------- +# conf/${DISTRO}.conf is included after this file and should be used to modify +# variables identified as 'INPUTS' to the required values for the DISTRO, this +# will cause the board specific settings (which depend for the most part on the +# exact CPU used) to be set correctly within this file. The results are the +# variables identifies here as 'OUTPUTS' +# +#variable = "default" +# <possible values> +# description + +ARCH_BYTE_SEX = "be" +# "be" "le" +# The memory byte sex and (on correctly implemented hardware - the NSLU2 is +# correct) the byte sex of the buses within the system. 'be' (big-endian) +# means that the first byte is the most significant byte on a bus, 'le' +# (little-endian) means that the first byte is the least significant byte. + +ARM_INSTRUCTION_SET = "arm" +# "arm" "thumb" +# The instruction set the compiler should use when generating application +# code. The kernel is always compiled with arm code at present. arm code +# is the original 32 bit ARM instruction set, thumb code is the 16 bit +# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) +# but requires more instructions (140% for 70% smaller code) so may be +# slower. + +THUMB_INTERWORK = "yes" +# "yes" "no" +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows thumb code to be executed on a primarily +# arm system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. + +DISTRO_BASE = "" +# "" ":<base>" +# If given this must be the name of a 'distro' to add to the bitbake OVERRIDES +# after ${DISTRO}, this allows different distros to share a common base of +# overrides. The value given must include a leading ':' or chaos will result. #------------------------------------------------------------------------------- -# Processor and compilation options +# OUTPUTS #------------------------------------------------------------------------------- + #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. +# The standard ':' separated list of overrides used by bitbake - see the +# basic setting in bitbake.conf. This list is based on that used for the +# standard setting however :<base>, :thumb and :thumb-interwork will be +# inserted at appropriate points if a base distro, default use of thumb or +# arm/thumb interworking are enabled in the inputs. +OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +OVERRIDES = "local:${MACHINE}:${DISTRO}${DISTRO_BASE}:${TARGET_OS}:${TARGET_ARCH}${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}:build-${BUILD_OS}" + +# TARGET_CC_ARCH +# TARGET_CC_KERNEL_ARCH +# TARGET_LD_ARCH +# TARGET_LD_KERNEL_ARCH +# Compiler and linker options for application code and kernel code. These +# options ensure that the compiler has the correct settings for the selected +# instruction set and interworking. +ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" # -# 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 ${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 = "" -# Optimization settings. Os works fine and is significantly -# better than O2. The other settings are somewhat arbitrary. -# 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.) 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 +# Optimization settings. Os works fine and is significantly better than O2. +# The other settings are somewhat arbitrary. 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.) 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) -#This should be fixed in uclibc 0.9.28 and later -#FULL_OPTIMIZATION_append_linux-uclibc = " -fno-builtin-sin -fno-builtin-cos" +# TARGET_ARCH +# The correct setting for the system endianness (ARCH_BYTE_SEX). This will +# be arm (le) or armeb (be) - it is difficult to be more precise in the +# setting because of the large number of ways it is used within OpenEmbedded. +TARGET_ARCH = "${@['armeb', 'arm'][bb.data.getVar('ARCH_BYTE_SEX', d, 1) == 'le']}" -#------------------------------------------------------------------------------- -# '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. -NSLU2_ARCH_TYPE = "b" -TARGET_ARCH = "arme${NSLU2_ARCH_TYPE}" -# To change to little endian see distro/nslu2-dist.conf - -# 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 = "${TARGET_ARCH} armv2${NSLU2_ARCH_TYPE} armv2a${NSLU2_ARCH_TYPE} armv3${NSLU2_ARCH_TYPE} armv3m${NSLU2_ARCH_TYPE} armv4${NSLU2_ARCH_TYPE} armv4t${NSLU2_ARCH_TYPE} armv5${NSLU2_ARCH_TYPE} armv5t${NSLU2_ARCH_TYPE} armv5e${NSLU2_ARCH_TYPE} armv5te${NSLU2_ARCH_TYPE} xscale${NSLU2_ARCH_TYPE}" -NSLU2_THUMB_ARCHITECTURES = "thumbe${NSLU2_ARCH_TYPE} thumbv4t${NSLU2_ARCH_TYPE} thumbv5t${NSLU2_ARCH_TYPE}" - -# NOTE: this list contains just the things which rootfs_ipk.bbclass does not -# add, rootfs_ipk.bbclass evaluates: +# PACKAGE_ARCH +# The correct setting for the generated packages. This corresponds to the +# -march flag passed to the compiler because that limits the architectures +# on which the generated code will run. +BYTE_SEX_CHAR = "${@['b', 'l'][bb.data.getVar('ARCH_BYTE_SEX', d, 1) == 'le']}" +PACKAGE_ARCH_BASE = "${@['armv5te', 'thumbv5t'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +PACKAGE_ARCH = "${PACKAGE_ARCH_BASE}${BYTE_SEX_CHAR}" + +# IPKG_ARCHS +# The full list of package architectures which should run on the system. +# This takes into account both the board level issues and the INPUTS set +# by the distro. 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). +ARM_ARCHITECTURES = "${TARGET_ARCH} armv2${BYTE_SEX_CHAR} armv2a${BYTE_SEX_CHAR} armv3${BYTE_SEX_CHAR} armv3m${BYTE_SEX_CHAR} armv4${BYTE_SEX_CHAR} armv4t${BYTE_SEX_CHAR} armv5${BYTE_SEX_CHAR} armv5t${BYTE_SEX_CHAR} armv5e${BYTE_SEX_CHAR} armv5te${BYTE_SEX_CHAR} xscale${BYTE_SEX_CHAR}" +THUMB_ARCHITECTURES = "thumbe${BYTE_SEX_CHAR} thumbv4t${BYTE_SEX_CHAR} thumbv5t${BYTE_SEX_CHAR}" + +# 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}" +# 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. +# This is a priority ordered list - most desireable architecture at the end, +# so put <ARM_INSTRUCTION_SET>_ARCHITECTURES at the end and, if +# THUMB_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 = "${TARGET_ARCH}" -NSLU2_PACKAGE_ARCH = "${@['thumbv5t${NSLU2_ARCH_TYPE}', 'armv5te${NSLU2_ARCH_TYPE}'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == '']}" + (bb.data.getVar('THUMB_ARCHITECTURES', d, 1), \ + bb.data.getVar('ARM_ARCHITECTURES', d, 1), \ + bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) != 'thumb', \ + bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes')}" #------------------------------------------------------------------------------- # Miscellany #------------------------------------------------------------------------------- +# The correct settings for the NSLU2 board: SERIAL_CONSOLE = "115200 ttyS0" KERNEL_CONSOLE = "ttyS0,115200n8" USE_VT = "0" |