mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 09:16:36 +01:00
The current linux-yocto build dir (B) includes MACHINE. This has been appropriate as kernels are typically built machine-specific. We have recently introduced an intel-common type kernel which can be shared across multiple machines sharing a common base (intel-core2-32, intel-corei7-64). In these cases, the kernel is built for a something more generic than MACHINE, and the current mechanism results in something like this when building for MACHINE=sys940x (using intel-common): tmp/work/core2-32-intel-common-poky-linux/linux-yocto-dev/ \ 3.13++gitAUTOINC+e5d23e7879_889c6bec6b-r0/linux-sys940x-noemgd-standard-build Note the descrepancy between core2-32-intel-common and linux-sys940x-noemgd-standard-build. This becomes counterintuitive at the very least when switching to another machine and attempting to reuse this build. This patch swaps MACHINE for PACKAGE_ARCH (which is typically MACHINE_ARCH for linux-yocto), resulting in the following build path: tmp/work/core2-32-intel-common-poky-linux/linux-yocto-dev/ \ 3.13++gitAUTOINC+e5d23e7879_889c6bec6b-r0/linux-core2-32-intel-common-standard-build The impact to existing MACHINEs is a replace of - with _ if MACHINE contains one or more - charachters. (From OE-Core rev: 54590cdb940b6145ac92729ebf9bb7e7e537f5e2) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
DESCRIPTION = "Yocto Kernel"
|
|
SECTION = "kernel"
|
|
LICENSE = "GPLv2"
|
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
|
|
|
INC_PR = "r4"
|
|
|
|
DEPENDS += "xz-native bc-native"
|
|
|
|
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
|
|
# by the kernel. This is typically the branch that should be built,
|
|
# and it can be specific to the machine or shared
|
|
# KMACHINE = "UNDEFINED"
|
|
|
|
LINUX_KERNEL_TYPE ?= "standard"
|
|
|
|
# KMETA ?= ""
|
|
KBRANCH ?= "master"
|
|
KMACHINE ?= "${MACHINE}"
|
|
SRCREV_FORMAT ?= "meta_machine"
|
|
|
|
LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
|
|
|
|
do_patch[depends] = "kern-tools-native:do_populate_sysroot"
|
|
|
|
addtask kernel_configme before do_configure after do_patch
|
|
|
|
# Pick up shared functions
|
|
inherit kernel
|
|
inherit kernel-yocto
|
|
require linux-dtb.inc
|
|
|
|
B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
|
|
|
|
do_install_append(){
|
|
if [ -n "${KMETA}" ]; then
|
|
rm -rf ${STAGING_KERNEL_DIR}/${KMETA}
|
|
fi
|
|
}
|
|
|
|
# extra tasks
|
|
addtask kernel_link_vmlinux after do_compile before do_install
|
|
addtask validate_branches before do_patch after do_kernel_checkout
|
|
addtask kernel_configcheck after do_configure before do_compile
|