Dzmitry Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. sectionauthor:: Dzmitry Sankouski <dsankouski@gmail.com> |
| 3 | |
| 4 | Samsung 2017 A series phones |
| 5 | ============================ |
| 6 | |
| 7 | About this |
| 8 | ---------- |
| 9 | This document describes the information about Samsung A(7/5/3) 2017 midrange |
| 10 | phones and u-boot usage steps. |
| 11 | |
| 12 | U-Boot can be used as a chain-loaded bootloader to replace Samsung's original SBOOT bootloader. |
| 13 | It is loaded as an Android boot image through SBOOT. |
| 14 | |
| 15 | Phone specs |
| 16 | ----------- |
Henrik Grimler | e93158b | 2022-01-07 20:12:55 +0100 | [diff] [blame] | 17 | A3 (SM-A320) (a3y17lte) |
Tom Rini | 93ee2bb | 2022-01-19 11:06:07 -0500 | [diff] [blame] | 18 | ^^^^^^^^^^^^^^^^^^^^^^^ |
Dzmitry Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 19 | - 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 Grimler | e93158b | 2022-01-07 20:12:55 +0100 | [diff] [blame] | 26 | A5 (SM-A520) (a5y17lte) |
Tom Rini | 93ee2bb | 2022-01-19 11:06:07 -0500 | [diff] [blame] | 27 | ^^^^^^^^^^^^^^^^^^^^^^^ |
Dzmitry Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 28 | - 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 Grimler | e93158b | 2022-01-07 20:12:55 +0100 | [diff] [blame] | 35 | A7 (SM-A720) (a5y17lte) |
Tom Rini | 93ee2bb | 2022-01-19 11:06:07 -0500 | [diff] [blame] | 36 | ^^^^^^^^^^^^^^^^^^^^^^^ |
Dzmitry Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 37 | - 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 | |
| 44 | Installation |
| 45 | ------------ |
| 46 | |
| 47 | Building u-boot |
| 48 | ^^^^^^^^^^^^^^^ |
| 49 | |
| 50 | First, setup ``CROSS_COMPILE`` for aarch64. |
| 51 | Then, build U-Boot for your phone, for example ``a5y17lte``:: |
| 52 | |
| 53 | $ export CROSS_COMPILE=<aarch64 toolchain prefix> |
| 54 | $ make a5y17lte_defconfig |
| 55 | $ make |
| 56 | |
| 57 | This will build ``u-boot.bin`` in the configured output directory. |
| 58 | |
| 59 | Payload |
| 60 | ^^^^^^^ |
| 61 | What is a payload? |
| 62 | """""""""""""""""" |
| 63 | A payload file is a file to be used instead of linux kernel in android boot image. |
| 64 | This file will be loaded into memory, and executed by SBOOT, |
| 65 | and is therefore SBOOT's payload. |
| 66 | It may be pure u-boot (with loading u-boot's payload from flash in mind), |
| 67 | or u-boot + u-boot's payload. |
| 68 | |
Dzmitry Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 69 | Creating payload file |
| 70 | """"""""""""""""""""" |
| 71 | - Assemble FIT image for your kernel |
Dzmitry Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 72 | |
| 73 | Creating android boot image |
| 74 | """"""""""""""""""""""""""" |
| 75 | Once payload created, it's time for android image:: |
| 76 | |
Dzmitry Sankouski | d5c4ec4 | 2022-02-22 21:49:54 +0300 | [diff] [blame] | 77 | 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 Sankouski | 3e2095e | 2021-10-17 13:45:42 +0300 | [diff] [blame] | 80 | |
| 81 | Note, that stock Samsung bootloader ignores offsets, set in mkbootimg. |
| 82 | |
| 83 | Flashing |
| 84 | """""""" |
| 85 | Flash like regular android boot image. |