aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/conf/machine/include/amd-common-configurations.inc21
-rw-r--r--common/scripts/lib/wic/canned-wks/amd-usbimage.wks5
2 files changed, 25 insertions, 1 deletions
diff --git a/common/conf/machine/include/amd-common-configurations.inc b/common/conf/machine/include/amd-common-configurations.inc
index bbc8a70a..c37385d5 100644
--- a/common/conf/machine/include/amd-common-configurations.inc
+++ b/common/conf/machine/include/amd-common-configurations.inc
@@ -51,10 +51,29 @@ EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
# Also, "iso" doesn't get built even if specified explicitly
# because NOISO = "1" by default (See c787dcd in oe-core).
# Therefore, we do as follows:
-IMAGE_FSTYPES += "hddimg iso"
+IMAGE_FSTYPES += "wic hddimg iso"
NOISO = "0"
NOHDD = "0"
+WKS_FILES ?= "amd-usbimage.wks"
+
+# Contents of IMAGE_BOOT_FILES are deployed into "amd-usbimage.wks" wic image
+IMAGE_BOOT_FILES ?= " \
+ ${EFIIMGDIR}${EFIDIR}/*;EFI/BOOT/ \
+ ${EFIIMGDIR}/startup.nsh;startup.nsh \
+ ${STAGING_DATADIR}/syslinux/vesamenu.c32;vesamenu.c32 \
+ ${STAGING_DATADIR}/syslinux/libcom32.c32;libcom32.c32 \
+ ${STAGING_DATADIR}/syslinux/libutil.c32;libutil.c32 \
+ ${STAGING_DATADIR}/syslinux/ldlinux.sys;ldlinux.sys \
+ ${SYSLINUX_CFG_LIVE};syslinux.cfg \
+ ${KERNEL_IMAGETYPE} \
+ ${INITRD_IMAGE_LIVE}-${MACHINE}.cpio.gz;initrd \
+ ${ROOTFS};rootfs.img \
+"
+
+# This makes sure that boot files are deployed before do_image_wic starts execution
+do_image_wic[depends] += "${IMAGE_BASENAME}:do_bootimg"
+
IMAGE_OVERHEAD_FACTOR = "1.1"
MACHINE_FEATURES_append_amdgpu = " ${@bb.utils.contains("EXTRA_IMAGE_FEATURES", "graphics", "x11", "", d)}"
diff --git a/common/scripts/lib/wic/canned-wks/amd-usbimage.wks b/common/scripts/lib/wic/canned-wks/amd-usbimage.wks
new file mode 100644
index 00000000..9ae4e627
--- /dev/null
+++ b/common/scripts/lib/wic/canned-wks/amd-usbimage.wks
@@ -0,0 +1,5 @@
+# short-description: Create USB image with files from var IMAGE_BOOT_FILES
+# long-description: Creates a USB image with all files in the IMAGE_BOOT_FILES
+# var e.g. bootloader, initrd, kernel & rootfs.img.
+
+part /boot --source bootimg-partition --ondisk sda --fstype=vfat --label mel-live --active --align 1024