2017-12-04 21:33:20 +00:00
|
|
|
DESCRIPTION = "Citadel linux kernel"
|
|
|
|
SECTION = "kernel"
|
|
|
|
LICENSE = "GPLv2"
|
|
|
|
|
2019-01-15 18:33:04 +00:00
|
|
|
BUILD_LDFLAGS = "-L${STAGING_LIBDIR} \
|
|
|
|
-Wl,-rpath-link,${STAGING_LIBDIR} \
|
|
|
|
-Wl,-rpath,${STAGING_LIBDIR} \
|
|
|
|
-Wl,-O1 \
|
|
|
|
-Wl,--dynamic-linker=${STAGING_LIBDIR}/ld-linux-x86-64.so.2"
|
|
|
|
|
|
|
|
BUILD_CFLAGS = "-O2 -pipe -v"
|
|
|
|
|
2017-12-04 21:33:20 +00:00
|
|
|
inherit kernel
|
|
|
|
|
2019-01-15 18:33:04 +00:00
|
|
|
EXTRA_OEMAKE = 'HOSTCC="x86_64-oe-linux-gcc --sysroot=${RECIPE_SYSROOT}" HOSTCXX="x86_64-oe-linux-g++ --sysroot=${RECIPE_SYSROOT} -isystem ${STAGING_INCDIR_NATIVE}" HOSTCFLAGS="${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTLDFLAGS="--sysroot=${RECIPE_SYSROOT} ${BUILD_LDFLAGS}"'
|
|
|
|
|
2018-03-24 19:27:10 +00:00
|
|
|
# if OVERRIDES contains citadel-powertop, then find defconfig in citadel-powertop dirctory
|
|
|
|
# This config disables CONFIG_GRKERNSEC_KMEM and enables CONFIG_DEBUG_FS so that
|
|
|
|
# powertop will work
|
|
|
|
FILESEXTRAPATHS_prepend_citadel-powertop = "${FILE_DIRNAME}/citadel-powertop:"
|
|
|
|
LINUX_VERSION_EXTENSION_append_citadel-powertop = "-powertop"
|
2017-12-04 21:33:20 +00:00
|
|
|
|
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
|
|
|
LINUX_VERSION ?= "${PV}"
|
|
|
|
LINUX_VERSION_EXTENSION_append = "-citadel"
|
|
|
|
|
|
|
|
S = "${WORKDIR}/linux-${LINUX_VERSION}"
|
|
|
|
|
|
|
|
do_deploy_append() {
|
|
|
|
rm ${DEPLOYDIR}/bzImage
|
2019-01-15 18:32:18 +00:00
|
|
|
ln -sf bzImage-initramfs-${KERNEL_IMAGE_NAME}.bin ${DEPLOYDIR}/bzImage
|
2018-12-31 23:44:48 +00:00
|
|
|
echo "${PV}" > ${DEPLOYDIR}/kernel.version
|
2017-12-04 21:33:20 +00:00
|
|
|
}
|
|
|
|
|
2018-03-21 13:38:49 +00:00
|
|
|
#
|
|
|
|
# Replaces function with same name in kernel.bbclass since that implementation
|
|
|
|
# doesn't pass destination argument to lz4 in which case the decompressed output
|
|
|
|
# just disappears into thin air it seems.
|
|
|
|
#
|
|
|
|
copy_initramfs() {
|
|
|
|
echo "copy_initramfs override"
|
|
|
|
mkdir -p ${B}/usr
|
|
|
|
rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
|
|
|
|
cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.cpio.lz4 ${B}/usr/.
|
|
|
|
lz4 -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio.lz4 ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
|
|
|
|
ls -al ${B}/usr
|
|
|
|
echo "Finished copy of initramfs into ./usr"
|
|
|
|
}
|
|
|
|
|
2018-01-18 23:19:47 +00:00
|
|
|
# Don't install kernel into images, see kernel.bbclass
|
2018-03-04 02:39:04 +00:00
|
|
|
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
|
2018-01-18 23:19:47 +00:00
|
|
|
|
2017-12-04 21:33:20 +00:00
|
|
|
#
|
|
|
|
# https://github.com/96boards/meta-96boards/issues/81#issuecomment-311256044
|
|
|
|
# https://github.com/96boards/meta-96boards/blob/master/recipes-kernel/linux/linux-96boards_4.4.bb
|
|
|
|
#
|
|
|
|
# coreutils for /usr/bin/seq which pax size overflow gcc plugin uses
|
|
|
|
|
2019-01-15 18:33:04 +00:00
|
|
|
DEPENDS += "libgcc openssl coreutils-native lz4-native"
|
2017-12-04 21:33:20 +00:00
|
|
|
|
|
|
|
COMPATIBLE_MACHINE = "(intel-corei7-64)"
|
|
|
|
|