Skip to content

Exynos4412 SPL support

Simon Shields u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 7 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 7 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/7] Exynos4412 SPL support

Hi Anand,

Quoted 88 lines · Anand Moon

Hi Simon,

Quoted 76 lines · Simon Shields

Hi Anand,

Quoted 35 lines · Anand Moon

Hi Simon,

Quoted 23 lines · Simon Shields

Hi,

This patch series adds support for using U-Boot's SPL as the second stage bootloader ("BL2") on Exynos4412 SoCs.

- Patch #1 adds support for the EMMC/SD OM pin configuration, which is used by the boards I tested on.
- Patch #2 configures the magic values used to indicate system suspend state (which are identical to exynos5).
- Patch #3 renames the existing exynos4 clock/dmc initialisation code to reflect the fact that it only supports exynos4210.
- Patches #4 and #5 add/fill in structs reflecting the PMU and TZASC register layouts on exynos4412, respectively.
- Patch #6 adds the exynos4412 DMC and clock initialisation code and enables building the SPL on exynos4412 platforms.
- Patch #7 enables building the "mkexynosspl" utility for exynos4 SoCs.

The majority of the logic in patch #6 comes from a vendor u-boot dump (2010.12!), however, small portions (mostly code used for 2GB RAM initialisation) were reverse engineered from the vendor bootloader found on a GT-N7100.

Quoted 8 lines

This patch series has been tested on a GT-I9300 (exynos4412, 1GB RAM) and a GT-N7100 (exynos4412 prime, 2GB RAM), with a few additional patchsets applied for board/HW support (which I intend to upstream in the future).

Cheers,
Simon

Quoted 5 lines

Could you elaborate more on how to generate stage bootloader (BL2) image, I am not aware of such process and what are next step to create SPL for Exynos platform.

I have build these patches for Odroid-U3 boards, with no SPL enable.

Of course!

You need to add "select SUPPORT_SPL" to the relevant TARGET_ kconfig entry (e.g. [0]). Then, you need to configure the SPL suitably in include/configs/<target>.h - see [1], these values should not need changing between boards. Finally, you need to enable some SPL stuff in the defconfig (see [2]). That should allow u-boot to generate a SPL binary, which should go in spl/<target>-spl.bin.

After that, you need to assemble an image suitable for flashing to an sdcard/eMMC. I use these two scripts [3], [4] combined with this BL1 [5] (originally from the ODROID-X u-boot sources, which no longer appear to be available) for eMMC and sdcard respectively.

The usage of the script is:

./create_4412_<sd|emmc>_image.sh <bl1 binary> <spl binary> <u-boot.bin>
<outfile>

<outfile> can then be dd'd directly to an SD card or to the eMMC boot0 partition.

Hope that gets things working for you!

Cheers,
Simon

Quoted 3 lines

Best Regards
-Anand

Quoted 6 lines

[0]: https://github.com/fourkbomb/u-boot/blob/4be16a7/arch/arm/mach-exynos/Kconfig#L77
[1]: https://github.com/fourkbomb/u-boot/blob/4be16a7/include/configs/midas.h#L31-L53
[2]: https://github.com/fourkbomb/u-boot/blob/4be16a7/configs/midas_defconfig#L6-L10
[3]: https://github.com/fourkbomb/buildroot-external-midas/blob/master/board/midas/create_4412_emmc_image.sh
[4]: https://github.com/fourkbomb/buildroot-external-midas/blob/master/board/midas/create_4412_sd_image.sh
[5]: https://github.com/fourkbomb/buildroot-external-midas/blob/master/board/midas/p4412_s_fwbl1.bin

Thank you very much for this inside on building SPL image. I will give this a try on Odroid U3.

Quoted 6 lines

Do you have plan to add some low-level code to control clk memory cpu.

[0] https://github.com/SamsungARTIK/u-boot-artik/tree/artik-exynos/v2012.07/board/samsung/smdk4x12

Actually I failed to understand how the communication between the kernel binary and u-boot with out this code.

That code is not actually board-specific. It's added in patch #6.
All the BL2 does is initialise clocks and memory (DMC), then load U-Boot from the appropriate boot medium.

Quoted 3 lines

Also what about trusted zone, and do we need to get this spl image signed by Samsung/Hardkernel to make this work.

As with other Exynos SoCs in U-Boot, this doesn't support loading trustzone. As a result, you need to remove the "secure-firmware" node from the Linux kernel (you can also do it with CONFIG_OF_BOARD_SETUP[0]). Adding support for the TZSW could probably be done, but the goal here was to remove blobs from the boot process - so I don't really have any interest in adding TZSW support right now.

Quoted 3 lines

Best Regards
-Anand

Cheers,
Simon

[0]: https://github.com/fourkbomb/u-boot/blob/4be16a7/board/samsung/midas/midas.c#L377-L402