diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-04-09 21:17:21 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-04-09 21:17:21 +0000 |
commit | 161e164dd087fecf82614aa7f5515f7d46b3ebad (patch) | |
tree | 85d3283caa41bdf666195a8ec58b4f5494752e17 /classes | |
parent | 376b86efa45f8eb84da65c33e1d99028b308b177 (diff) |
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.
Diffstat (limited to 'classes')
-rw-r--r-- | classes/kernel.bbclass | 13 |
1 files changed, 9 insertions, 4 deletions
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)) |