summaryrefslogtreecommitdiff
path: root/packages/meta/openslug-image.bb
blob: 63ee2cc2049c5ee17b91d8542a9c39b95d1052cf (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
# This describes a generic NSLU2 image, even though the bb file is
# called 'openslug-image.bb' the OpenSlug specific configuration is
# done in conf/distro/openslug.conf
#
PR = "r15"

IMAGE_BASENAME = "openslug"

IMAGE_LINGUAS = ""
# Setting USE_DEVFS prevents *any* entries being created initially
# in /dev
USE_DEVFS = "1"

# diff, cpio and find are required for reflash and turnup ram.
# Removing these probably leaves the system bootable, but standard
# openslug and ucslugc stuff won't work, so only take these out in
# very non-standard turnkey ucslugc builds.
#
# udev is the default way of handling devices, there is no guarantee
# that the static device table is completely correct (it is just
# known to be sufficient for boot.)
OPENSLUG_SUPPORT ?= "diffutils cpio findutils udev"

# NOTE: file system kernel modules are defined in openslug.conf
# (OPENSLUG_EXTRA_FILESYSTEMS, included in OPENSLUG_EXTRA_INSTALL)
# kernel-module-af-packet must be in the image for DHCP to work
OPENSLUG_KERNEL ?= "kernel-module-af-packet kernel-module-netconsole"
       
# The things explicitly included in the following lists are the
# absolute minimum to have any chance of a bootable system.
DEPENDS = "virtual/kernel base-files base-passwd \
        busybox dropbear hotplug-ng initscripts-openslug netbase \
        sysvinit tinylogin portmap \
        virtual/ixp-eth openslug-init \
	module-init-tools modutils-initscripts \
        ipkg-collateral ipkg ipkg-link \
	${OPENSLUG_SUPPORT} \
        ${OPENSLUG_EXTRA_DEPENDS}"

IPKG_INSTALL = "base-files base-passwd \
        busybox dropbear hotplug-ng initscripts-openslug netbase \
        update-modules sysvinit tinylogin portmap \
        ${PREFERRED_PROVIDER_virtual/ixp-eth} openslug-init \
	module-init-tools modutils-initscripts \
        ipkg-collateral ipkg ipkg-link \
	${OPENSLUG_SUPPORT} \
	${OPENSLUG_KERNEL} \
	${OPENSLUG_EXTRA_INSTALL}"

inherit image_ipk

python () {
	# Don't build openslug images unless we're targeting an nslu2 or nas100d
	mach = bb.data.getVar("MACHINE", d, 1)
	if mach != 'nslu2' and mach != 'nas100d':
		raise bb.parse.SkipPackage("OpenSlug only builds for the Linksys NSLU2")
}
LICENSE = MIT