ADD: fitimage with integrated ramdisk.

ID: 413751

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
This commit is contained in:
Lucien Mueller 2023-07-27 16:09:41 +02:00
parent a482f35269
commit 458a01a084
4 changed files with 76 additions and 0 deletions

View File

@ -1,2 +1,8 @@
# Remove EFI support for machines which don't support it
EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
COREOS_IMAGE_GENERATE_UKI = "${EFI}"
COREOS_IMAGE_GENERATE_INSTALLER = "${EFI}"
COREOS_IMAGE_GENERATE_SWU = "${EFI}"
# Base classe for all image based on NWL # Base classe for all image based on NWL
inherit coreos-image inherit coreos-image

View File

@ -18,3 +18,13 @@ DISTRO_CODENAME = "NWL 2023 Edition (DRAFT)"
# all the features of OpenEmbedded-Core. We have added some checks for some # all the features of OpenEmbedded-Core. We have added some checks for some
# of the settings that we don't allow to change or that we don't support. # of the settings that we don't allow to change or that we don't support.
# See the coreos-sanity.bbclass file for more info. # See the coreos-sanity.bbclass file for more info.
DISTRO_FEATURES_BACKFILL_CONSIDERED = "ldconfig pulseaudio gobject-introspection-data"
DISTRO_FEATURES:remove = "ptest virtualization"
PACKAGECONFIG:pn-systemd = "usrmerge rfkill kmod timedated vconsole"
PACKAGECONFIG:pn-networkmanager = "systemd wifi bluez5 nmcli"
PACKAGECONFIG:pn-bluez5 = "systemd udev"

View File

@ -0,0 +1,47 @@
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"
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
}

View File

@ -0,0 +1,13 @@
SUMMARY = "A minimal ramdisk image."
MAINTAINER = "Lucien Müller <lucien.mueller@netmodule.com>"
inherit nwl-image
IMAGE_FSTYPES = "cpio.xz"
# Keep only the minimum packages
NO_RECOMMENDATIONS = "1"
COREOS_IMAGE_GENERATE_INSTALLER = "0"
COREOS_IMAGE_GENERATE_UKI = "0"
COREOS_IMAGE_GENERATE_SWU = "0"