From 161e164dd087fecf82614aa7f5515f7d46b3ebad Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 9 Apr 2007 21:17:21 +0000 Subject: kernel.bbclass: Add kernel-base package which kernel modules depend on instead of kernel-image. This allows machines to specify that the kernel-image shouldn't be included in a default rootfs, without needing kernel-image to be empty. Set RDEPENDS_kernel-base_MACHINE = for machines that need this as per a discussion on the mailing list. --- classes/kernel.bbclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'classes/kernel.bbclass') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 2434ca1f0a..4cc3784b6f 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -169,13 +169,18 @@ inherit cml1 EXPORT_FUNCTIONS do_compile do_install do_stage do_configure -PACKAGES = "kernel kernel-image kernel-dev" +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-image kernel-dev" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" FILES_kernel-dev = "/boot/System.map* /boot/config*" -RDEPENDS_kernel = "kernel-image-${KERNEL_VERSION}" +RDEPENDS_kernel = "kernel-base" +RDEPENDS_kernel-base = "kernel-image" PKG_kernel-image = "kernel-image-${KERNEL_VERSION}" +PKG_kernel-base = "kernel-${KERNEL_VERSION}" ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" ALLOW_EMPTY_kernel-image = "1" pkg_postinst_kernel-image () { @@ -362,13 +367,13 @@ python populate_packages_prepend () { postinst = bb.data.getVar('pkg_postinst_modules', d, 1) postrm = bb.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 kernel-image-%s' % bb.data.getVar("KERNEL_VERSION", 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 kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) import re, os metapkg = "kernel-modules" bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) bb.data.setVar('FILES_' + metapkg, "", d) - blacklist = [ 'kernel-dev', 'kernel-image' ] + blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base' ] for l in module_deps.values(): for i in l: pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) -- cgit v1.2.3 From e45268ec831c439a5159e147a02dccce7a6b4d0e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 4 Jul 2007 23:34:18 +0000 Subject: bluez: Stop 02dtl1_cs.sh the nasty hack from breaking everyone's BT connection. * This sloppily written script just unconditionally breaks a BT connection on suspend. * So, instead, make only DTL1 victims suffer it thru: 1. Make a separate package for it. 2. Make kernel-module-dtl1-cs and nothing else RDEPENDS on it. --- classes/kernel.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes/kernel.bbclass') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 4cc3784b6f..3a95fa787a 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -183,6 +183,10 @@ ALLOW_EMPTY_kernel = "1" ALLOW_EMPTY_kernel-base = "1" ALLOW_EMPTY_kernel-image = "1" +# Userspace workarounds for kernel modules issues +# This is shame, fix the kernel instead! +RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" + pkg_postinst_kernel-image () { if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then mkdir -p $D/lib/modules/${KERNEL_VERSION} -- cgit v1.2.3 From 725d9b9289e84ad450fe9a037bd78eaa50c1206f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 5 Jul 2007 11:24:00 +0000 Subject: kernel.bbclass: DEPEND on bluez-dtl1-workaround, not just RDEPEND. --- classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/kernel.bbclass') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 3a95fa787a..afbea42391 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -185,7 +185,7 @@ ALLOW_EMPTY_kernel-image = "1" # Userspace workarounds for kernel modules issues # This is shame, fix the kernel instead! -RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" +DEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" pkg_postinst_kernel-image () { if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then -- cgit v1.2.3 From 2ed2875b6c56be3a2f2b9db557e22024d3e92dd6 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 5 Jul 2007 12:48:04 +0000 Subject: kernel.bbclass: Oh ok, we need both DEPENDS and RDEPENDS. --- classes/kernel.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes/kernel.bbclass') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index afbea42391..658bbbf675 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -186,6 +186,7 @@ ALLOW_EMPTY_kernel-image = "1" # Userspace workarounds for kernel modules issues # This is shame, fix the kernel instead! DEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" +RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" pkg_postinst_kernel-image () { if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then -- cgit v1.2.3 From 0990e13e269d897ce9939e9bf1280c50d3f333e8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 25 Jul 2007 09:56:17 +0000 Subject: kernel.bbclass: Add support for module config per 2.6 conevntions. * 2.6 modprobe expects per-module configuration in /etc/modprobe.d/ . * Closes #2669. --- classes/kernel.bbclass | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'classes/kernel.bbclass') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 658bbbf675..0670da678d 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -143,7 +143,10 @@ kernel_do_install() { install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} install -d ${D}/etc/modutils - + if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then + install -d ${D}/etc/modprobe.d + fi + # Check if scripts/genksyms exists and if so, build it if [ -e scripts/genksyms/ ]; then oe_runmake SUBDIRS="scripts/genksyms" @@ -345,13 +348,16 @@ python populate_packages_prepend () { # Write out any modconf fragment modconf = bb.data.getVar('module_conf_%s' % basename, d, 1) if modconf: - name = '%s/etc/modutils/%s.conf' % (dvar, basename) + if bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) == "2.6": + name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) + else: + name = '%s/etc/modutils/%s.conf' % (dvar, basename) f = open(name, 'w') f.write("%s\n" % modconf) f.close() files = bb.data.getVar('FILES_%s' % pkg, d, 1) - files = "%s /etc/modutils/%s /etc/modutils/%s.conf" % (files, basename, basename) + files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename) bb.data.setVar('FILES_%s' % pkg, files, d) if vals.has_key("description"): -- cgit v1.2.3