slugos: Replaced SLUGOS_IMAGENAME with SLUGOS_DISTRO, and localised the usage of...
authorRod Whitby <rod@whitby.id.au>
Thu, 8 Feb 2007 18:07:17 +0000 (18:07 +0000)
committerRod Whitby <rod@whitby.id.au>
Thu, 8 Feb 2007 18:07:17 +0000 (18:07 +0000)
conf/distro/debianslug.conf
conf/distro/include/slugos.inc
conf/distro/openslug.conf
conf/distro/ucslugc.conf
packages/images/openprotium-image.bb
packages/images/slugos-image.bb
packages/images/slugos-imagename.bb [deleted file]
packages/meta/slugos-native.bb
packages/meta/slugos-packages.bb

index b2eaa39..c70d862 100644 (file)
@@ -9,10 +9,7 @@ DISTRO_NAME = "DebianSlug"
 # DISTRO_VERSION = "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
 # DISTRO_FEED = "unstable"
 DISTRO_TYPE = "beta"
-SLUGOS_IMAGENAME = "debianslug"
-
-# debianslug builds a complete image (not just the parts)
-SLUGOS_FLASH_IMAGE = "1"
+SLUGOS_DISTRO = "debianslug"
 
 #----------------------------------------------------------------------------------
 # FIRMWARE CONFIGURATION
index 05bd571..7a1ae6b 100644 (file)
 #  g or u - glibc or uclibc libc implementation
 #         set TARGET_OS to match
 #
-# The following names are deprecated:
-#
-# openslug - the historical name of a canonical slugos-bag distro
-#            also the name of a standard slugos-bag distro with a package feed
-# ucslugc  - the historical (and obsolete) name of slugos-btu
-#            also the name of a standard slugos-btu distro with a package feed
-#
 
 #----------------------------------------------------------------------------------
 # STANDARD SLUGOS DEFINITIONS
@@ -42,6 +35,10 @@ DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
 # DISTRO_FEED ?= "${SLUGOS_VERSION}-${DISTRO_TYPE}"
 DISTRO_FEED ?= "unstable"
 
+SLUGOS_DISTRO ?= "slugos"
+
+IMAGE_BASENAME = "${SLUGOS_DISTRO}"
+
 # The following must also be set, they define the basic format of the build
 #
 #ARM_INSTRUCTION_SET "arm" or "thumb"
@@ -77,18 +74,6 @@ FULL_OPTIMIZATION = "-Os -fomit-frame-pointer -frename-registers \
        -fno-unroll-loops -fno-inline-functions \
        -fweb -funit-at-a-time"
 
-# packages/meta/slugos-image.bb generates a binary image of the root file system
-# with a name controlled by the following setting - it defaults to the top level
-# ${DISTRO_NAME} and this should always be correct, but it may be too specific (e.g.
-# if you change the DISTRO from one of the standard ones in a way which does not
-# change the generated image).
-SLUGOS_IMAGENAME ?= "${DISTRO_NAME}"
-
-# 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.
-# require conf/distro/include/freeze.conf
-
 #----------------------------------------------------------------------------------
 # FEEDS
 #  The FEED_URIS lines define where on the internet SlugOS looks for packages
@@ -122,20 +107,6 @@ SLUGOS_IMAGENAME ?= "${DISTRO_NAME}"
 # issues in the kernel need to cancel this (set CMDLINE_DEBUG empty in local.conf)
 CMDLINE_DEBUG = "noirqdebug"
 
-# Building a full image.  If you set SLUGOS_FLASH_IMAGE to "nslu2" a complete
-# 8MByte flash image will be built after the rootfs JFFS2 image.  Other options
-# may later be defined for other vendor-flashable image types.
-#
-# 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 - see
-# packages/meta/slugos-image.bb for information about where to put the downloaded
-# data.
-SLUGOS_FLASH_IMAGE ?= "no"
-
 # EXTRA PACKAGES
 # --------------
 # SlugOS builds an image with no extra packages - to add packages to the
@@ -165,8 +136,7 @@ PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}libc-for-gcc:glibc"
 PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
 PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}libc-for-gcc:glibc"
 
-# compiler/binary/library versions (unslung uses different ones so these
-# cannot be in ${MACHINE}.conf)
+# compiler/binary/library versions
 PREFERRED_VERSION_binutils ?= "2.16"
 PREFERRED_VERSION_binutils-cross ?= "2.16"
 PREFERRED_VERSION_gcc-cross-initial ?= "4.1.1"
index 176b2e0..40cf635 100644 (file)
@@ -9,10 +9,7 @@ DISTRO_NAME = "OpenSlug"
 # DISTRO_VERSION = "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
 # DISTRO_FEED = "unstable"
 DISTRO_TYPE = "beta"
-SLUGOS_IMAGENAME = "openslug"
-
-# openslug builds a complete image (not just the parts)
-SLUGOS_FLASH_IMAGE = "1"
+SLUGOS_DISTRO = "openslug"
 
 #----------------------------------------------------------------------------------
 # FIRMWARE CONFIGURATION
index 69e08af..8774a07 100644 (file)
@@ -7,7 +7,7 @@ DISTRO_NAME = "UcSlugC"
 # DISTRO_VERSION = "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
 # DISTRO_FEED = "unstable"
 DISTRO_TYPE = "beta"
