blob: b7f299d1c7dda3c719adbdacd9f6be2be9937bf5 [file] [log] [blame]
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +03001.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Dzmitry Sankouski <dsankouski@gmail.com>
3
4Samsung 2017 A series phones
5============================
6
7About this
8----------
9This document describes the information about Samsung A(7/5/3) 2017 midrange
10phones and u-boot usage steps.
11
12U-Boot can be used as a chain-loaded bootloader to replace Samsung's original SBOOT bootloader.
13It is loaded as an Android boot image through SBOOT.
14
15Phone specs
16-----------
Henrik Grimler2492c462022-01-07 20:12:55 +010017A3 (SM-A320) (a3y17lte)
Tom Rinid8339802022-01-19 11:06:07 -050018^^^^^^^^^^^^^^^^^^^^^^^
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +030019- 4.7 AMOLED display
20- Exynos 7870 SoC
21- 16GB flash
22- 2GB RAM
23
24.. A3 2017 wiki page: https://en.wikipedia.org/wiki/Samsung_Galaxy_A3_(2017)
25
Henrik Grimler2492c462022-01-07 20:12:55 +010026A5 (SM-A520) (a5y17lte)
Tom Rinid8339802022-01-19 11:06:07 -050027^^^^^^^^^^^^^^^^^^^^^^^
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +030028- 5.2 AMOLED display
29- Exynos 7880 SoC
30- 32GB flash
31- 3GB RAM
32
33.. A5 2017 wiki page: https://en.wikipedia.org/wiki/Samsung_Galaxy_A5_(2017)
34
Henrik Grimler2492c462022-01-07 20:12:55 +010035A7 (SM-A720) (a5y17lte)
Tom Rinid8339802022-01-19 11:06:07 -050036^^^^^^^^^^^^^^^^^^^^^^^
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +030037- 5.7 AMOLED display
38- Exynos 7880 SoC
39- 32GB flash
40- 3GB RAM
41
42.. A7 2017 wiki page: https://en.wikipedia.org/wiki/Samsung_Galaxy_A7_(2017)
43
44Installation
45------------
46
47Building u-boot
48^^^^^^^^^^^^^^^
49
50First, setup ``CROSS_COMPILE`` for aarch64.
51Then, build U-Boot for your phone, for example ``a5y17lte``::
52
53 $ export CROSS_COMPILE=<aarch64 toolchain prefix>
54 $ make a5y17lte_defconfig
55 $ make
56
57This will build ``u-boot.bin`` in the configured output directory.
58
59Payload
60^^^^^^^
61What is a payload?
62""""""""""""""""""
63A payload file is a file to be used instead of linux kernel in android boot image.
64This file will be loaded into memory, and executed by SBOOT,
65and is therefore SBOOT's payload.
66It may be pure u-boot (with loading u-boot's payload from flash in mind),
67or u-boot + u-boot's payload.
68
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +030069Creating payload file
70"""""""""""""""""""""
71- Assemble FIT image for your kernel
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +030072
73Creating android boot image
74"""""""""""""""""""""""""""
75Once payload created, it's time for android image::
76
Dzmitry Sankouski24e80782022-02-22 21:49:54 +030077 uboot=<path to u-boot.bin file>
78 ramdisk=<path to FIT payload file>
79 mkbootimg --base 0x40000000 --kernel_offset 0x00000000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --pagesize 2048 --second_offset 0x00f00000 --kernel "$uboot" --ramdisk "$ramdisk" -o uboot.img
Dzmitry Sankouski83af4cb2021-10-17 13:45:42 +030080
81Note, that stock Samsung bootloader ignores offsets, set in mkbootimg.
82
83Flashing
84""""""""
85Flash like regular android boot image.