Remove DISTRO_TYPE, replacing with IMAGE_FEATURES. Documentation is in local.conf.sample

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1053 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2006-12-20 00:00:03 +00:00
parent 50bbb7742c
commit f5b38f9db0
11 changed files with 127 additions and 83 deletions

View File

@ -28,12 +28,21 @@ DISTRO = "poky"
# For bleeding edge / experimental / unstable package versions # For bleeding edge / experimental / unstable package versions
# DISTRO = "poky-bleeding" # DISTRO = "poky-bleeding"
# DISTRO_TYPE determines the type of images that will be built # IMAGE_FEATURES configuration of the generated images
# "release" - create a streamlined and secure image # (Some of these are automatically added to certain image types)
# "debug" - enable easier ssh access # "dev-pkgs" - add -dev packages for all installed packages
# - include the devtools and testapps packages # (useful if you want to develop against libs in the image)
# "dbg-pkgs" - add -dbg packages for all installed packages
# (adds symbol information for debugging/profiling)
# "apps-core" - core applications
# "apps-pda" - add PDA application suite (contacts, dates, etc.)
# "dev-tools" - add development tools (gcc, make, pkgconfig etc.)
# "dbg-tools" - add debugging tools (gdb, strace, oprofile, etc.)
# "test-tools" - add useful testing tools (ts_print, aplay, arecord etc.)
# "debug-tweaks" - make an image for suitable of development
# e.g. ssh root access has a blank password
DISTRO_TYPE = "debug" IMAGE_FEATURES = "dbg-tools test-tools debug-tweaks"
# A list of packaging systems used in generated images # A list of packaging systems used in generated images
# The first package type listed will be used for rootfs generation # The first package type listed will be used for rootfs generation

View File

@ -41,12 +41,17 @@ def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
else: else:
return falsevalue return falsevalue
def base_contains(variable, checkvalue, truevalue, falsevalue, d): def base_contains(variable, checkvalues, truevalue, falsevalue, d):
import bb import bb
if bb.data.getVar(variable,d,1).find(checkvalue) != -1: matches = 0
return truevalue if type(checkvalues).__name__ == "str":
else: checkvalues = [checkvalues]
return falsevalue for value in checkvalues:
if bb.data.getVar(variable,d,1).find(value) != -1:
matches = matches + 1
if matches == len(checkvalues):
return truevalue
return falsevalue
def base_both_contain(variable1, variable2, checkvalue, d): def base_both_contain(variable1, variable2, checkvalue, d):
import bb import bb

View File

