linux: add CCMP15 support to build kernel
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
This commit is contained in:
parent
d78d601841
commit
1546a79981
|
|
@ -3,6 +3,7 @@
|
|||
LICENSE = "GPLv2"
|
||||
|
||||
LOCALVERSION = "-dey"
|
||||
SRCREV = "${AUTOREV}"
|
||||
|
||||
# Select internal or Github Linux repo
|
||||
DIGI_LOG_REPO = "linux-2.6.git"
|
||||
|
|
@ -13,5 +14,6 @@ LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , \
|
|||
'${DIGI_GITHUB_GIT}/${GITHUB_REPO};protocol=https', d)}"
|
||||
|
||||
SRC_URI = "${LINUX_GIT_URI};branch=${SRCBRANCH}"
|
||||
SRC_URI_stmp32mpcommon = "${LINUX_GIT_URI};branch=${SRCBRANCH}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
|
|
|||
|
|
@ -4,98 +4,38 @@ SUMMARY = "Linux kernel for Digi boards"
|
|||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
DEPENDS += "lzop-native bc-native"
|
||||
DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}"
|
||||
DEPENDS += "${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'lzop-native', '', d)}"
|
||||
DEPENDS += "${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'bc-native', '', d)}"
|
||||
|
||||
inherit kernel fsl-kernel-localversion
|
||||
inherit kernel
|
||||
inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-kernel-localversion', '', d)}
|
||||
|
||||
SRCBRANCH = "v5.10/nxp/master"
|
||||
SRCBRANCH_stm32mpcommon = "v5.10/stm/master"
|
||||
|
||||
require ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'STM', 'recipes-kernel/linux/linux-stm32mp.inc', '', d)}
|
||||
require recipes-kernel/linux/linux-dey-src.inc
|
||||
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-virtualization.inc', '', d)}
|
||||
require ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'recipes-kernel/linux/linux-trustfence.inc', '', d)}
|
||||
|
||||
# Use custom provided 'defconfig' if variable KERNEL_DEFCONFIG is cleared
|
||||
SRC_URI += "${@oe.utils.conditional('KERNEL_DEFCONFIG', '', 'file://defconfig', '', d)}"
|
||||
|
||||
do_deploy[postfuncs] += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence_sign', '', d)}"
|
||||
|
||||
trustfence_sign() {
|
||||
# Set environment variables for trustfence configuration
|
||||
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
|
||||
[ -n "${TRUSTFENCE_KEY_INDEX}" ] && export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
|
||||
[ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ] && export CONFIG_DEK_PATH="${TRUSTFENCE_DEK_PATH}"
|
||||
|
||||
# Sign/encrypt the kernel images
|
||||
for type in ${KERNEL_IMAGETYPES}; do
|
||||
KERNEL_IMAGE="${type}-${KERNEL_IMAGE_NAME}.bin"
|
||||
if [ "${type}" = "Image.gz" ]; then
|
||||
# Sign the uncompressed Image
|
||||
KERNEL_IMAGE=${WORKDIR}/build/arch/arm64/boot/Image
|
||||
fi
|
||||
|
||||
TMP_KERNEL_IMAGE_SIGNED="$(mktemp ${KERNEL_IMAGE}-signed.XXXXXX)"
|
||||
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -l "${KERNEL_IMAGE}" "${TMP_KERNEL_IMAGE_SIGNED}"
|
||||
|
||||
if [ "${type}" = "Image.gz" ]; then
|
||||
# Compress the signed Image and restore the original filename
|
||||
gzip "${TMP_KERNEL_IMAGE_SIGNED}"
|
||||
mv "${TMP_KERNEL_IMAGE_SIGNED}.gz" "${TMP_KERNEL_IMAGE_SIGNED}"
|
||||
KERNEL_IMAGE="${type}-${KERNEL_IMAGE_NAME}.bin"
|
||||
fi
|
||||
|
||||
mv "${TMP_KERNEL_IMAGE_SIGNED}" "${KERNEL_IMAGE}"
|
||||
done
|
||||
|
||||
# Sign/encrypt the device tree blobs
|
||||
for DTB in ${KERNEL_DEVICETREE}; do
|
||||
DTB=`normalize_dtb "${DTB}"`
|
||||
DTB_EXT=${DTB##*.}
|
||||
DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
|
||||
DTB_IMAGE="${DTB_BASE_NAME}-${KERNEL_IMAGE_NAME}.${DTB_EXT}"
|
||||
|
||||
TMP_DTB_IMAGE_SIGNED="$(mktemp ${DTB_IMAGE}-signed.XXXXXX)"
|
||||
if [ "${DTB_EXT}" = "dtbo" ]; then
|
||||
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -o "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
|
||||
else
|
||||
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -d "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
|
||||
fi
|
||||
mv "${TMP_DTB_IMAGE_SIGNED}" "${DTB_IMAGE}"
|
||||
done
|
||||
}
|
||||
trustfence_sign[dirs] = "${DEPLOYDIR}"
|
||||
|
||||
do_deploy[vardeps] += "TRUSTFENCE_SIGN_KEYS_PATH TRUSTFENCE_KEY_INDEX TRUSTFENCE_DEK_PATH"
|
||||
SRC_URI +="${@oe.utils.conditional('KERNEL_DEFCONFIG', '', 'file://defconfig', '', d)}"
|
||||
|
||||
FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/config-${KERNEL_VERSION}"
|
||||
|
||||
# Don't include kernels in standard images
|
||||
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
|
||||
|
||||
# A user can provide his own kernel 'defconfig' file by:
|
||||
# - setting the variable KERNEL_DEFCONFIG to a custom kernel configuration file
|
||||
# inside the kernel repository.
|
||||
# - setting the variable KERNEL_DEFCONFIG to a kernel configuration file using
|
||||
# the full path to the file.
|
||||
# - clearing the variable KERNEL_DEFCONFIG and providing a kernel configuration
|
||||
# file in the layer (in this case the file must be named 'defconfig').
|
||||
# Otherwise the default platform's kernel configuration file will be taken from
|
||||
# the Linux source code tree.
|
||||
do_copy_defconfig[vardeps] += "KERNEL_DEFCONFIG"
|
||||
do_copy_defconfig[dirs] = "${S}"
|
||||
do_copy_defconfig () {
|
||||
if [ -n "${KERNEL_DEFCONFIG}" ]; then
|
||||
cp -f ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
|
||||
fi
|
||||
}
|
||||
addtask copy_defconfig after do_patch before do_kernel_localversion
|
||||
|
||||
# Apply configuration fragments
|
||||
do_configure_append() {
|
||||
# Only accept fragments ending in .cfg. If the fragments contain
|
||||
# something other than kernel configs, it will be filtered out
|
||||
# automatically.
|
||||
if [ -n "${@' '.join(find_cfgs(d))}" ]; then
|
||||
${S}/scripts/kconfig/merge_config.sh -m -O ${B} ${B}/.config ${@" ".join(find_cfgs(d))}
|
||||
fi
|
||||
do_install_append_stm32mpcommon() {
|
||||
if ${@bb.utils.contains('MACHINE_FEATURES','gpu','true','false',d)}; then
|
||||
# append evbug tool to blacklist
|
||||
echo "blacklist evbug" >> ${D}/${sysconfdir}/modprobe.d/blacklist.conf
|
||||
fi
|
||||
}
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx8mp)"
|
||||
# -------------------------------------------------------------
|
||||
# Kernel Args
|
||||
#
|
||||
KERNEL_EXTRA_ARGS_stm32mpcommon += "LOADADDR=${ST_KERNEL_LOADADDR}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx8mp|ccmp15-dvk)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue