summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorSam Protsenko <[email protected]>2025-07-09 17:29:25 -0500
committerMinkyu Kang <[email protected]>2025-07-25 10:17:21 +0900
commitfd76fdc34efd5709bb2cd47e3d099e2cffcb2192 (patch)
tree2ae59ccbfe1ce65b794001f3d7ce5c52eee5c410 /board/samsung
parent9472bc2b504603716fe79360e917a1b2aaf456ae (diff)
board: samsung: e850-96: Enable EFI Capsule Update mechanism
Make it possible to update E850-96 firmware binaries using EFI Capsule Update mechanism. For example, to update the U-Boot binary, the capsule file can be generated like this: $ ./tools/mkeficapsule --index 4 \ --guid 629578c3-ffb3-4a89-ac0c-611840727779 \ u-boot.bin capsule4.bin The resulting 'capsule4.bin' should be copied to ESP partition (in /boot/efi/EFI/UpdateCapsule/ directory). Then after reboot U-Boot will update the 'bootloader' area in eMMC Boot Partition A (boot0) and remove the capsule file, by EFI boot manager executed as a part of Standard Boot: Applying capsule capsule4.bin succeeded. Reboot after firmware update. The kernel will also expose the ESRT table information via SysFS in /sys/firmware/efi/esrt/entries. Signed-off-by: Sam Protsenko <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/e850-96/e850-96.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/board/samsung/e850-96/e850-96.c b/board/samsung/e850-96/e850-96.c
index addfe046097..4e034b9bd3b 100644
--- a/board/samsung/e850-96/e850-96.c
+++ b/board/samsung/e850-96/e850-96.c
@@ -4,6 +4,7 @@
* Author: Sam Protsenko <[email protected]>
*/
+#include <efi_loader.h>
#include <env.h>
#include <init.h>
#include <mapmem.h>
@@ -15,6 +16,45 @@
#define OTP_CHIPID0 0x4
#define OTP_CHIPID1 0x8
+struct efi_fw_image fw_images[] = {
+ {
+ .image_type_id = E850_96_FWBL1_IMAGE_GUID,
+ .fw_name = u"E850-96-FWBL1",
+ .image_index = 1,
+ },
+ {
+ .image_type_id = E850_96_EPBL_IMAGE_GUID,
+ .fw_name = u"E850-96-EPBL",
+ .image_index = 2,
+ },
+ {
+ .image_type_id = E850_96_BL2_IMAGE_GUID,
+ .fw_name = u"E850-96-BL2",
+ .image_index = 3,
+ },
+ {
+ .image_type_id = E850_96_BOOTLOADER_IMAGE_GUID,
+ .fw_name = u"E850-96-BOOTLOADER",
+ .image_index = 4,
+ },
+ {
+ .image_type_id = E850_96_EL3_MON_IMAGE_GUID,
+ .fw_name = u"E850-96-EL3-MON",
+ .image_index = 5,
+ },
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = "mmc 0="
+ "fwbl1.img raw 0x0 0x18 mmcpart 1;"
+ "epbl.img raw 0x18 0x98 mmcpart 1;"
+ "bl2.img raw 0xb0 0x200 mmcpart 1;"
+ "bootloader.img raw 0x438 0x1000 mmcpart 1;"
+ "el3_mon.img raw 0x1438 0x200 mmcpart 1",
+ .num_images = ARRAY_SIZE(fw_images),
+ .images = fw_images,
+};
+
int dram_init(void)
{
return fdtdec_setup_mem_size_base();