@ -5,8 +5,6 @@ DISTRO = "poky"
DISTRO_NAME = "OpenedHand Linux (Poky)" DISTRO_NAME = "OpenedHand Linux (Poky)"
DISTRO_VERSION = "0.0-snapshot-${DATE}" DISTRO_VERSION = "0.0-snapshot-${DATE}"
DISTRO_TYPE ?= "release"
MAINTAINER = "OpenedHand <poky@openedhand.com>" MAINTAINER = "OpenedHand <poky@openedhand.com>"
PACKAGE_CLASSES ?= "package_ipk" PACKAGE_CLASSES ?= "package_ipk"
@ -186,3 +184,29 @@ DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi"
DISTRO_FEATURES_cmx270 = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost" DISTRO_FEATURES_cmx270 = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost"
DISTRO_EXTRA_RDEPENDS_qemuarm += "qemu-distcc" DISTRO_EXTRA_RDEPENDS_qemuarm += "qemu-distcc"
DISTRO_EXTRA_RDEPENDS_qemux86 += "qemu-distcc" DISTRO_EXTRA_RDEPENDS_qemux86 += "qemu-distcc"
IMAGE_FEATURES ?= ""
DISTRO_TASKS = "\
task-oh-boot \
${@base_contains("IMAGE_FEATURES", "dbg-pkgs", "task-oh-boot-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", "dev-pkgs", "task-oh-boot-dev", "",d)} \
task-oh-boot-extras \
${@base_contains("IMAGE_FEATURES", "dbg-pkgs", "task-oh-boot-extras-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", "dev-pkgs", "task-oh-boot-extras-dev", "",d)} \
${@base_contains("IMAGE_FEATURES", "apps-core", "task-oh-base", "",d)} \
${@base_contains("IMAGE_FEATURES", ["apps-core", "dbg-pkgs"], "task-oh-base-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", ["apps-core", "dev-pkgs"], "task-oh-base-dev", "",d)} \
${@base_contains("IMAGE_FEATURES", "apps-pda", "task-oh-standard", "",d)} \
${@base_contains("IMAGE_FEATURES", ["apps-pda", "dbg-pkgs"], "task-oh-standard-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", ["apps-pda", "dev-pkgs"], "task-oh-standard-dev", "",d)} \
${@base_contains("IMAGE_FEATURES", "dev-tools", "task-oh-sdk", "",d)} \
${@base_contains("IMAGE_FEATURES", ["dev-tools", "dbg-pkgs"], "task-oh-sdk-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", ["dev-tools", "dev-pkgs"], "task-oh-sdk-dev", "",d)} \
${@base_contains("IMAGE_FEATURES", "dbg-tools", "task-oh-devtools", "",d)} \
${@base_contains("IMAGE_FEATURES", ["dbg-tools", "dbg-pkgs"], "task-oh-devtools-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", ["dbg-tools", "dev-pkgs"], "task-oh-devtools-dev", "",d)} \
${@base_contains("IMAGE_FEATURES", "test-tools", "task-oh-testapps", "",d)} \
${@base_contains("IMAGE_FEATURES", ["test-tools", "dbg-pkgs"], "task-oh-testapps-dbg", "",d)} \
${@base_contains("IMAGE_FEATURES", ["test-tools", "dev-pkgs"], "task-oh-testapps-dev", "",d)} \
"

View File

@ -25,6 +25,8 @@ SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp" BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"' EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
DISTRO_TYPE = "${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)} \
do_configure_prepend() { do_configure_prepend() {
if [ "x${DISTRO}" != "xfamiliar" -a "${DISTRO_TYPE}" == "debug" ]; then if [ "x${DISTRO}" != "xfamiliar" -a "${DISTRO_TYPE}" == "debug" ]; then
oenote "WARNING: applying allow-nopw.patch which allows password-less logins!" oenote "WARNING: applying allow-nopw.patch which allows password-less logins!"

View File

@ -4,7 +4,7 @@ export IMAGE_BASENAME = "oh-image-base"
DEPENDS = "task-oh" DEPENDS = "task-oh"
RDEPENDS = "task-oh-boot task-oh-boot-extras" RDEPENDS = "${DISTRO_TASKS}"
export PACKAGE_INSTALL = "${RDEPENDS}" export PACKAGE_INSTALL = "${RDEPENDS}"

View File

@ -2,12 +2,11 @@ PR = "r0"
export IMAGE_BASENAME = "oh-image-core" export IMAGE_BASENAME = "oh-image-core"
IMAGE_FEATURES += "apps-core"
DEPENDS = "task-oh" DEPENDS = "task-oh"
RDEPENDS = "\ RDEPENDS = "${DISTRO_TASKS}"
task-oh-boot \
task-oh-boot-extras \
task-oh-base "
export PACKAGE_INSTALL = "${RDEPENDS}" export PACKAGE_INSTALL = "${RDEPENDS}"

View File

@ -2,15 +2,11 @@ PR = "r10"
export IMAGE_BASENAME = "oh-image-pda" export IMAGE_BASENAME = "oh-image-pda"
IMAGE_FEATURES += "apps-core apps-pda"
DEPENDS = "task-oh" DEPENDS = "task-oh"
RDEPENDS = "\ RDEPENDS = "${DISTRO_TASKS}"
task-oh-boot \
task-oh-boot-extras \
task-oh-base \
task-oh-standard \
${@base_conditional("DISTRO_TYPE", "debug", "task-oh-devtools", "",d)} \
${@base_conditional("DISTRO_TYPE", "debug", "task-oh-testapps", "",d)} "
export PACKAGE_INSTALL = "${RDEPENDS}" export PACKAGE_INSTALL = "${RDEPENDS}"

