diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/juno-extra-settings.inc b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/juno-extra-settings.inc index 110865de..ec7ed357 100644 --- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/juno-extra-settings.inc +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/juno-extra-settings.inc @@ -3,3 +3,23 @@ # Juno board has 2 network interfaces, add both of them to the bridge XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1" XEN_DEVICETREE_DOM0_SIZE ?= "0x02400000" + +# We need to extend the wks search path to be able to find the wks file set in +# ARM_AUTONOMY_WKS_FILE. +WKS_SEARCH_PATH_prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:" + +ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-juno-disk.wks.in" +# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set +WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\ + '${ARM_AUTONOMY_WKS_FILE}', d)}" + +# Set the wks guest partition size and unit. It must be aligned with the sum of +# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is +# 1 MiB per physical volume, hence it needs to be taken into account when +# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB. +GUEST_PART_SIZE ?= "4097" +GUEST_PART_SIZE_UNIT ?= "M" + +# set wic image type only if INITRAMFS_IMAGE_BUNDLE is not set +IMAGE_FSTYPES += "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\ + 'wic wic.gz wic.bmap', d)}" diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-juno-disk.wks.in b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-juno-disk.wks.in new file mode 100644 index 00000000..5c5b24ad --- /dev/null +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-juno-disk.wks.in @@ -0,0 +1,11 @@ +# short-description: Create a disk image +# long-description: Creates a partitioned disk image that the user +# can directly dd to boot media. + +# For Juno first partition is rootfs normally populated as /dev/sda1 +part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024 + +# Second partition to accomodate guests images normally populated as /dev/sda2 (used by XENGUEST_MANAGER_VOLUME_DEVICE) +part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024 + +bootloader --ptable msdos