1.. SPDX-License-Identifier: GPL-2.0+ 2.. sectionauthor:: Stephan Gerhold <stephan@gerhold.net> 3 4ST-Ericsson U8500 Samsung "stemmy" board 5======================================== 6 7The "stemmy" board supports Samsung smartphones released with 8the ST-Ericsson NovaThor U8500 SoC, e.g. 9 10 +---------------------------+----------+--------------+----------------+ 11 | Device | Model | Codename | U-Boot | 12 +===========================+==========+==============+================+ 13 | Samsung Galaxy Ace 2 | GT-I8160 | codina | ``u-boot.bin`` | 14 +---------------------------+----------+--------------+----------------+ 15 | Samsung Galaxy Amp | SGH-I407 | kyle | ``u-boot.img`` | 16 +---------------------------+----------+--------------+----------------+ 17 | Samsung Galaxy Beam | GT-I8530 | gavini | ``u-boot.bin`` | 18 +---------------------------+----------+--------------+----------------+ 19 | Samsung Galaxy Exhibit | SGH-T599 | codina (TMO) | ``u-boot.bin`` | 20 +---------------------------+----------+--------------+----------------+ 21 | Samsung Galaxy S Advance | GT-I9070 | janice | ``u-boot.bin`` | 22 +---------------------------+----------+--------------+----------------+ 23 | Samsung Galaxy S III mini | GT-I8190 | golden | ``u-boot.img`` | 24 +---------------------------+----------+--------------+----------------+ 25 | Samsung Galaxy Xcover 2 | GT-S7710 | skomer | ``u-boot.img`` | 26 +---------------------------+----------+--------------+----------------+ 27 28At the moment, U-Boot is intended to be chain-loaded from 29the original Samsung bootloader, not replacing it entirely. 30 31Installation 32------------ 33First, setup ``CROSS_COMPILE`` for ARMv7. Then, build U-Boot for ``stemmy``:: 34 35 $ export CROSS_COMPILE=arm-none-eabi- 36 $ make stemmy_defconfig 37 $ make 38 39This will build ``u-boot.bin`` in the configured output directory. 40 41For newer devices (check ``u-boot.img`` in the table above), the U-Boot binary 42has to be packed into an Android boot image. Devices with ``u-boot.bin`` boot 43the raw U-Boot binary from the boot partition. You can build the Android boot 44image with ``mkbootimg``, e.g. from from android-7.1.2_r37_:: 45 46 $ mkbootimg \ 47 --kernel=u-boot.bin \ 48 --base=0x00000000 \ 49 --kernel_offset=0x00100000 \ 50 --ramdisk_offset=0x02000000 \ 51 --tags_offset=0x00000100 \ 52 --output=u-boot.img 53 54.. _android-7.1.2_r37: https://android.googlesource.com/platform/system/core/+/refs/tags/android-7.1.2_r37/mkbootimg/mkbootimg 55 56To flash the U-Boot binary, enter the Samsung download mode 57(press Power + Home + Volume Down). Use Heimdall_ to flash the U-Boot image to 58the Android boot partition:: 59 60 $ heimdall flash --Kernel u-boot.(bin|img) 61 62If this is not working but there are messages like ``Android recovery image`` in 63the UART console, you can try flashing to the recovery partition instead:: 64 65 $ heimdall flash --Kernel2 u-boot.(bin|img) 66 67.. _Heimdall: https://gitlab.com/BenjaminDobell/Heimdall 68 69After a reboot the U-Boot prompt should appear via UART. Unless interrupted it 70automatically boots to USB Fastboot mode where Android boot images can be booted 71via ``fastboot boot boot.img``. It is mainly intended to boot mainline Linux, 72but booting original Samsung Android boot images is also supported (e.g. for 73charging). 74 75UART 76---- 77UART is available through the micro USB port, similar to the Carkit standard. 78With a ~619kOhm resistor between ID and GND, 1.8V RX/TX is available at D+/D-. 79 80.. note:: 81 Make sure to connect the UART cable **before** turning on the phone. 82