View File

@ -2,20 +2,13 @@ PR = "r9"
export IMAGE_BASENAME = "oh-image-sdk" export IMAGE_BASENAME = "oh-image-sdk"
IMAGE_FEATURES += "apps-core apps-pda dev-tools dev-pkgs dbg-pkgs"
DEPENDS = "\ DEPENDS = "\
task-oh \ task-oh \
task-oh-sdk" task-oh-sdk"
RDEPENDS = "\ RDEPENDS = "${DISTRO_TASKS}"
task-oh-boot \
task-oh-boot-extras \
task-oh-base \
task-oh-standard \
task-oh-devtools \
task-oh-testapps \
task-oh-sdk \
task-oh-sdk-base"
export PACKAGE_INSTALL = "${RDEPENDS}" export PACKAGE_INSTALL = "${RDEPENDS}"
inherit image inherit image

View File

@ -27,7 +27,7 @@ CMDLINE_CON = "console=ttyS0,115200n8 console=tty1 noinitrd"
CMDLINE_ROOT = "root=/dev/mtdblock2 rootfstype=jffs2" CMDLINE_ROOT = "root=/dev/mtdblock2 rootfstype=jffs2"
CMDLINE_ROOT_spitz = "root=/dev/hda1 rootfstype=ext3 rootdelay=1 rw" CMDLINE_ROOT_spitz = "root=/dev/hda1 rootfstype=ext3 rootdelay=1 rw"
CMDLINE_OTHER = "dyntick=enable" CMDLINE_OTHER = "dyntick=enable"
CMDLINE_DEBUG = '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}' CMDLINE_DEBUG = '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "quiet", d)}'
############################################################## ##############################################################
# Configure memory/ramdisk split for collie # Configure memory/ramdisk split for collie

View File

