board: samsung: e850-96: Provide bootstd default env

Add default environment variables needed for Standard Boot enablement as
described in [1]. Also rework the eMMC partition table for Linux boot so
it only has two partitions:

  1. EFI System Partition (EFI vars, GRUB efi app, firmware files)
  2. rootfs partition (Debian rootfs, /boot, extlinux.conf, boot.scr)

Both partitions are made bootable so that 'bootflow' command can detect
all loader files (rootfs might contain extlinux.conf and boot.scr).

'ldfw' partition is removed too, as ldfw.bin can be loaded from ESP now
(from /EFI/firmware/ldfw.bin).

Android partitons will be added later, once Android boot is actually
enabled for E850-96.

Notes:
  - $kernel_comp_addr_r uses the same address (0x88000000) as LDFW
    buffer (in board/samsung/e850-96/fw.c), but that's fine, as LDFW
    will be copied to another RAM location (Secure World) by SMC
    command, so it's only used temporarily on startup
  - addition assignment (+=) operation is used for $partitions to avoid
    spaces added by newlines, so that $partitions can be used in the
    shell with no quotes

Now it's possible to successfully automatically boot Debian rootfs:

    => env default -f -a
    => env save
    => gpt write mmc 0 $partitions
    => reset

[1] doc/develop/bootstd/overview.rst

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
Sam Protsenko 2025-01-16 17:01:30 -06:00 committed by Minkyu Kang
parent ccfd8de541
commit 16218681a5

View file

@ -1,26 +1,11 @@
partitions=
uuid_disk=${uuid_gpt_disk};
name=efs,start=512K,size=20M,uuid=${uuid_gpt_efs};
name=env,size=16K,uuid=${uuid_gpt_env};
name=kernel,size=30M,uuid=${uuid_gpt_kernel};
name=ramdisk,size=26M,uuid=${uuid_gpt_ramdisk};
name=dtbo,size=1M,uuid=${uuid_gpt_dtbo};
name=ldfw,size=4016K,uuid=${uuid_gpt_ldfw};
name=keystorage,size=8K,uuid=${uuid_gpt_keystorage};
name=tzsw,size=1M,uuid=${uuid_gpt_tzsw};
name=harx,size=2M,uuid=${uuid_gpt_harx};
name=harx_rkp,size=2M,uuid=${uuid_gpt_harx_rkp};
name=logo,size=40M,uuid=${uuid_gpt_logo};
name=super,size=3600M,uuid=${uuid_gpt_super};
name=cache,size=300M,uuid=${uuid_gpt_cache};
name=modem,size=100M,uuid=${uuid_gpt_modem};
name=boot,size=100M,uuid=${uuid_gpt_boot};
name=persist,size=30M,uuid=${uuid_gpt_persist};
name=recovery,size=40M,uuid=${uuid_gpt_recovery};
name=misc,size=40M,uuid=${uuid_gpt_misc};
name=mnv,size=20M,uuid=${uuid_gpt_mnv};
name=frp,size=512K,uuid=${uuid_gpt_frp};
name=vbmeta,size=64K,uuid=${uuid_gpt_vbmeta};
name=metadata,size=16M,uuid=${uuid_gpt_metadata};
name=dtb,size=1M,uuid=${uuid_gpt_dtb};
name=userdata,size=-,uuid=${uuid_gpt_userdata}
kernel_addr_r=0x80000000
kernel_comp_addr_r=0x88000000
kernel_comp_size=0x4000000
fdt_addr_r=0x8c000000
scriptaddr=0x8c100000
pxefile_addr_r=0x8c200000
ramdisk_addr_r=0x8c300000
fdtfile=CONFIG_DEFAULT_FDT_FILE
partitions=name=esp,start=512K,size=128M,bootable,type=system;
partitions+=name=rootfs,size=-,bootable,type=linux