From f71746ead48a28b0930cbfebea0990504c98f6e3 Mon Sep 17 00:00:00 2001 From: Samuel Dolt Date: Thu, 11 May 2023 11:23:17 +0200 Subject: [PATCH] feat(coreos-all-features-dev): add new image for developement on target The coreos-all-features-dev provide an image with most common developer tools, like GCC, git, curl, wget, ... This image can be used to install a prebuilt version of the Rust compiler using binary from rust-lang.org, as at this time neither meta-rust or oe-core can build a Rust compiler running on the target. This also include a small feature that allow an image to configure the size of the RootFS partition on image created by WIC --- .../include/coreos-generic-features/efi.inc | 1 + .../images/coreos-image-all-features-dev.bb | 16 ++++++++++++++++ .../wic/cn913x-sdcard.wks.in | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 layers/meta-belden-coreos/recipes-core/images/coreos-image-all-features-dev.bb diff --git a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc index 19e10d4..882be01 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc +++ b/layers/meta-belden-coreos-bsp/conf/machine/include/coreos-generic-features/efi.inc @@ -10,5 +10,6 @@ do_image_wic[depends] += "efibootguard-native:do_populate_sysroot efibootguard:d WKS_PART_EFI ??= 'part --source efibootguard-efi --label efi --align 1024 --part-type=EF00' WKS_PART_ROOT_A ??= 'part / --source rootfs --fstype=ext4 --label platform0 --align 1024' WKS_PART_ROOT_B ??= 'part --fstype=ext4 --label platform1 --align 1024' +WKS_PART_ROOT_SIZE ??= '2G' WKS_PART_EFIBOOTGUARD_A ??= 'part --source efibootguard-boot --label boot0 --align 1024 --part-type=0700 --sourceparams "watchdog=${EFIBOOTGUARD_TIMEOUT},revision=2,kernel=kernel0-${MACHINE}.efi;KERNEL0.EFI"' WKS_PART_EFIBOOTGUARD_B ??= 'part --source efibootguard-boot --label boot1 --align 1024 --part-type=0700 --sourceparams "watchdog=${EFIBOOTGUARD_TIMEOUT},revision=1,kernel=kernel1-${MACHINE}.efi;KERNEL1.EFI"' diff --git a/layers/meta-belden-coreos/recipes-core/images/coreos-image-all-features-dev.bb b/layers/meta-belden-coreos/recipes-core/images/coreos-image-all-features-dev.bb new file mode 100644 index 0000000..6905aee --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/images/coreos-image-all-features-dev.bb @@ -0,0 +1,16 @@ +require coreos-image-all-features.bb + +# To develop on the target, we need more space +# Ensute that the rootfs image and the sdcard partition are 12G wide +# This means that you will need at least a 32GB SDCard +IMAGE_ROOTFS_SIZE = "12582000" +IMAGE_ROOTFS_EXTRA_SPACE = "0" +WKS_PART_ROOT_SIZE = "12G" + +IMAGE_FEATURES:append = " \ + dev-pkgs \ + doc-pkgs \ + tools-sdk \ +" + +IMAGE_INSTALL:append = " git wget curl vim rsync clang" \ No newline at end of file diff --git a/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in b/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in index 1b0d095..687b823 100644 --- a/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in +++ b/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in @@ -13,8 +13,8 @@ part --offset 4096S --source rawcopy --sourceparams="file=flash-image.bin" --ond part --offset 12288S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 ${WKS_PART_EFI} --ondisk mmcblk1 --offset 20480S --size 64M --extra-space 0 --overhead-factor 1 -${WKS_PART_ROOT_A} --ondisk mmcblk1 --size 2G --extra-space 0 --overhead-factor 1 -${WKS_PART_ROOT_B} --ondisk mmcblk1 --size 2G --extra-space 0 --overhead-factor 1 +${WKS_PART_ROOT_A} --ondisk mmcblk1 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1 +${WKS_PART_ROOT_B} --ondisk mmcblk1 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1 ${WKS_PART_EFIBOOTGUARD_A} --ondisk mmcblk1 --align 1024 --size 128M --extra-space 0 --overhead-factor 1 ${WKS_PART_EFIBOOTGUARD_B} --ondisk mmcblk1 --align 1024 --size 128M --extra-space 0 --overhead-factor 1