SUMMARY = "Terminal-Only image with realtime optimizations" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r5" IMAGE_INSTALL = " \ ${@bb.utils.contains('IMAGE_ENABLE_CONTAINER', '1', '', 'kernel-modules', d)} \ packagegroup-base-extended \ packagegroup-wr-base \ packagegroup-wr-base-net \ packagegroup-wr-base-discrete-tools \ packagegroup-core-boot \ packagegroup-plcos-core \ rt-tests \ hwlatdetect \ grub-efi \ grub \ grub-bootconf \ tuned \ openplc \ rt-setup \ i2c-tools \ spitools \ libgpiod \ " #nfs-utils-client #packagegroup-wr-boot #swap "boot install" to "install boot" to try and get install to show up first in grub.cfg for hands-off autoinstall #install lines should be stripped during install-efi.sh anyway LABELS_LIVE = "install boot" inherit wrlinux-image inherit rtopts inherit grub-efi #inherit image_types ############################################################# # ssh-server-openssh DISTRO_FEATURES += " polkit " IMAGE_FEATURES += " splash package-management" #IMAGE_FEATURES += " ssh-server-dropbear hwcodecs " #CORE_IMAGE_BASE_INSTALL += " openssh" #DEPENDS += " cdrtools-native" QB_MEM = "-m 2048" IMAGE_FSTYPES += "wic wic.bmap" #WKS_FILE = "sdimage_bootpart.wks mkefidisk.wks" inherit extrausers #additional kernel images may not be required at all, but I don't want to break the x86 build while trying to fix the allwinner build IMAGE_EFI_BOOT_FILES:append:x86-64 := " ${KERNEL_IMAGETYPE}-*" #IMAGE_EFI_BOOT_FILES:append := "${KERNEL_IMAGETYPE}-*" IMAGE_BOOT_FILES:append:x86-64 := " ${KERNEL_IMAGETYPE}-*" IMAGE_BOOT_FILES:append:arm-uefi := " startup.nsh" #TODO reference GRUB_IMAGE destination name via variables, otherwise this could break possible future 32 bit builds #BOOT_EFI = IMAGE_BOOT_FILES:append:rpi = " \ grub.cfg;EFI/BOOT/grub.cfg \ ${EFI_PROVIDER}-bootaa64.efi;EFI/BOOT/bootaa64.efi \ " # ${EFI_PROVIDER}-bootaa64.efi:EFI/BOOT/bootaa64.efi #IMAGE_EFI_BOOT_FILES:append := " boot" do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ mtools-native:do_populate_sysroot \ cdrtools-native:do_populate_sysroot \ virtual/kernel:do_deploy \ " #${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_').split('.')[0]) if d.getVar('ROOTFS') else ''} build_efi() { #populate_kernel ${EFIIMGDIR} #if [ "${EFI}" = "1" ]; then # efi_populate ${EFIIMGDIR} #fi EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEPLOY_DIR_IMAGE}/startup.nsh } python do_bootimg:rpi() { pass } #python do_bootimg:arm-uefi() { # bb.build.exec_func('build_efi_cfg', d) # bb.build.exec_func('build_efi', d) # bb.build.exec_func('create_symlinks', d) #} #for some reason, adding my override (arm-uefi) to "python do_bootimg" causes bitbake to interpret the function as shell script, not as python. #Since I don't have time for none of that, I'm just doing this in my own python function for non-x86 architectures #(x86 is the only one that supports syslinux, which is a build requirement for OE's 'live' image classes, even for EFI-only images) python do_build_boot() { pass } python do_build_boot:arm-uefi() { bb.build.exec_func('build_efi_cfg', d) bb.build.exec_func('build_efi', d) bb.build.exec_func('create_symlinks', d) } python do_bootimg:prepend:x86-64() { #import os import glob deploy_dir = d.getVar("DEPLOY_DIR_IMAGE") os.system("install -d " + deploy_dir) iso_dir = d.getVar("ISODIR") os.system("install -d " + iso_dir) hdd_dir = d.getVar("HDDDIR") os.system("install -d " + hdd_dir) img_type = d.getVar("KERNEL_IMAGETYPE") files = glob.glob(deploy_dir + "/" + img_type + "-*") for file in files: os.system("install -m 644 -t " + iso_dir + " " + file + " | install -m 644 -t " + hdd_dir + " " + file ) } addtask build_boot before do_image_complete after do_rootfs #do_image_wic[recrdeptask] += " do_bootimg" #do_bootimg[depends] += " ${INITRD_IMAGE_LIVE}:do_image_complete"