-
Notifications
You must be signed in to change notification settings - Fork 2
Home
What is it? Originally a port of u-boot to the SGH-T959P (Samsung Galaxy S Fascinate 4G, released by Telus in Canada), it now supports most variants of the first-gen Galaxy S devices. You can use u-boot's SPL to replace the stock IPL or you can leave the IPL/PBL/SBL untouched in which case u-boot replaces the kernel.
How to Build?
$ export ARCH=arm CROSS_COMPILE=<PATH_TO_CC>
$ make s5p_aries_defconfig
$ make -jN
The resulting u-boot.bin can be flashed with heimdall:
$ heimdall flash --KERNEL u-boot.bin
You can (optionally) use the u-boot SPL to replace the stock IBL. To do this, copy the aries-spl.bin file to the SD card and use the boot menu option to update the SPL. [b]Do not use Heimdall or Odin![/b] It appears that Odin/Heimdall/iROM (I don't know which is to blame) has some special handling for the IBL and this causes a hard brick. [b]If you decide to do this, make sure you're willing to use the unbrickable mod if something goes wrong.[/b]
Where does it load the kernel from? For a regular Android boot, it loads the kernel from offset 0x1980000 on the OneNAND (this can be changed in include/configs/s5p_aries.h). For a recovery boot (volume up held), the kernel is loaded from offset 0x2380000.
To flash new Android kernel (so it'll be booted by u-boot in Android boot) use following command
heimdall flash --RECOVERY uImage
Mainline linux kernels are booted via extlinux. You need a bootable vfat partition with a file in extlinux/extlinux.conf (or /boot/extlinux/extlinux.conf) that describes where the kernels are. More info at https://systemd.io/BOOT_LOADER_SPECIFICATION
To switch between modes (eg dual-boot Android and Mainline), see the Boot Modes section below.
Android Support This does not work with most Android ROMs as it uses a different partition layout. For testing a custom 4.4 Android build is used on an SGH-T959P but this build is not released. If interested, contact xc-racer99 by creating an issue here on GitHub.
Linux Support Fedora, Debian, Arch Linux, Ubuntu, and PostmarketOS are known to have been booted using https://github.com/PabloPL/linux
Does it fix the bootloader bug? The first-gen Galaxy S devices have a bug in the bootloader that prevents loading newer kernels than ~v3.4 without a patch such as https://github.com/tom3q/linux/commit/af96ebcba03b607ab93bd5778301890feb038479 because the SBL doesn't disable all of the caches which messes up the kernel. This bootloader does not exhibit that behaviour.
Can IBL/PBL/SBL be replaced? Yes, but not entirely - it requires a signed first-stage bootloader that was released with the Odroid-T u-boot (among other S5PC110 devices) - see https://forum.xda-developers.com/showthread.php?t=1333424 for more info. Note that you can emulate the Unbrickable mod by wiping the IBL/PBL partition. This can be done by mapping the PBL partition in the OneNAND layout and then running erase_image on it. Check out https://github.com/xc-racer99/u-boot-aries/pull/31 for some information.
Do Android kernels need modding? For the current revision, it is recommended that you apply https://github.com/xc-racer99/android_kernel_samsung_aries/commit/66c71640f2bfd4911b4c95971427f48f4c4e30f8 so that the bootanimation works properly. For older versions (before the SPL was merged), when using a kernel of less than v3.8 (aka all Android kernels), a backport of f0cdbdd6d8ada085199e6250cbf3b7fbe69392ac is required so that the kernel doesn't get stuck in an infinite loop. This will also not cause problems on newer u-boot revisions but is isn't strictly necessary.
Boot modes
- Normal boot (power key only) - boot into last booted mode (for example boot from mmc/sdcard)
- Boot menu
- Power key + Home - Galaxy S/Galaxy S B
- Power key + vol up - Other
- Recovery boot (only when last boot mode was Android)
- Power key + Vol up - Galaxy S/Galaxy S B
- Power key + vol down - Other
- By running "reboot recovery" from an Android kernel which puts a value into the S5PC110_INFORM6 register
What Works?
- Booting from OneNAND, MMC and SD card
- Serial - follow https://forum.xda-developers.com/showthread.php?t=1901376
- I have had success with 619k and 512k resistors and a Raspberry Pi
- MMC
- Self-update from SD card
- OneNAND
- Mass Storage
What Doesn't?
- Currently nothing that is known... Previous problems included slow operation, washed out colours, and pseudo bad-blocks on the OneNAND but these have all been fixed.