51 lines
1.5 KiB
BlitzBasic
51 lines
1.5 KiB
BlitzBasic
SUMMARY = "Create a fitimage with included kernel, dtb and ramdisk"
|
|
MAINTAINER = "Lucien Müller <lucien.mueller@netmodule.com>"
|
|
LICENSE = "CLOSED"
|
|
|
|
inherit kernel-fitimage
|
|
inherit kernel-arch
|
|
inherit deploy
|
|
|
|
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
KERNEL_CLASSES = "kernel-fitimage"
|
|
KERNEL_IMAGETYPES += "fitImage"
|
|
|
|
addtask assemble_fitimage_initramfs before do_install after do_compile
|
|
addtask do_deploy after assemble_fitimage_initramfs
|
|
|
|
do_configure[depends] += "virtual/kernel:do_deploy"
|
|
do_bundle_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
|
|
do_deploy[depends] += "${PN}:do_assemble_fitimage"
|
|
|
|
INITRAMFS_IMAGE = "nwl-ramdisk-minimal"
|
|
INITRAMFS_IMAGE_NAME = "${INITRAMFS_IMAGE}-${MACHINE}"
|
|
INITRAMFS_IMAGE_BUNDLE = "0"
|
|
|
|
COREOS_CI_DEPLOY_ARTIFACTS += "${INITRAMFS_IMAGE}-${MACHINE}.manifest"
|
|
|
|
|
|
do_configure:prepend () {
|
|
install -d ${S}/arch/${ARCH}/boot/
|
|
for DTB in ${KERNEL_DEVICETREE}; do
|
|
# We have to watch out for when the device-tree is located in its own subdirectory in the kernel sources.
|
|
# DTB_SUBDIR will contain this directory.
|
|
DTB_DEPLOY=`basename ${DTB}`
|
|
DTB_SUBDIR=`dirname ${DTB}`
|
|
install -d arch/${ARCH}/boot/${DTB_SUBDIR}
|
|
install -m 0644 ${DEPLOY_DIR_IMAGE}/${DTB_DEPLOY} arch/${ARCH}/boot/${DTB}
|
|
done
|
|
install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${KERNEL_IMAGE_LINK_NAME}.bin arch/${ARCH}/boot/vmlinuz.bin
|
|
}
|
|
|
|
kernel_do_deploy () {
|
|
# The kernel-fitimage class appends the deployment to this task. We just have to provide the task.
|
|
}
|
|
|
|
do_deploy () {
|
|
deployDir=${DEPLOY_DIR_IMAGE}
|
|
kernel_do_deploy
|
|
}
|
|
|