summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2004-07-04 15:24:14 +0000
committerPhil Blundell <philb@gnu.org>2004-07-04 15:24:14 +0000
commitfd62b55281f1493f24bd4dd0a9c6a2c078390221 (patch)
treef7a22963645a5c1ad9f49733b4cfe2289f78ed0e
parentf8790318128135669c3d7fe5aa2a3a4ab8c0f814 (diff)
rationalise module handling in kernel packages and MACHINE.conf files.
changed module naming to use - rather than + as replacement for underscore. ignore errors from update-modules in postinst, in case modutils-collateral is in use. add postrm scripts. BKrev: 40e8211eLQcjqqTncCe6a_iEukTM_g
-rw-r--r--classes/kernel.oeclass15
-rw-r--r--classes/linux_modules.oeclass0
-rw-r--r--classes/package.oeclass14
-rw-r--r--conf/collie.conf15
-rw-r--r--conf/h3600.conf72
-rw-r--r--conf/h3900.conf6
-rw-r--r--conf/handheld-common.conf6
-rw-r--r--conf/ipaq-common.conf0
-rw-r--r--conf/poodle.conf15
-rw-r--r--conf/zaurus-pxa.conf3
-rw-r--r--linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.oe4
-rw-r--r--meta/task-bootstrap.oe2
12 files changed, 137 insertions, 15 deletions
diff --git a/classes/kernel.oeclass b/classes/kernel.oeclass
index 35884000a3..a0b26e33b9 100644
--- a/classes/kernel.oeclass
+++ b/classes/kernel.oeclass
@@ -85,10 +85,14 @@ if [ -n "$D" ]; then
${HOST_PREFIX}depmod -A -b $D -F $D/boot/System.map-${PV} $VER
else
depmod -A
- update-modules
+ update-modules || true
fi
}
+pkg_postrm_modules () {
+update-modules || true
+}
+
autoload_postinst_fragment() {
if [ x"$D" = "x" ]; then
modprobe %s
@@ -184,7 +188,7 @@ python populate_packages_prepend () {
m = re.match(pattern, os.path.basename(i))
if not m:
continue
- on = m.group(1).lower().replace('_', '+').replace('@', '+')
+ on = legitimize_package_name(m.group(1))
dependencies.append(format % on)
return dependencies
return []
@@ -219,7 +223,7 @@ python populate_packages_prepend () {
f.close()
files = oe.data.getVar('FILES_%s' % pkg, d, 1)
- files = "%s %s/etc/modutils/%s %s/etc/modutils/%s.conf" % (files, dvar, basename, dvar, basename)
+ files = "%s /etc/modutils/%s /etc/modutils/%s.conf" % (files, basename, basename)
oe.data.setVar('FILES_%s' % pkg, files, d)
if vals.has_key("description"):
@@ -239,7 +243,8 @@ python populate_packages_prepend () {
module_pattern = 'kernel-module-%s'
postinst = oe.data.getVar('pkg_postinst_modules', d, 1)
- do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, recursive=True, hook=frob_metadata, extra_depends='update-modules')
+ postrm = oe.data.getVar('pkg_postrm_modules', d, 1)
+ do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules')
import re, os
metapkg = "kernel-modules"
@@ -248,7 +253,7 @@ python populate_packages_prepend () {
blacklist = []
for l in module_deps.values():
for i in l:
- pkg = module_pattern % re.match(module_regex, os.path.basename(i)).group(1).lower().replace('_', '+').replace('@', '+')
+ pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
blacklist.append(pkg)
metapkg_rdepends = []
packages = oe.data.getVar('PACKAGES', d, 1).split()
diff --git a/classes/linux_modules.oeclass b/classes/linux_modules.oeclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/linux_modules.oeclass
diff --git a/classes/package.oeclass b/classes/package.oeclass
index 1c9cc53cbb..cde4ef6e5c 100644
--- a/classes/package.oeclass
+++ b/classes/package.oeclass
@@ -1,4 +1,7 @@
-def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None):
+def legitimize_package_name(s):
+ return s.lower().replace('_', '-').replace('@', '+')
+
+def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None):
import os, os.path, oe
dvar = oe.data.getVar('D', d, 1)
@@ -13,6 +16,8 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
if postinst:
postinst = '#!/bin/sh\n' + postinst
+ if postrm:
+ postrm = '#!/bin/sh\n' + postrm
if not recursive:
objs = os.listdir(dvar + root)
else:
@@ -34,7 +39,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
f = os.path.join(dvar + root, o)
if not stat.S_ISREG(os.lstat(f).st_mode):
continue
- on = m.group(1).lower().replace('_', '+').replace('@', '+')
+ on = legitimize_package_name(m.group(1))
pkg = output_pattern % on
if not pkg in packages:
packages.append(pkg)
@@ -47,6 +52,8 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
oe.data.setVar('DESCRIPTION_' + pkg, description % on, d)
if postinst:
oe.data.setVar('pkg_postinst_' + pkg, postinst, d)
+ if postrm:
+ oe.data.setVar('pkg_postrm_' + pkg, postrm, d)
else:
oldfiles = oe.data.getVar('FILES_' + pkg, d, 1)
if not oldfiles:
@@ -220,6 +227,7 @@ python populate_packages () {
write_if_exists(f, pkg, 'ALLOW_EMPTY')
write_if_exists(f, pkg, 'FILES')
write_if_exists(f, pkg, 'pkg_postinst')
+ write_if_exists(f, pkg, 'pkg_postrm')
f.close()
oe.build.exec_func("read_subpackage_metadata", d)
}
@@ -399,7 +407,7 @@ python package_do_split_locales() {
mainpkg = packages[0]
for l in locales:
- ln = l.lower().replace('_', '+').replace('@', '+')
+ ln = legitimize_package_name(l)
pkg = pn + '-locale-' + ln
packages.append(pkg)
oe.data.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l), d)
diff --git a/conf/collie.conf b/conf/collie.conf
index e69de29bb2..198a9c11e1 100644
--- a/conf/collie.conf
+++ b/conf/collie.conf
@@ -0,0 +1,15 @@
+TARGET_ARCH = "arm"
+IPKG_ARCHS = "all arm ${MACHINE}"
+PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+PREFERRED_PROVIDER_virtual/kernel = "openzaurus-sa"
+BOOTSTRAP_EXTRA_DEPENDS = "virtual/kernel modutils-collateral hostap-modules orinoco-modules sharp-sdmmc-support"
+BOOTSTRAP_EXTRA_RDEPENDS = "kernel modutils-collateral hostap-modules orinoco-modules sharp-sdmmc-support \
+kernel-module-devinfo kernel-module-gpio kernel-module-ip-gre \
+kernel-module-ipip kernel-module-irnet kernel-module-net-fd kernel-module-registers kernel-module-sa1100-bi \
+kernel-module-usbdcore kernel-module-usbdmonitor "
+
+EXTRA_IMAGECMD_jffs2 = "--pad=14680064 --little-endian --eraseblock=0x20000 -n"
+
+include conf/handheld-common.conf
+include conf/tune-strongarm.conf
+
diff --git a/conf/h3600.conf b/conf/h3600.conf
index e69de29bb2..e9e302f9ad 100644
--- a/conf/h3600.conf
+++ b/conf/h3600.conf
@@ -0,0 +1,72 @@
+TARGET_ARCH = "arm"
+IPKG_ARCHS = "all arm ipaqsa h3600"
+PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+PREFERRED_PROVIDER_virtual/kernel = "handhelds-sa"
+EXTRA_IMAGECMD_h3600 = "-e 0x40000 -p"
+BOOTSTRAP_EXTRA_DEPENDS = "handhelds-sa"
+BOOTSTRAP_EXTRA_RDEPENDS = "kernel ${@linux_module_packages('${H3600_MODULES}')}"
+
+H3600_MODULES = "\
+dma-backpaq \
+h3600-asic \
+h3600-backpaq-accel \
+h3600-backpaq-camera \
+h3600-backpaq-fpga \
+h3600-backpaq-gasgauge \
+h3600-backpaq-sram \
+h3600-backpaq \
+h3600-generic-sleeve \
+h3600-micro \
+h3600-microkbd \
+h3600-stowaway \
+h3600-ts \
+h3600-uda1341 \
+hid \
+hwtimer \
+input \
+ip-gre \
+ip-tables \
+ipaq-hal \
+ipaq-mtd-asset \
+ipaq-sleeve \
+ipip \
+irda \
+irlan \
+irnet \
+irport \
+irtty \
+l3-backpaq \
+loop \
+nfs \
+nvrd \
+pcmcia-core \
+pcnet-cs \
+ppp-async \
+ppp-deflate \
+ppp-generic \
+ppp-mppe \
+sa1100-cs \
+sa1100-ir \
+sa1100-wdt \
+sa1100-audio \
+sa1100-rtc \
+sa1100usb-core \
+sd-mod \
+serial-cs \
+serial-h3800 \
+serial \
+serio \
+serport \
+sunrpc \
+tun \
+uda1341 \
+uinput \
+usb-char \
+usb-eth \
+usb-storage \
+usbcore"
+
+include conf/ipaq-common.conf
+include conf/handheld-common.conf
+include conf/tune-strongarm.conf
+
diff --git a/conf/h3900.conf b/conf/h3900.conf
index f2fc8f2805..1e1a611d38 100644
--- a/conf/h3900.conf
+++ b/conf/h3900.conf
@@ -4,9 +4,11 @@ PREFERRED_PROVIDER_xserver = "xserver-kdrive"
PREFERRED_PROVIDER_virtual/kernel = "handhelds-pxa"
EXTRA_IMAGECMD_h3900 = "-e 0x40000 -p"
BOOTSTRAP_EXTRA_DEPENDS = "handhelds-pxa"
-BOOTSTRAP_EXTRA_RDEPENDS = "kernel kernel-modules"
+BOOTSTRAP_EXTRA_RDEPENDS = "kernel ${@linux_module_packages('${H3900_MODULES}')}"
+H3900_MODULES = "h3900_asic h5400_asic pxa_ir h5400_buzzer h5400_fsi mmc_h5400 usb-ohci-h5400"
+include conf/ipaq-common.conf
include conf/handheld-common.conf
+
# not using tune-xscale so as to retain backwards compatibility
include conf/tune-strongarm.conf
-
diff --git a/conf/handheld-common.conf b/conf/handheld-common.conf
index aa7c5c5742..912484a09d 100644
--- a/conf/handheld-common.conf
+++ b/conf/handheld-common.conf
@@ -1,4 +1,8 @@
+HANDHELD_MODULES = "ipv6 ipsec mip6-mn ide-cs ide-disk vfat ppp-async nfs btuart-cs dtl1-cs bt3c-cs rfcomm bnep l2cap sco pcnet-cs af_packet ext2"
+
# Configuration bits for "generic handheld"
BOOTSTRAP_EXTRA_DEPENDS += "pcmcia-cs apmd ppp bluez-utils wireless-tools"
BOOTSTRAP_EXTRA_RDEPENDS += "pcmcia-cs apm"
-BOOTSTRAP_EXTRA_RRECOMMENDS += "ppp bluez-utils wireless-tools kernel-module-ipv6 kernel-module-ipsec kernel-module-mip6+mn kernel-module-ide-cs kernel-module-vfat kernel-module-ppp+async kernel-module-btuart+cs kernel-module-dtl1+cs kernel-module-bt3c+cs kernel-module-rfcomm kernel-module-bnep kernel-module-pcnet+cs"
+BOOTSTRAP_EXTRA_RRECOMMENDS += "ppp bluez-utils wireless-tools ${@linux_module_packages('${HANDHELD_MODULES}')}"
+
+INHERIT += "linux_modules"
diff --git a/conf/ipaq-common.conf b/conf/ipaq-common.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/conf/ipaq-common.conf
diff --git a/conf/poodle.conf b/conf/poodle.conf
index e69de29bb2..ca6ebb0e94 100644
--- a/conf/poodle.conf
+++ b/conf/poodle.conf
@@ -0,0 +1,15 @@
+TARGET_ARCH = "arm"
+IPKG_ARCHS = "all arm ${MACHINE}"
+PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+PREFERRED_PROVIDER_virtual/kernel = "openzaurus-pxa"
+BOOTSTRAP_EXTRA_DEPENDS = "virtual/kernel modutils-collateral hostap-modules orinoco-modules sharp-sdmmc-support"
+BOOTSTRAP_EXTRA_RDEPENDS = "kernel hostap-modules orinoco-modules sharp-sdmmc-support \
+kernel-module-ip-gre \
+kernel-module-ipip kernel-module-irnet kernel-module-net-fd kernel-module-registers kernel-module-pxa-bi \
+kernel-module-usbdcore kernel-module-usbdmonitor modutils-collateral"
+
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x4000 --pad --squash --faketime -n"
+
+IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2.bin ${EXTRA_IMAGECMD}"
+
+include conf/handheld-common.conf
diff --git a/conf/zaurus-pxa.conf b/conf/zaurus-pxa.conf
index 4a7e23c1ed..91cbead965 100644
--- a/conf/zaurus-pxa.conf
+++ b/conf/zaurus-pxa.conf
@@ -4,7 +4,7 @@ PREFERRED_PROVIDER_xserver = "xserver-kdrive"
PREFERRED_PROVIDER_virtual/kernel = "openzaurus-pxa"
BOOTSTRAP_EXTRA_DEPENDS = "virtual/kernel modutils-collateral hostap-modules orinoco-modules sharp-sdmmc-support"
BOOTSTRAP_EXTRA_RDEPENDS = "kernel hostap-modules orinoco-modules sharp-sdmmc-support \
-kernel-module-ip+gre kernel-module-ipip kernel-module-irnet kernel-module-net+fd kernel-module-registers kernel-module-pxa+bi \
+kernel-module-ip-gre kernel-module-ipip kernel-module-irnet kernel-module-net-fd kernel-module-registers kernel-module-pxa-bi \
kernel-module-usbdcore kernel-module-usbdmonitor modutils-collateral"
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x4000 -n"
@@ -20,4 +20,3 @@ IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --squash --faketime \
include conf/handheld-common.conf
# not using tune-xscale.conf so as to retain backwards compatibility
include conf/tune-strongarm.conf
-
diff --git a/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.oe b/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.oe
index db199d1e0e..38d8a4d711 100644
--- a/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.oe
+++ b/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.oe
@@ -5,7 +5,7 @@ KV = "${@oe.data.getVar('PV',d,True).split('-')[0]}"
VRSV = "${@oe.data.getVar('PV',d,True).split('-')[1]}"
PXAV = "${@oe.data.getVar('PV',d,True).split('-')[2]}"
JPMV = "${@oe.data.getVar('PV',d,True).split('-')[3]}"
-PR = "r6"
+PR = "r7"
FILESDIR = "${@os.path.dirname(oe.data.getVar('FILE',d,1))}/opensimpad-${PV}"
@@ -37,6 +37,8 @@ SIMPAD_RD = ${@oe.data.getVar("SIMPAD_RAMDISK_SIZE",d,1) or "32"}
export CMDLINE = ${@oe.data.getVar("SIMPAD_CMDLINE",d,1) or "mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA root=1f02 noinitrd jffs2_orphaned_inodes=delete rootfstype=jffs2 "}
EXTRA_OEMAKE = ""
+module_conf_sa1100-ir = "alias irda0 sa1100_ir"
+
do_configure() {
install -m 0644 ${WORKDIR}/defconfig-${MACHINE} ${S}/.config || die "No default configuration for ${MACHINE} available."
diff --git a/meta/task-bootstrap.oe b/meta/task-bootstrap.oe
index ac89b72368..d51faf2cd6 100644
--- a/meta/task-bootstrap.oe
+++ b/meta/task-bootstrap.oe
@@ -1,6 +1,6 @@
DESCRIPTION = "Core packages required for a basic installation"
MAINTAINER = "Phil Blundell <pb@handhelds.org>"
-PR = "r2"
+PR = "r3"
ALLOW_EMPTY = 1
PACKAGES = "${PN}"