Dzmitry Sankouski <dsankouski@gmail.com>
This document describes the information about Samsung A(7/5/3) 2017 midrange phones and u-boot usage steps.
U-Boot can be used as a chain-loaded bootloader to replace Samsung's original SBOOT bootloader. It is loaded as an Android boot image through SBOOT.
- 4.7 AMOLED display
- Exynos 7870 SoC
- 16GB flash
- 2GB RAM
- 5.2 AMOLED display
- Exynos 7880 SoC
- 32GB flash
- 3GB RAM
- 5.7 AMOLED display
- Exynos 7880 SoC
- 32GB flash
- 3GB RAM
First, setup CROSS_COMPILE
for aarch64. Then, build U-Boot for your phone, for example a5y17lte
:
$ export CROSS_COMPILE=<aarch64 toolchain prefix>
$ make a5y17lte_defconfig
$ make
This will build u-boot.bin
in the configured output directory.
A payload file is a file to be used instead of linux kernel in android boot image. This file will be loaded into memory, and executed by SBOOT, and is therefore SBOOT's payload. It may be pure u-boot (with loading u-boot's payload from flash in mind), or u-boot + u-boot's payload.
- Assemble FIT image for your kernel
Once payload created, it's time for android image:
uboot=<path to u-boot.bin file>
ramdisk=<path to FIT payload file>
mkbootimg --base 0x40000000 --kernel_offset 0x00000000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --pagesize 2048 --second_offset 0x00f00000 --kernel "$uboot" --ramdisk "$ramdisk" -o uboot.img
Note, that stock Samsung bootloader ignores offsets, set in mkbootimg.
Flash like regular android boot image.