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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
#@TYPE: Distribution
#@NAME: NSLU2
#@DESCRIPTION: UcSlugC Linux Distribution for the NSLU2
# Explanation of the naming
#
# nslu2-dist - the base distro configuration for an NSLU2
# nslu2-[bl][at][gu] - a specific configuration encoded as follows:
# b or l - big or little endian
# a or t - ARM or Thumb instructions in the low level libraries
# g or u - glibc or uclibc libc implementation
#
# openslug - the historical name of a canonical nslu2-bag distro,
# used generically for NSLU2 specific distro features and
# the default OVERRIDE for all these NSLU2 builds
# ucslugc - the historical (and obsolte) name of nslu2-btu
# also the name of a standard nslu2-btu distro with a package feed
#
#----------------------------------------------------------------------------------
# STANDARD NSLU2 DEFINITIONS
#----------------------------------------------------------------------------------
# The following must be set in the top level distro file:
#DISTRO_NAME
#DISTRO_VERSION
#DISTRO_FEED
#DISTRO_TYPE
# The following must also be set, they define the basic format of the build
# The definitions, where present, are the standard defaults.
#NSLU2_ARCH_TYPE = "b" (big-endian) or "l" (little-endian)
#NSLU2_INSTRUCTION_SET = "a" (ARM, 32 bit instructions) or "t" (Thumb, 16 bit instructions)
#NSLU2_OS = "g" (glibc - linx) or "u" (uclibc - linux-uclibc)
#NSLU2_INTERWORK = ":thumb-interwork" or ""
NSLU2_INTERWORK ?= ":thumb-interwork"
#USE_NLS = "no" or "yes"
USE_NLS ?= "no"
# These are default values, changed in the top level.
DISTRO_NAME ?= "nslu2-${NSLU2_ARCH_TYPE}${NSLU2_INSTRUCTION_SET}${NSLU2_OS}"
DISTRO_VERSION ?= "private"
DISTRO_FEED ?= "unstable"
DISTRO_TYPE ?= "alpha"
# The following must not be changed.
TARGET_FPU = "soft"
TARGET_OS = "${@['linux-uclibc', 'linux'][bb.data.getVar('NSLU2_OS', d, 1) == 'g']}"
TARGET_ARCH = "${@['arm', 'armeb'][bb.data.getVar('NSLU2_ARCH_TYPE', d, 1) == 'b']}"
# Select thumb-interwork and thumb
ARM_INSTRUCTION_SET = "${@[':thumb', ''][bb.data.getVar('NSLU2_INSTRUCTION_SET', d, 1) == 'a']}"
ARM_INTERWORK = "${NSLU2_INTERWORK}"
# glib-2.0 builds require USE_NLS to be overridden
USE_NLS_glib-2.0 = "yes"
INHERIT += "package_ipk debian"
# The value of NSLU2_BASE_DISTRO is added to the OVERRIDES after the DISTRO, this
# is set to 'openslug' to pick up the original openslug overrides. See
# conf/machine/nslu2.conf to find out how this works.
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}"
# pull in the frozen list of bbfiles - this sets BBFILES and this will override any
# setting in local.conf Since this depends on ${DISTRO} it doesn't actually do
# anything by default unless conf/distro/${DISTRO}-packages.conf exists.
include conf/distro/freeze.conf
#----------------------------------------------------------------------------------
# FEEDS
# The following lines define where on the internet UcSlugC looks for packages
# when downloading new packages or updating existing packages. Additional feeds
# (such as a local feed) can be defined in local.conf
#----------------------------------------------------------------------------------
# Add to the user's feeds from local.conf (there may be none)
#
# This must be specified in the top level distro file, because a feed for one
# distro will not work for another.
#FEED_URIS_append += "cross##http://ipkg.nslu2-linux.org/feeds/${DISTRO}/cross/${DISTRO_FEED}"
#FEED_URIS_append += "native##http://ipkg.nslu2-linux.org/feeds/${DISTRO}/native/${DISTRO_FEED}"
#
#FEED_URIS_append += "unstable_cross##http://ipkg.nslu2-linux.org/feeds/${DISTRO}/cross/unstable"
#FEED_URIS_append += "unstable_native##http://ipkg.nslu2-linux.org/feeds/${DISTRO}/native/unstable"
#----------------------------------------------------------------------------------
# FIRMWARE CONFIGURATION
#----------------------------------------------------------------------------------
# IMAGE BUILD OPTIONS
# -------------------
IMAGE_FSTYPES = "jffs2"
IMAGE_SEX = "${@['little-endian', 'big-endian'][bb.data.getVar('NSLU2_ARCH_TYPE', d, 1) == 'b']}"
OPENSLUG_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-openslug.txt')}"
EXTRA_IMAGECMD_jffs2 = "--pad --${IMAGE_SEX} --eraseblock=0x20000 -D ${OPENSLUG_DEVICE_TABLE}"
# CMDLINE* macros define the kernel command line. CMDLINE_DEBUG is provided
# to enable/disable debugging in the distro. Here noirqdebug is used to
# remove the messages about unhandled interrupts - people debugging interrupt
# issues in the kernel need to cancel this (set CMDLINE_DEBUG empty in local.conf)
CMDLINE_DEBUG = "noirqdebug"
# IMAGE_PREPROCESS_COMMAND is run before making the image. In UcSlugC the
# kernel image is removed from the root file system to recover the space used -
# UcSlugC is assumed to boot from a separate kernel image in flash (not in the
# root file system), if this is not the case the following must not be done!
IMAGE_PREPROCESS_COMMAND = "rm ${IMAGE_ROOTFS}/boot/zImage*;"
# Building a full image. If you add the following extra commands will be
# appended to the openslug-image build by classes/nslu2-jffs2-image.bbclass
# (note that you can, instead, simply add 'inherit nslu2-jffs2-image' to
# openslug-image.bb). If you do this you will need to find a source for the
# LinkSys software to be placed in the full image - 'RedBoot' (the boot loader),
# 'Trailer' (just a bunch of bytes to flag the image as valid) and 'SysConf'
# (actually just a block of unset data - you could modify this to pre-configure
# the SysConf partition of the image). If you own an NSLU2 then this data is
# already in the flash of the NSLU2 and you can download it (including new
# versions) from the LinkSys web site - the bbclass will output information
# about where to put the downloaded data.
#
#NOTE: you do not actually need the boot loader in normal use because it is
# *not* overwritten by a standard upslug upgrade, so you can make an image with
# just non-LinkSys software which can be flashed into the NSLU2.
#INHERIT += "nslu2-jffs2-image"
# EXTRA PACKAGES
# --------------
# UcSlugC builds an openslug-image with no extra packages - to add packages to the
# firmware copy this file (to make a new 'distro' configuration file) and change
# the definition below to include the requirements.
# NOTE: as built this system will *not* be able to boot off anything other than
# the flash file system ('turnup' will not work). You need to add the filesystem
# modules for your chosen root file system (and any others which will be used).
# See openslug.conf for a more full-featured system!
NSLU2_EXTRA_RDEPENDS ?= ""
NSLU2_EXTRA_DEPENDS ?= ""
#NSLU2_EXTRA_BBFILES above may also need to be set
# These depends define native utilities - they do not get put in the flash.
# upslug2 (in tmp/work/upslug2-native-*) is the program to write the NSLU2 flash
# Override this as desired - it makes no difference to the final image.
NSLU2_NATIVE_DEPENDS ?= "upslug2-native"
OPENSLUG_EXTRA_INSTALL = "${NSLU2_EXTRA_RDEPENDS}"
OPENSLUG_EXTRA_DEPENDS = "${NSLU2_EXTRA_DEPENDS} ${NSLU2_NATIVE_DEPENDS}"
#----------------------------------------------------------------------------------
# PACKAGE VERSION CONTROL
#----------------------------------------------------------------------------------
# Select the correct versions of the compiler tools (note that there
# is also some selection in machine/nslu2.conf)
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc:gcc-cross"
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}g++:gcc-cross"
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
# compiler/binary/library versions (unslung uses different ones so these
# cannot be in nslu2.conf)
PREFERRED_VERSION_binutils ?= "2.16"
PREFERRED_VERSION_binutils-cross ?= "2.16"
PREFERRED_VERSION_gcc-cross-initial ?= "3.4.4"
PREFERRED_VERSION_gcc-cross ?= "3.4.4"
PREFERRED_VERSION_gcc ?= "3.4.4"
PREFERRED_VERSION_glibc ?= "2.3.5+cvs20050627"
# Select the correct versions of the kernel and modules (these are the
# defaults, override in the conf/distro top-level distro file).
PREFERRED_PROVIDER_virtual/kernel ?= "nslu2-kernel"
PREFERRED_VERSION_nslu2-kernel ?= "2.6.14-rc5"
# Built-in ethernet modules
PREFERRED_PROVIDER_virtual/ixp-eth ?= "ixp400-eth"
PREFERRED_VERSION_ixp4xx-csr ?= "2.0"
PREFERRED_VERSION_ixp-osal ?= "2.0"
PREFERRED_VERSION_ixp400-eth ?= "1.4"
# Select the smallest provider of x11 libraries
PREFERRED_PROVIDER_x11 ?= "diet-x11"
CVSDATE_diet-x11 ?= "20051005"
|