linux-backports: fix build on master

* the kernel build directory was splitted
  and renamed on master
This commit is contained in:
Henning Heinold 2015-07-08 22:56:43 +02:00 committed by Holger Hans Peter Freyther
parent 38579ae767
commit 2276fd4a7b
2 changed files with 15 additions and 4 deletions

View File

@ -70,7 +70,8 @@ python split_kernel_module_packages () {
m = kerverrexp.match(kernelver) m = kerverrexp.match(kernelver)
if m: if m:
kernelver_stripped = m.group(1) kernelver_stripped = m.group(1)
staging_kernel_dir = d.getVar("STAGING_KERNEL_DIR", True) kernel_build_dir = ['STAGING_KERNEL_BUILDDIR', 'STAGING_KERNEL_DIR'][d.getVar('DISTRO_VERSION', True)[0:3] == '1.5']
staging_kernel_dir = d.getVar(kernel_build_dir, True)
system_map_file = "%s/boot/System.map-%s" % (dvar, kernelver) system_map_file = "%s/boot/System.map-%s" % (dvar, kernelver)
if not os.path.exists(system_map_file): if not os.path.exists(system_map_file):
system_map_file = "%s/System.map-%s" % (staging_kernel_dir, kernelver) system_map_file = "%s/System.map-%s" % (staging_kernel_dir, kernelver)

View File

@ -16,15 +16,25 @@ SRC_URI[sha256sum] = "ff3d4d5192c4d57d7415dfcd60e02ea4fa21e0de224ae0ce2b5b9f2e9c
S = "${WORKDIR}/backports-3.18.1-1" S = "${WORKDIR}/backports-3.18.1-1"
python __anonymous() {
if d.getVar('DISTRO_VERSION', True)[0:3] == '1.5':
d.setVar('KERNEL_BUILD_DIR', d.getVar('STAGING_KERNEL_DIR', True))
else:
d.setVar('KERNEL_BUILD_DIR', d.getVar('STAGING_KERNEL_BUILDDIR', True))
}
KERNEL_BUILD_DIR = "${@d.getVar('KERNEL_BUILD_DIR', True)}"
do_configure() { do_configure() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC
cp ${WORKDIR}/defconfig ${S}/.config cp ${WORKDIR}/defconfig ${S}/.config
oe_runmake oldconfig KLIB_BUILD=${STAGING_KERNEL_DIR} oe_runmake oldconfig KLIB_BUILD=${KERNEL_BUILD_DIR}
} }
do_compile() { do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KLIB_BUILD=${STAGING_KERNEL_DIR} \ oe_runmake KLIB_BUILD=${KERNEL_BUILD_DIR} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" \ AR="${KERNEL_AR}" \
${MAKE_TARGETS} ${MAKE_TARGETS}
@ -33,7 +43,7 @@ do_compile() {
do_install() { do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake DEPMOD=echo KLIB="${D}" \ oe_runmake DEPMOD=echo KLIB="${D}" \
KLIB_BUILD=${STAGING_KERNEL_DIR} \ KLIB_BUILD=${KERNEL_BUILD_DIR} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
install install
} }