summaryrefslogtreecommitdiffstats
path: root/content/u-boot-galaxyS3.rst
diff options
context:
space:
mode:
Diffstat (limited to 'content/u-boot-galaxyS3.rst')
-rw-r--r--content/u-boot-galaxyS3.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/content/u-boot-galaxyS3.rst b/content/u-boot-galaxyS3.rst
index 073ee38..16d45c4 100644
--- a/content/u-boot-galaxyS3.rst
+++ b/content/u-boot-galaxyS3.rst
@@ -1,12 +1,12 @@
:title: U-Boot for the Galaxy S3: an investigation
-:date: 2016-11-26 21:19
+:date: 2017-02-02 17:31
:tags: bootloader, kernel, free software, phone
:category: General
:author: Wolfgang Wiedmeyer
-:status: draft
-:summary: The Galaxy S3 comes with a bootloader named S-Boot which is a proprietary bootloader from Samsung. In this post, I want to collect information about the possibilty to run the bootloader U-Boot on the phone.
+:status: published
+:summary: The Galaxy S3 comes with a bootloader named S-Boot which is a proprietary bootloader from Samsung. In this post, I want to collect information about the possibilty to run the free bootloader U-Boot on the phone.
-The Galaxy S3 (GT-I9300) comes with a bootloader named S-Boot which is a proprietary bootloader from Samsung. In this post, I want to collect information about the possibilty to run the bootloader U-Boot on the phone. I personally didn't work on the bootloader part, but I became interested in it when `I tried to get the mainline kernel working and S-Boot prevented the mainline kernel from booting due to a bug <{filename}/mainline-kernel-galaxyS3.rst>`_.
+The Galaxy S3 (GT-I9300) comes with a bootloader named S-Boot which is a proprietary bootloader from Samsung. In this post, I want to collect information about the possibilty to run the free bootloader U-Boot on the phone. I personally didn't work on the bootloader part, but I became interested in it when I tried to get the mainline kernel working and S-Boot prevented the mainline kernel from booting due to a bug.
Benefits
########
@@ -18,7 +18,7 @@ A free bootloader would also make new security features like verified boot possi
Is it possible?
###############
-In 2013, Dominik Marszk and Adam Outler managed to boot U-Boot from the SD card. Their U-Boot source can be found `here <https://github.com/Rebell/exynos4_uboot>`_. The Galaxy S3 tries to boot from eMMC (internal memory) first and if that fails, it attempts to boot from other possible boot devices like the SD card. In order to force booting from SD card, Adam corrupted the data transfer between CPU and eMMC by attaching a thin wire to one of the data lines that shortens the data line. After U-Boot has booted, it enters a 10 second delay to allow to release the line shortening. At this point, it's possible to talk to the U-Boot command line via `UART <{filename}/mainline-kernel-galaxyS3.rst#uart>`_.
+In 2013, Dominik Marszk and Adam Outler managed to boot U-Boot from the SD card. Their U-Boot source can be found `here <https://github.com/Rebell/exynos4_uboot>`_. The Galaxy S3 tries to boot from eMMC (internal memory) first and if that fails, it attempts to boot from other possible boot devices like the SD card. In order to force booting from SD card, Adam corrupted the data transfer between CPU and eMMC by attaching a thin wire to one of the data lines that shortens the data line. After U-Boot has booted, it enters a 10 second delay to allow to release the line shortening. At this point, it's possible to talk to the U-Boot command line via UART.
`These <https://github.com/Rebell/exynos4_uboot/tree/master/sd_fuse>`_ are the files they used to create the SD card. They come from `ODROID-X <http://www.hardkernel.com/main/products/prdt_info.php?g_code=G133999328931>`_ bootloader sources which are based on Exynos4412, just like the Galaxy S3. The binary p4412_s_fwbl1.bin is especially interesting because it is a first stage bootloader that drops the secure boot process and jumps to an unsigned payload. This signed first stage bootloader also works on the Galaxy S3 because the same signing key is fused into all Exynos4412-based development boards and handhelds.
@@ -28,7 +28,7 @@ The advantage of Dominik's and Adam's approach is the possibility to replace the
There is some info floating around about a recovery procedure that boots from the SD card, but replaces the existing bootloader which resides in the bootloader partition on eMMC. `There are claims <http://forum.xda-developers.com/showpost.php?p=47234165&postcount=220>`_ that it's possible to trigger this process with more recent Galaxy S3 devices by pressing the menu key, both volume keys and the power key. Otherwise, it seems to be necessary to disassemble the device and shorten a very small resistor with a pair of tweezers, according to `leaked Samsung documents <https://smyl.es/samsung-galaxy-iii-s3-gt-i9300-jtag-leaked-document-how-to-repair-soft-bricked-galaxy-s3/>`_. This procedure could be an alternative to corrupting the data transfer between CPU and eMMC.
-As part of `my work with the mainline kernel on the Galaxy S3 <{filename}/mainline-kernel-galaxyS3.rst>`_, I submitted a `bootloader-related patch that allows to reboot the device in the recovery and download mode <https://patchwork.kernel.org/patch/9345815/>`_. In the discussion about the patch with the kernel maintainer Krzysztof Kozlowski, it turned out that Trats2, which is the Galaxy S3 released for Tizen, is supported by U-Boot. However, S-Boot was not replaced. Instead, U-Boot gets chainloaded after booting a (probably) adapted S-Boot image. `Krzysztof's mail <http://www.spinics.net/lists/arm-kernel/msg534042.html>`_ provides more info how the Trats2 image could be installed.
+As part of my work with the mainline kernel on the Galaxy S3, I submitted a `bootloader-related patch that allows to reboot the device in the recovery and download mode <https://patchwork.kernel.org/patch/9345815/>`_. In the discussion about the patch with the kernel maintainer Krzysztof Kozlowski, it turned out that Trats2, which is the Galaxy S3 released for Tizen, is supported by U-Boot. However, S-Boot was not replaced. Instead, U-Boot gets chainloaded after booting a (probably) adapted S-Boot image. `Krzysztof's mail <http://www.spinics.net/lists/arm-kernel/msg534042.html>`_ provides more info how the Trats2 image could be installed.
Freedom-wise, chainloading U-Boot after S-Boot is not attractive as no non-free software is replaced. But having the Linux kernel loaded by U-Boot would make working on the mainline kernel easier because I don't have to figure out all the differences between U-Boot and S-Boot and patch the kernel. The only question in this regard is whether it's less work to stick with S-Boot and work around the differences or to get U-Boot for Trats2 working with a Galaxy S3 targeting Android and avoid having to patch the kernel.