From: Tom Rini <tom.r...@gmail.com>

All of our platforms here support running EFI binaries.  We can have wic
generate a simple grub.cfg file for us that will find the root partition
via PARTUUID and utilize the device tree that is already discoverable
via the EFI configuration tables.  Assuming the EFI loader is U-Boot,
this device tree can be replaced at run-time by the normal mechanism of
loading in to memory and passing that address as an argument to bootefi.

Signed-off-by: Tom Rini <tr...@konsulko.com>
Reviewed-by: Denys Dmytriyenko <de...@konsulko.com>
Signed-off-by: Yogesh Siraswar <yoge...@ti.com>
Signed-off-by: Denys Dmytriyenko <de...@konsulko.com>
---
 conf/machine/include/k3.inc | 6 +++++-
 wic/sdimage-2part-efi.wks   | 7 +++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 wic/sdimage-2part-efi.wks

diff --git a/conf/machine/include/k3.inc b/conf/machine/include/k3.inc
index 20ab7a9..a39ddd2 100644
--- a/conf/machine/include/k3.inc
+++ b/conf/machine/include/k3.inc
@@ -44,8 +44,12 @@ IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARY} 
u-boot.${UBOOT_SUFFIX} tiboot3.bin sysf
 IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} 
tiboot3.bin"
 
 IMAGE_BOOT_FILES ?= "${IMAGE_BOOT_FILES_LEGACY}"
+IMAGE_EFI_BOOT_FILES ?= "${IMAGE_BOOT_FILES}"
 
-WKS_FILE ?= "sdimage-2part.wks"
+EFI_PROVIDER ?= "grub-efi"
+MACHINE_FEATURES += "efi"
+
+WKS_FILE ?= "sdimage-2part-efi.wks"
 do_image_wic[depends] += "virtual/bootloader:do_deploy"
 do_image_wic[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy 
mc::k3r5:ti-sci-fw:do_deploy"
 do_image_tar[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy 
mc::k3r5:ti-sci-fw:do_deploy"
diff --git a/wic/sdimage-2part-efi.wks b/wic/sdimage-2part-efi.wks
new file mode 100644
index 0000000..ffb8d24
--- /dev/null
+++ b/wic/sdimage-2part-efi.wks
@@ -0,0 +1,7 @@
+# short-description: Create SD card image with 2 partitions and EFI support
+# long-description: Creates a partitioned SD card image for TI platforms that
+# supports EFI.  Boot files are located in the first vfat partition with extra
+# reserved space.  We cannot use a GPT here.
+bootloader --append="rootfstype=ext4 ro"
+part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --fstype=vfat 
--label boot --active --align 1024 --use-uuid --fixed-size 128M
+part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14099): 
https://lists.yoctoproject.org/g/meta-ti/message/14099
Mute This Topic: https://lists.yoctoproject.org/mt/86750084/21656
Group Owner: meta-ti+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to