mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-07 04:58:57 +00:00
arm-autonomy/autonomy-host: add user defined partition to wic image
With this patch user can define additional partition entry, via AUTONOMY_HOST_EXTRA_PARTITION variable. Issue-Id: SCM-1514 Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com> Change-Id: Ic103a40de44ea6cd88caa60f06033a9c678b265f Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -159,3 +159,37 @@ and everything between `---Guest Config Start---` and
|
||||
Any copies of variables that start `MC_GUEST` must be altered to avoid
|
||||
collisions (e.g. `MC_GUEST_2_*`), and the name of the conf file must also
|
||||
be added to BBMULTICONFIG.
|
||||
|
||||
|
||||
Guest with provisioned disk
|
||||
----------------
|
||||
|
||||
To add guest rootfs partition to host wic image,
|
||||
set `AUTONOMY_HOST_EXTRA_PARTITION` with proper wks partition entry, e.g:
|
||||
|
||||
```
|
||||
AUTONOMY_HOST_EXTRA_PARTITION = "part --label provisioned-guest --source rawcopy --fstype=ext4 --ondisk sda --align 1024 \
|
||||
--sourceparams=file=${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.ext4"
|
||||
```
|
||||
|
||||
inside host.conf file.
|
||||
|
||||
The rest of the configuration has to be appended to guest.conf file:
|
||||
|
||||
```
|
||||
XENGUEST_IMAGE_DISK_SIZE = "0"
|
||||
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG = "file://\${TOPDIR}/path/to/rootdisk.cfg"
|
||||
XENGUEST_IMAGE_DISK_DEVICE = "_GUEST_DISK_DEVICE_"
|
||||
XENGUEST_IMAGE_ROOT = "/dev/xvda"
|
||||
IMAGE_ROOTFS_SIZE = "102400"
|
||||
IMAGE_FSTYPES = "ext4"
|
||||
```
|
||||
|
||||
content of rootdisk.cfg"
|
||||
|
||||
```
|
||||
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
|
||||
```
|
||||
|
||||
`_GUEST_DISK_DEVICE_` should be substituted with `/dev/sdaX`,
|
||||
according to wks file.
|
||||
|
||||
@@ -8,4 +8,7 @@ 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
|
||||
|
||||
# Third partition is user defined entry normally populated as /dev/sda3
|
||||
${AUTONOMY_HOST_EXTRA_PARTITION}
|
||||
|
||||
bootloader --ptable msdos
|
||||
|
||||
@@ -11,4 +11,7 @@ part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
|
||||
# Third partition to accomodate guests images normally populated as /dev/sda3 (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/sda4
|
||||
${AUTONOMY_HOST_EXTRA_PARTITION}
|
||||
|
||||
bootloader --ptable msdos --configfile="${GRUB_CFG_FILE}"
|
||||
|
||||
Reference in New Issue
Block a user