-SLUGOS_IMAGENAME = "ucslugc"
+SLUGOS_DISTRO = "ucslugc"
 
 PREFERRED_VERSION_gcc-cross-initial = "3.4.4"
 PREFERRED_VERSION_gcc-cross = "3.4.4"
index faec266..472000f 100644 (file)
@@ -4,8 +4,6 @@ LICENSE = "MIT"
 PR = "r0"
 
 DEPENDS = "${MACHINE_TASK_PROVIDER}"
-# SLUGOS_IMAGENAME defines the name of the image to be build, if it
-# is not set this package will be skipped!
 EXTRA_IMAGECMD_jffs2 = "--pad --big-endian --eraseblock=0x10000 -D ${SLUGOS_DEVICE_TABLE}"
 IMAGE_LINGUAS = ""
 
index 3a3e5f4..4ac8335 100644 (file)
@@ -7,12 +7,10 @@ DESCRIPTION = "Generic SlugOS image"
 HOMEPAGE = "http://www.nslu2-linux.org"
 LICENSE = "MIT"
 PR = "r44"
+PROVIDES += "${SLUGOS_DISTRO}-image"
 
 COMPATIBLE_MACHINE = "nslu2"
 
-# 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_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DISTRO_VERSION}"
 IMAGE_FSTYPES = "jffs2"
 EXTRA_IMAGECMD_jffs2 += " -D ${SLUGOS_DEVICE_TABLE}"
@@ -34,23 +32,11 @@ SLUGOS_DEVICE_TABLE = "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device
 IMAGE_PREPROCESS_COMMAND += "rm ${IMAGE_ROOTFS}/boot/zImage*;"
 IMAGE_PREPROCESS_COMMAND += "install -c -m 644 ${SLUGOS_DEVICE_TABLE} ${IMAGE_ROOTFS}/etc/device_table;"
 
-# Building a full image.  If required do a post-process command which builds
-# 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}"
-
 # This hack removes '${MACHINE}' from the end of the arch.conf for ipk,
 # preventing _mach.ipk (with no byte sex) taking precedence over everything
 # else.
 ROOTFS_POSTPROCESS_COMMAND += "sed -i '$d' '${IMAGE_ROOTFS}/etc/ipkg/arch.conf';"
 
-# 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
 # SLUGOS_SUPPORT:        set here, see below, added to the image.
@@ -95,25 +81,15 @@ PACKAGE_INSTALL = "${RDEPENDS}"
 
 inherit image
 
-python () {
-    # Don't build slugos images unless the configuration is set up
-    # for an image build!
-    if bb.data.getVar("SLUGOS_IMAGENAME", 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 += "${@['', 'slugos_pack_image;'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == '1']}"
-PACK_IMAGE_DEPENDS += "${@['', 'slugimage-native nslu2-linksys-firmware ixp4xx-npe'][bb.data.getVar('SLUGOS_FLASH_IMAGE', d, 1) == '1']}"
 
+IMAGE_POSTPROCESS_COMMAND += "slugos_pack_image;"
+EXTRA_IMAGEDEPENDS += "slugimage-native nslu2-linksys-firmware ixp4xx-npe upslug2-native"
 NSLU2_SLUGIMAGE_ARGS ?= ""
 
 slugos_pack_image() {
@@ -168,6 +144,3 @@ slugos_pack_image() {
                -C ${DEPLOY_DIR_IMAGE} firmupgrade
        rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade
 }
-
-# upslug2 (in tmp/work/upslug2-native-*) is the program to write the NSLU2 flash
-IMAGE_TOOLS_nslu2 = "upslug2-native"
diff --git a/packages/images/slugos-imagename.bb b/packages/images/slugos-imagename.bb
deleted file mode 100644 (file)
index 61629d4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# This is an inglorious hack to provide a package to match
-# ${SLUGOS_IMAGENAME}-image
-LICENSE = "MIT"
-PN = "${SLUGOS_IMAGENAME}-image"
-PV = "0"
-PR = "r0"
-DEPENDS = "slugos-image"
-PACKAGES = ""
-INHIBIT_DEFAULT_DEPS = "1"
-
-SLUGOS_IMAGENAME ?= "slugos"
-COMPATIBLE_MACHINE = "nslu2"
-
-do_fetch() {
-}
-do_unpack() {
-}
-do_patch() {
-}
-do_configure() {
-}
-do_compile() {
-}
-do_install() {
-}
-do_stage() {
-}
-do_build() {
-}
index d8e8ee9..9a4e17d 100644 (file)
@@ -11,7 +11,7 @@ INHIBIT_DEFAULT_DEPS = "1"
 EXCLUDE_FROM_WORLD = "1"
 ALLOW_EMPTY = "1"
 PACKAGES = "${PN}"
-PROVIDES += "${SLUGOS_IMAGENAME}-native"
+PROVIDES += "${SLUGOS_DISTRO}-native"
 
 # Run-time only (RDEPENDS) stuff - no package explicitly provides
 # these targets.
index 01a79a8..507600d 100644 (file)
@@ -7,7 +7,7 @@ HOMEPAGE = "http://www.nslu2-linux.org"
 LICENSE = "MIT"
 PR = "r17"
 CONFLICTS = "db3"
-PROVIDES += "${SLUGOS_IMAGENAME}-packages"
+PROVIDES += "${SLUGOS_DISTRO}-packages"
 
 COMPATIBLE_MACHINE = "nslu2"
 EXCLUDE_FROM_WORLD = "1"