@ -1,10 +1,13 @@
DESCRIPTON = "Software Development Tasks for OpenedHand Poky" DESCRIPTON = "Software Development Tasks for OpenedHand Poky"
PR = "r11" PR = "r12"
DEPENDS = "task-oh" DEPENDS = "task-oh"
ALLOW_EMPTY = "1" ALLOW_EMPTY = "1"
PACKAGEFUNCS =+ 'generate_sdk_pkgs' #PACKAGEFUNCS =+ 'generate_sdk_pkgs'
PACKAGES = "task-oh-sdk" PACKAGES = "\
task-oh-sdk \
task-oh-sdk-dbg \
task-oh-sdk-dev"
RDEPENDS_task-oh-sdk = "\ RDEPENDS_task-oh-sdk = "\
autoconf \ autoconf \
@ -19,43 +22,43 @@ RDEPENDS_task-oh-sdk = "\
pkgconfig \ pkgconfig \
distcc" distcc"
python generate_sdk_pkgs () { #python generate_sdk_pkgs () {
ohpkgs = read_pkgdata('task-oh', d)['PACKAGES'] # ohpkgs = read_pkgdata('task-oh', d)['PACKAGES']
pkgs = bb.data.getVar('PACKAGES', d, 1).split() # pkgs = bb.data.getVar('PACKAGES', d, 1).split()
for pkg in ohpkgs.split(): # for pkg in ohpkgs.split():
newpkg = pkg.replace('task-oh', 'task-oh-sdk') # newpkg = pkg.replace('task-oh', 'task-oh-sdk')
#
# for each of the task packages, add a corresponding sdk task # # for each of the task packages, add a corresponding sdk task
pkgs.append(newpkg) # pkgs.append(newpkg)
#
# for each sdk task, take the rdepends of the non-sdk task, and turn # # for each sdk task, take the rdepends of the non-sdk task, and turn
# that into rrecommends upon the -dev versions of those, not unlike # # that into rrecommends upon the -dev versions of those, not unlike
# the package depchain code # # the package depchain code
spkgdata = read_subpkgdata(pkg, d) # spkgdata = read_subpkgdata(pkg, d)
#
rdepends = explode_deps(spkgdata.get('RDEPENDS_%s' % pkg) or '') # rdepends = explode_deps(spkgdata.get('RDEPENDS_%s' % pkg) or '')
rreclist = [] # rreclist = []
#
for depend in rdepends: # for depend in rdepends:
split_depend = depend.split(' (') # split_depend = depend.split(' (')
name = split_depend[0].strip() # name = split_depend[0].strip()
if packaged('%s-dev' % name, d): # if packaged('%s-dev' % name, d):
rreclist.append('%s-dev' % name) # rreclist.append('%s-dev' % name)
else: # else:
deppkgdata = read_subpkgdata(name, d) # deppkgdata = read_subpkgdata(name, d)
rdepends2 = explode_deps(deppkgdata.get('RDEPENDS_%s' % name) or '') # rdepends2 = explode_deps(deppkgdata.get('RDEPENDS_%s' % name) or '')
for depend in rdepends2: # for depend in rdepends2:
split_depend = depend.split(' (') # split_depend = depend.split(' (')
name = split_depend[0].strip() # name = split_depend[0].strip()
if packaged('%s-dev' % name, d): # if packaged('%s-dev' % name, d):
rreclist.append('%s-dev' % name) # rreclist.append('%s-dev' % name)
#
oldrrec = bb.data.getVar('RRECOMMENDS_%s' % newpkg, d) or '' # oldrrec = bb.data.getVar('RRECOMMENDS_%s' % newpkg, d) or ''
bb.data.setVar('RRECOMMENDS_%s' % newpkg, oldrrec + ' ' + ' '.join(rreclist), d) # bb.data.setVar('RRECOMMENDS_%s' % newpkg, oldrrec + ' ' + ' '.join(rreclist), d)
# bb.note('RRECOMMENDS_%s = "%s"' % (newpkg, bb.data.getVar('RRECOMMENDS_%s' % newpkg, d))) # # bb.note('RRECOMMENDS_%s = "%s"' % (newpkg, bb.data.getVar('RRECOMMENDS_%s' % newpkg, d)))
#
# bb.note('pkgs is %s' % pkgs) # # bb.note('pkgs is %s' % pkgs)
bb.data.setVar('PACKAGES', ' '.join(pkgs), d) # bb.data.setVar('PACKAGES', ' '.join(pkgs), d)
} #}
#
PACKAGES_DYNAMIC = "task-oh-sdk-*" #PACKAGES_DYNAMIC = "task-oh-sdk-*"

View File

@ -1,14 +1,28 @@
DESCRIPTION = "Tasks for OpenedHand Poky" pDESCRIPTION = "Tasks for OpenedHand Poky"
PR = "r43" PR = "r44"
PACKAGES = "\ PACKAGES = "\
task-oh-base \ task-oh-base \
task-oh-base-dbg \
task-oh-base-dev \
task-oh-boot \ task-oh-boot \
task-oh-boot-dbg \
task-oh-boot-dev \
task-oh-standard \ task-oh-standard \
task-oh-standard-dbg \
task-oh-standard-dev \
task-oh-boot-extras \ task-oh-boot-extras \
task-oh-boot-extras-dbg \
task-oh-boot-extras-dev \
task-oh-boot-min-extras \ task-oh-boot-min-extras \
task-oh-boot-min-extras-dbg \
task-oh-boot-min-extras-dev \
task-oh-devtools \ task-oh-devtools \
task-oh-testapps" task-oh-devtools-dbg \
task-oh-devtools-dev \
task-oh-testapps \
task-oh-testapps-dbg \
task-oh-testapps-dev"
XSERVER ?= "xserver-kdrive-fbdev" XSERVER ?= "xserver-kdrive-fbdev"
@ -29,7 +43,6 @@ RDEPENDS_task-oh-boot = "\
ipkg \ ipkg \
update-alternatives \ update-alternatives \
module-init-tools-depmod" module-init-tools-depmod"
# linux-hotplug \
RDEPENDS_task-oh-boot-extras = "\ RDEPENDS_task-oh-boot-extras = "\
task-base" task-base"