diff --git a/layers/meta-nwl-distro/classes/nwl-image.bbclass b/layers/meta-nwl-distro/classes/nwl-image.bbclass index dec4772..f468c02 100644 --- a/layers/meta-nwl-distro/classes/nwl-image.bbclass +++ b/layers/meta-nwl-distro/classes/nwl-image.bbclass @@ -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 inherit coreos-image diff --git a/layers/meta-nwl-distro/conf/distro/nwl.conf b/layers/meta-nwl-distro/conf/distro/nwl.conf index e159585..1aa84de 100644 --- a/layers/meta-nwl-distro/conf/distro/nwl.conf +++ b/layers/meta-nwl-distro/conf/distro/nwl.conf @@ -18,3 +18,13 @@ DISTRO_CODENAME = "NWL 2023 Edition (DRAFT)" # 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. # 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" diff --git a/layers/meta-nwl-distro/recipes-core/images/nwl-fitimage.bb b/layers/meta-nwl-distro/recipes-core/images/nwl-fitimage.bb new file mode 100644 index 0000000..27b2e85 --- /dev/null +++ b/layers/meta-nwl-distro/recipes-core/images/nwl-fitimage.bb @@ -0,0 +1,47 @@ +SUMMARY = "Create a fitimage with included kernel, dtb and ramdisk" +MAINTAINER = "Lucien Müller " +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 +} + diff --git a/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb b/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb new file mode 100644 index 0000000..5426c8a --- /dev/null +++ b/layers/meta-nwl-distro/recipes-core/images/nwl-ramdisk-minimal.bb @@ -0,0 +1,13 @@ +SUMMARY = "A minimal ramdisk image." +MAINTAINER = "Lucien Müller " + +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"