mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-04 18:41:03 +00:00
d5c4ec4aa3
U-boot is intended to replace linux kernel in android boot image(ABL), and it's FIT payload to replace initramfs file. The boot process is similar to boot image with linux: - android bootloader (ABL) unpacks android boot image - ABL sets `linux,initrd-start property` in chosen node in unpacked FDT - ABL sets x0 register to FDT address, and passes control to u-boot - u-boot reads x0 register, and stores it in `prevbl_fdt_addr` env variable - u-boot reads `linux,initrd-start` property, and stores it in `prevbl_initrd_start_addr` In this way, u-boot bootcmd relies on `prevbl_initrd_start_addr` env variable, and boils down to `bootm $prevbl_initrd_start_addr`. If more control on boot process is desired, pack a boot script in FIT image, and put it to default configuration What done: - Rearrange defconfig option order - Add CONFIG_SAVE_PREV_BL_* options - Doc updates: - remove wrong SBOOT memory corruption note, because memory is changed during u-boot bringup process, not by SBOOT - put payload on ramdisk place in abl boot image creation step Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
85 lines
2.2 KiB
ReStructuredText
85 lines
2.2 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0+
|
|
.. sectionauthor:: Dzmitry Sankouski <dsankouski@gmail.com>
|
|
|
|
Samsung 2017 A series phones
|
|
============================
|
|
|
|
About this
|
|
----------
|
|
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.
|
|
|
|
Phone specs
|
|
-----------
|
|
A3 (SM-A320) (a3y17lte)
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
- 4.7 AMOLED display
|
|
- Exynos 7870 SoC
|
|
- 16GB flash
|
|
- 2GB RAM
|
|
|
|
.. A3 2017 wiki page: https://en.wikipedia.org/wiki/Samsung_Galaxy_A3_(2017)
|
|
|
|
A5 (SM-A520) (a5y17lte)
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
- 5.2 AMOLED display
|
|
- Exynos 7880 SoC
|
|
- 32GB flash
|
|
- 3GB RAM
|
|
|
|
.. A5 2017 wiki page: https://en.wikipedia.org/wiki/Samsung_Galaxy_A5_(2017)
|
|
|
|
A7 (SM-A720) (a5y17lte)
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
- 5.7 AMOLED display
|
|
- Exynos 7880 SoC
|
|
- 32GB flash
|
|
- 3GB RAM
|
|
|
|
.. A7 2017 wiki page: https://en.wikipedia.org/wiki/Samsung_Galaxy_A7_(2017)
|
|
|
|
Installation
|
|
------------
|
|
|
|
Building u-boot
|
|
^^^^^^^^^^^^^^^
|
|
|
|
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.
|
|
|
|
Payload
|
|
^^^^^^^
|
|
What is a payload?
|
|
""""""""""""""""""
|
|
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.
|
|
|
|
Creating payload file
|
|
"""""""""""""""""""""
|
|
- Assemble FIT image for your kernel
|
|
|
|
Creating android boot image
|
|
"""""""""""""""""""""""""""
|
|
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.
|
|
|
|
Flashing
|
|
""""""""
|
|
Flash like regular android boot image.
|