All of lore.kernel.org
 help / color / mirror / Atom feed
* [hardknott][PATCH v2 1/2] arm-bsp/fvp-base*: Introduce WIC support for fvp-base* machines
@ 2021-06-21 16:22 Kamil Dziezyk
  2021-06-21 16:22 ` [hardknott][PATCH v2 2/2] arm-autonomy/fvp-base: Make usage of wic images Kamil Dziezyk
  0 siblings, 1 reply; 2+ messages in thread
From: Kamil Dziezyk @ 2021-06-21 16:22 UTC (permalink / raw)
  To: meta-arm; +Cc: nd

Add wks script that contains two partitions.
Rootfs is populated to second partition, because the first one is empty,
to keep compatibility with image_types_disk_img.bbclass
and use the same root device set in u-boot bootargs parameter.

Both wic and disk.img files are built by default.

Issue-Id: SCM-2698
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Ib5b5c3a7aa6e8fe9fa90a2955ae1e461caa01356
---
 meta-arm-bsp/conf/machine/fvp-common.inc | 4 +++-
 meta-arm-bsp/wic/fvp-base.wks            | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 meta-arm-bsp/wic/fvp-base.wks

diff --git a/meta-arm-bsp/conf/machine/fvp-common.inc b/meta-arm-bsp/conf/machine/fvp-common.inc
index c4a5f6b..ddf6b1c 100644
--- a/meta-arm-bsp/conf/machine/fvp-common.inc
+++ b/meta-arm-bsp/conf/machine/fvp-common.inc
@@ -8,7 +8,9 @@
 MACHINE_FEATURES = "optee"
 
 IMAGE_CLASSES += "image_types_disk_img"
-IMAGE_FSTYPES += "disk.img"
+IMAGE_FSTYPES += "disk.img wic"
+
+WKS_FILE ?= "fvp-base.wks"
 
 # Disk image configuration
 # We don't use the first partition
diff --git a/meta-arm-bsp/wic/fvp-base.wks b/meta-arm-bsp/wic/fvp-base.wks
new file mode 100644
index 0000000..ef08c81
--- /dev/null
+++ b/meta-arm-bsp/wic/fvp-base.wks
@@ -0,0 +1,6 @@
+# For fvp-base* machines we just need to populate the rootfs partition
+# but to keep backwards compatibility with disk.img,
+# we need to create first partition empty
+
+part --label empty --source empty --ondisk sda --size="1M" --system-id 8e --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --label root --size="2048"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [hardknott][PATCH v2 2/2] arm-autonomy/fvp-base: Make usage of wic images
  2021-06-21 16:22 [hardknott][PATCH v2 1/2] arm-bsp/fvp-base*: Introduce WIC support for fvp-base* machines Kamil Dziezyk
@ 2021-06-21 16:22 ` Kamil Dziezyk
  0 siblings, 0 replies; 2+ messages in thread
From: Kamil Dziezyk @ 2021-06-21 16:22 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro, Jon Mason

From: Diego Sueiro <diego.sueiro@arm.com>

In meta-arm-bsp fvp-base switched to wic images. Hence, make the appropriate
changes to also use wic images in meta-arm-autonomy.

Change-Id: I34d68fee11ea339fb52a97d7593e373aa69faa1c
Issue-Id: SCM-2329
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
(cherry picked from commit b2031ed7ca8faaf82cf74208825999ed8cbd44af)
---
 .../conf/machine/fvp-base-extra-settings.inc    | 16 ++++++++++++++++
 .../wic/arm-autonomy-fvp-base-disk.wks.in       | 17 +++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-fvp-base-disk.wks.in

diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc
index eb16bc8..91a9c2e 100644
--- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc
+++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/fvp-base-extra-settings.inc
@@ -4,4 +4,20 @@
 # default rootfs, so use vda3 for guest lvm
 XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/vda3"
 
+# 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-fvp-base-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"
+
 XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-fvp-base-disk.wks.in b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-fvp-base-disk.wks.in
new file mode 100644
index 0000000..dfd4c23
--- /dev/null
+++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic/arm-autonomy-fvp-base-disk.wks.in
@@ -0,0 +1,17 @@
+# short-description: Create a disk image
+# long-description: Creates a partitioned disk image that the user
+# can directly dd to boot media.
+
+# For FVP Base first partition is empty to keep compatibility with disk.img
+part --label empty --source empty --ondisk sda --size="1M" --system-id 8e --align 1024
+
+# Second partition is rootfs normally populated as /dev/vda2
+part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
+
+# Third partition to accomodate guests images normally populated as /dev/vda3 (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
+
+# Fourth partition is user defined entry normally populated as /dev/vda4
+${AUTONOMY_HOST_EXTRA_PARTITION}
+
+bootloader --ptable msdos
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-21 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 16:22 [hardknott][PATCH v2 1/2] arm-bsp/fvp-base*: Introduce WIC support for fvp-base* machines Kamil Dziezyk
2021-06-21 16:22 ` [hardknott][PATCH v2 2/2] arm-autonomy/fvp-base: Make usage of wic images Kamil Dziezyk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.