diff options
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 31e633b812..44461bccbb 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -77,6 +77,10 @@ EXTRA_OEMAKE = "" | |||
77 | 77 | ||
78 | KERNEL_ALT_IMAGETYPE ??= "" | 78 | KERNEL_ALT_IMAGETYPE ??= "" |
79 | 79 | ||
80 | # Define where the kernel headers are installed on the target as well as where | ||
81 | # they are staged. | ||
82 | KERNEL_SRC_PATH = "/usr/src/kernel" | ||
83 | |||
80 | KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" | 84 | KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" |
81 | 85 | ||
82 | kernel_do_compile() { | 86 | kernel_do_compile() { |
@@ -130,7 +134,7 @@ kernel_do_install() { | |||
130 | # Support for external module building - create a minimal copy of the | 134 | # Support for external module building - create a minimal copy of the |
131 | # kernel source tree. | 135 | # kernel source tree. |
132 | # | 136 | # |
133 | kerneldir=${D}/kernel | 137 | kerneldir=${D}${KERNEL_SRC_PATH} |
134 | install -d $kerneldir | 138 | install -d $kerneldir |
135 | 139 | ||
136 | # | 140 | # |
@@ -183,23 +187,18 @@ kernel_do_install() { | |||
183 | cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o | 187 | cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o |
184 | fi | 188 | fi |
185 | 189 | ||
186 | # Remove the following binaries which cause strip errors | 190 | # Remove the following binaries which cause strip or arch QA errors |
187 | # during do_package for cross-compiled platforms | 191 | # during do_package for cross-compiled platforms |
188 | bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ | 192 | bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ |
189 | arch/powerpc/boot/mktree" | 193 | arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \ |
194 | scripts/kconfig/conf.o" | ||
190 | for entry in $bin_files; do | 195 | for entry in $bin_files; do |
191 | rm -f $kerneldir/$entry | 196 | rm -f $kerneldir/$entry |
192 | done | 197 | done |
193 | } | 198 | } |
194 | 199 | ||
195 | PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess" | ||
196 | |||
197 | kernel_package_preprocess () { | ||
198 | rm -rf ${PKGD}/kernel | ||
199 | } | ||
200 | |||
201 | sysroot_stage_all_append() { | 200 | sysroot_stage_all_append() { |
202 | sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel | 201 | sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH} |
203 | } | 202 | } |
204 | 203 | ||
205 | kernel_do_configure() { | 204 | kernel_do_configure() { |
@@ -247,13 +246,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure | |||
247 | 246 | ||
248 | # kernel-base becomes kernel-${KERNEL_VERSION} | 247 | # kernel-base becomes kernel-${KERNEL_VERSION} |
249 | # kernel-image becomes kernel-image-${KERNEL_VERISON} | 248 | # kernel-image becomes kernel-image-${KERNEL_VERISON} |
250 | PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc" | 249 | PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev" |
251 | FILES = "" | 250 | FILES = "" |
252 | FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" | 251 | FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" |
253 | FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*" | 252 | FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}" |
254 | FILES_kernel-vmlinux = "/boot/vmlinux*" | 253 | FILES_kernel-vmlinux = "/boot/vmlinux*" |
255 | # misc is a package to contain files we need in staging | ||
256 | FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media" | ||
257 | RDEPENDS_kernel = "kernel-base" | 254 | RDEPENDS_kernel = "kernel-base" |
258 | # Allow machines to override this dependency if kernel image files are | 255 | # Allow machines to override this dependency if kernel image files are |
259 | # not wanted in images as standard | 256 | # not wanted in images as standard |
@@ -469,7 +466,7 @@ python populate_packages_prepend () { | |||
469 | metapkg = "kernel-modules" | 466 | metapkg = "kernel-modules" |
470 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | 467 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") |
471 | d.setVar('FILES_' + metapkg, "") | 468 | d.setVar('FILES_' + metapkg, "") |
472 | blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ] | 469 | blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux' ] |
473 | for l in module_deps.values(): | 470 | for l in module_deps.values(): |
474 | for i in l: | 471 | for i in l: |
475 | pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) | 472 | pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) |