summaryrefslogtreecommitdiff
path: root/conf/distro/ucslugc.conf
blob: bb383b8a663838e236c37a482e5b2c40f716faff (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
#@TYPE: Distribution
#@NAME: UcSlugC
#@DESCRIPTION: UcSlugC Linux Distribution for the NSLU2

#----------------------------------------------------------------------------------
# STANDARD UcSlugC DEFINITIONS
#----------------------------------------------------------------------------------
DISTRO_NAME = "UcSlugC"
DISTRO_VERSION = "1-beta"
DISTRO_TYPE ?= "beta"

TARGET_FPU = "soft"
TARGET_OS = "linux-uclibc"

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}"

# 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
# directory
UCSLUGC_EXTRA_BBFILES ?= ""

# pull in the frozen list of bbfiles - this sets BBFILES and this will override any
# setting in local.conf
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)
FEED_URIS_append += "cross##http://ipkg.nslu2-linux.org/feeds/ucslugc/cross/${DISTRO_VERSION}"
FEED_URIS_append += "native##http://ipkg.nslu2-linux.org/feeds/ucslugc/native/${DISTRO_VERSION}"

#
# Uncomment the following to get the unstable feeds
#FEED_URIS_append += "unstable_cross##http://ipkg.nslu2-linux.org/feeds/ucslugc/cross/unstable"
#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
# -------------------
IMAGE_FSTYPES = "jffs2"

OPENSLUG_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-openslug.txt')}"
EXTRA_IMAGECMD_jffs2 = "--pad --big-endian --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*;"

# 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!
UCLIBC_EXTRA_RDEPENDS ?= ""
UCLIBC_EXTRA_DEPENDS ?= ""
#UCLIBC_EXTRA_BBFILES above may also need to be set

OPENSLUG_EXTRA_INSTALL = "${UCLIBC_EXTRA_RDEPENDS}"
OPENSLUG_EXTRA_DEPENDS = "${UCLIBC_EXTRA_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"

# Select the correct versions of the kernel and modules
PREFERRED_PROVIDER_virtual/kernel ?= "openslug-kernel"
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
PREFERRED_VERSION_openslug-kernel ?= "2.6.12.2"

PREFERRED_VERSION_ixp4xx-csr ?= "1.4"
PREFERRED_VERSION_ixp425-eth ?= "1.1"