summaryrefslogtreecommitdiff
path: root/packages/meta
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2006-01-12 04:08:13 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-12 04:08:13 +0000
commit3b2516ec9080182a8dcf7fcbd39b36db9cf55139 (patch)
tree21c1073994381acea418257a4a5f55f3092f0bcf /packages/meta
parent685b95cae8516570c7e445910b026b576d281808 (diff)
slugos: extract common parts of machine conf in slugos.conf
- conf/machine/include/ixp4xx.conf now provides generic configuration for nslu2 and nas100d (+ future ixp4xx based machines), the kernel image fixup is made generic, all kernel packages have a generic name. ipkg search rules changed to look for the generic packages too.
Diffstat (limited to 'packages/meta')
-rw-r--r--packages/meta/slugos-image.bb97
1 files changed, 53 insertions, 44 deletions
diff --git a/packages/meta/slugos-image.bb b/packages/meta/slugos-image.bb
index b80b6f7b3a..fec417af95 100644
--- a/packages/meta/slugos-image.bb
+++ b/packages/meta/slugos-image.bb
@@ -4,18 +4,19 @@
# conf/distro/slugos.conf to get the standard settings).
#
LICENSE = "MIT"
-PR = "r18"
+PR = "r19"
PROVIDES += "${SLUGOS_IMAGENAME}-image"
# SLUGOS_IMAGENAME defines the name of the image to be build, if it
# is not set this package will be skipped!
IMAGE_BASENAME = "${SLUGOS_IMAGENAME}"
IMAGE_FSTYPES = "jffs2"
+EXTRA_IMAGECMD_jffs2 = "--pad --${SLUGOS_IMAGESEX} --eraseblock=0x20000 -D ${SLUGOS_DEVICE_TABLE}"
+IMAGE_LINGUAS = ""
-# Kernel suffix - 'nslu2be' or 'nslu2le' for a truely generic image,
-# override in the DISTRO configuration if patches or defconfig are
-# changed for the DISTRO!
-N2K_SUFFIX ?= "nslu2${ARCH_BYTE_SEX}"
+# Setting USE_DEVFS prevents *any* entries being created initially
+# in /dev
+USE_DEVFS = "1"
#FIXME: this is historical, there should be a minimal slugos device table and
# this stuff shouldn't be in here at all (put it in slugos-image.bb!)
@@ -23,7 +24,6 @@ N2K_SUFFIX ?= "nslu2${ARCH_BYTE_SEX}"
# just select a different image .bb file (e.g. slugos-ramdisk-image.bb) to
# build with different options.
SLUGOS_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-slugos.txt')}"
-EXTRA_IMAGECMD_jffs2 = "--pad --${SLUGOS_IMAGESEX} --eraseblock=0x20000 -D ${SLUGOS_DEVICE_TABLE}"
# IMAGE_PREPROCESS_COMMAND is run before making the image. In SlugOS the
# kernel image is removed from the root file system to recover the space used -
@@ -32,44 +32,16 @@ EXTRA_IMAGECMD_jffs2 = "--pad --${SLUGOS_IMAGESEX} --eraseblock=0x20000 -D ${SLU
IMAGE_PREPROCESS_COMMAND = "rm ${IMAGE_ROOTFS}/boot/zImage*;"
# Building a full image. If required do a post-process command which builds
-# the full image using slugimage.
-#
-#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. Because
-# LinkSys have made "EraseAll" available, however, (this does overwrite RedBoot)
-# it is a bad idea to produce flash images without a valid RedBoot - that allows
-# an innocent user upgrade attempt to instantly brick the NSLU2.
-NSLU2_SLUGIMAGE_ARGS ?= ""
+# the full flash image using slugimage. At present this only works for NSLU2 images.
+PACK_IMAGE = ""
+IMAGE_POSTPROCESS_COMMAND += "${PACK_IMAGE}"
+PACK_IMAGE_DEPENDS = ""
+EXTRA_IMAGEDEPENDS += "${PACK_IMAGE_DEPENDS}"
-nslu2_pack_image() {
- if test '${SLUGOS_FLASH_IMAGE}' = yes
- then
- install -d ${DEPLOY_DIR_IMAGE}/slug
- install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \
- ${STAGING_LIBDIR}/nslu2-binaries/Trailer \
- ${STAGING_LIBDIR}/nslu2-binaries/SysConf \
- ${DEPLOY_DIR_IMAGE}/slug/
- install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-${N2K_SUFFIX} \
- ${DEPLOY_DIR_IMAGE}/slug/vmlinuz
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
- ${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2
- cd ${DEPLOY_DIR_IMAGE}/slug
- slugimage -p -b RedBoot -s SysConf -r Ramdisk:1,Flashdisk:flashdisk.jffs2 -t \
- Trailer -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flashdisk.img \
- ${NSLU2_SLUGIMAGE_ARGS}
- rm -rf ${DEPLOY_DIR_IMAGE}/slug
- fi
-}
-
-IMAGE_POSTPROCESS_COMMAND += "nslu2_pack_image;"
-
-DEPENDS = "${@['', 'slugimage-native nslu2-linksys-firmware'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == 'yes']} virtual/kernel virtual/ixp-eth"
-
-IMAGE_LINGUAS = ""
-# Setting USE_DEVFS prevents *any* entries being created initially
-# in /dev
-USE_DEVFS = "1"
+# These depends define native utilities - they do not get put in the flash and
+# are not required to build the image.
+IMAGE_TOOLS = ""
+EXTRA_IMAGEDEPENDS += "${IMAGE_TOOLS}"
# CONFIG:
# SLUGOS_EXTRA_RDEPENDS: set in conf, things to add to the image
@@ -114,6 +86,43 @@ inherit image_ipk
python () {
# Don't build slugos images unless the configuration is set up
# for an image build!
- if bb.data.getVar("SLUGOS_IMAGENAME", d, 1) == '':
+ if bb.data.getVar("SLUGOS_IMAGENAME", d, 1) == '' or bb.data.getVar("SLUGOS_IMAGESEX", d, 1) == '':
raise bb.parse.SkipPackage("absent or broken SlugOS configuration")
}
+
+#--------------------------------------------------------------------------------
+# NSLU2 specific
+#
+#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. Because
+# LinkSys have made "EraseAll" available, however, (this does overwrite RedBoot)
+# it is a bad idea to produce flash images without a valid RedBoot - that allows
+# an innocent user upgrade attempt to instantly brick the NSLU2.
+PACK_IMAGE_nslu2 = "nslu2_pack_image;"
+PACK_IMAGE_DEPENDS_nslu2 = "${@['', 'slugimage-native nslu2-linksys-firmware'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == 'yes']}"
+
+NSLU2_SLUGIMAGE_ARGS ?= ""
+
+nslu2_pack_image() {
+ if test '${SLUGOS_FLASH_IMAGE}' = yes
+ then
+ install -d ${DEPLOY_DIR_IMAGE}/slug
+ install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \
+ ${STAGING_LIBDIR}/nslu2-binaries/Trailer \
+ ${STAGING_LIBDIR}/nslu2-binaries/SysConf \
+ ${DEPLOY_DIR_IMAGE}/slug/
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-${IXP4XX_SUFFIX} \
+ ${DEPLOY_DIR_IMAGE}/slug/vmlinuz
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+ ${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2
+ cd ${DEPLOY_DIR_IMAGE}/slug
+ slugimage -p -b RedBoot -s SysConf -r Ramdisk:1,Flashdisk:flashdisk.jffs2 -t \
+ Trailer -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flashdisk.img \
+ ${NSLU2_SLUGIMAGE_ARGS}
+ rm -rf ${DEPLOY_DIR_IMAGE}/slug
+ fi
+}
+
+# upslug2 (in tmp/work/upslug2-native-*) is the program to write the NSLU2 flash
+IMAGE_TOOLS_nslu2 = "upslug2-native"