summaryrefslogtreecommitdiff
path: root/conf/machine/nslu2.conf
blob: 03af44953c45a8640d217823414c3fc711646ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#@TYPE: Machine
#@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.

#-------------------------------------------------------------------------------
# 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 ${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 = "-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"

#-------------------------------------------------------------------------------
# '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
#-------------------------------------------------------------------------------
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 ?= "20050713"
CVSDATE_ipkg-utils-native ?= "20050713"
CVSDATE_ipkg-link ?= "20050713"
CVSDATE_irssi ?= "20050930"

CVS_TARBALL_STASH = "http://sources.nslu2-linux.org/sources/"
INHERIT += "nslu2-mirrors"

PREFERRED_VERSION_ipkg ?= "0.99.152"
PREFERRED_VERSION_ipkg-native ?= "0.99.152"