board: samsung: e850-96: Provide bootstd default env
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 16 Jan 2025 23:01:30 +0000 (17:01 -0600)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 5 Feb 2025 10:15:12 +0000 (19:15 +0900)
commit16218681a5407c1973b3009f21b010a1c09b212e
treeac628f7e5b67e7221dba9e9f898613dc25a5892f
parentccfd8de541a8ab329e575648dabb934572d55fe6
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>
board/samsung/e850-96/e850-96.env