Project

General

Profile

BootloadersFreedom » History » Version 54

Denis 'GNUtoo' Carikli, 03/28/2020 11:54 PM

1 1 Denis 'GNUtoo' Carikli
h1. Bootloaders
2
3 40 Denis 'GNUtoo' Carikli
h2. Introduction
4
5
In order to run free software bootloaders, we need the ability to run the code we want at boot.
6
7
However in most smartphones and many tablets use code signature at boot, which prevent us to run free software bootloader.
8
9
In practice:
10
* Some system on a chip either don't implement code signature or the implementation is not used or tested.
11
* For some other system on a chip, it's up to the device vendor to choose to implement code signature or not.
12
* For some system on a chip, we don't know any devices not enforcing code signature, but we don't know who decided to enforce the code signature.
13
14 36 Denis 'GNUtoo' Carikli
h2. Devices configurations
15
16 52 Denis 'GNUtoo' Carikli
|_. Device and documentation |_. Freedom situation |_. Boot order |
17
| [[NexusSI902xBootloader| Samsung Nexus S (GT-I902x)]] | Proprietary, Signed on the tested devices | ?->USB->?->eMMC->? |
18
| [[I9100Bootloader| Samsung Galaxy S2 (GT-I9100)]] | Proprietary, probably Signed | ? |
19 49 Denis 'GNUtoo' Carikli
| [[I9100GBootloader| Samsung Galaxy S2 (GT-I9100G)]] | * Unsigned on some devices
20 52 Denis 'GNUtoo' Carikli
* Signed on some devices | ? |
21
| [[GalaxyTab2Bootloader| Samsung Galaxy Tab 2]] | Proprietary, signed | ?->USB->?->eMMC->? |
22
| [[OptimusBlackBootloader| LG Optimus black (p970)]] | unsigned, can be replaced with upstream u-boot | eMMC(MMC2)->USB |
23 39 Denis 'GNUtoo' Carikli
| Galaxy SIII (I9300)
24 10 Denis 'GNUtoo' Carikli
Galaxy SIII 4G (I9305)
25
Galaxy Note II (N7100)
26 39 Denis 'GNUtoo' Carikli
Galaxy Note II 4G (N7105) | * Proprietary, Signed
27 52 Denis 'GNUtoo' Carikli
* There is work in progress to understand if we can avoid the signature | ?->eMMC->?->USB->? |
28 31 Denis 'GNUtoo' Carikli
| Golden Delicous GTA04 | unsigned, free software | * Aux not pressed during boot: ?
29
* Aux pressed during boot: ?->SD->?->NAND
30 1 Denis 'GNUtoo' Carikli
SYS_BOOT0 = 1
31
SYS_BOOT1 = 1
32
SYS_BOOT2 = 1
33
SYS_BOOT3 = 1
34 31 Denis 'GNUtoo' Carikli
SYS_BOOT4 = 1
35
SYS_BOOT5 = AUX button
36
SYS_BOOT6 = 1 
37 52 Denis 'GNUtoo' Carikli
But cannot find Reference manual for the DM370 |
38
| Pinephone | Unsigned free software bootloader | |
39
| Librem5 | Unsigned bootloader, nonfree DDR4 controller firmware | |
40 1 Denis 'GNUtoo' Carikli
41 53 Denis 'GNUtoo' Carikli
Other devices with free software and unsigned bootloaders:
42
* Openmoko GTA01 and GTA02: cannot run Replicant (only has 128M of RAM, armv4t).
43
* Many single board computers: They are not very practical to use as a smartphone or tablet, though they could be added along the way to Replicant 9 if there is some interest
44
* Older PDA like the OMAP4 Blaze: Check if they can *easily* be found: they were very expensive. Also check the upstream status. See [[TargetsEvaluation]] for such devices.
45 1 Denis 'GNUtoo' Carikli
46 53 Denis 'GNUtoo' Carikli
Other:
47
* Optimus 3D: There is probably a leaked key for signing the bootloader
48
* [[FindDevicesWithUnsignedBootloaedrs]]: Project to find devices with free software bootloader at a very large scale
49 50 Denis 'GNUtoo' Carikli
50 36 Denis 'GNUtoo' Carikli
h2. System on a chip
51 8 Denis 'GNUtoo' Carikli
52 33 Denis 'GNUtoo' Carikli
|_. SOC and documentation |_. Freedom situation |
53 47 Denis 'GNUtoo' Carikli
| [[OMAPBootrom|OMAP]] | * No known bug
54
* Some devices are not signed |
55 38 Denis 'GNUtoo' Carikli
| [[Exynos4Bootrom|Exynos 4]] | * Some or all devices are signed
56 1 Denis 'GNUtoo' Carikli
* work in progress to understand if it's possible to bypass the signature |
57
| [[BroadcomVideoCore]] | The SOCs have the ability to check signatures |
58 42 Denis 'GNUtoo' Carikli
| [[TegraBootrom]] | * Not all devices use code signature
59
* Boot from USB is possible thanks to "fusee_gelee":https://github.com/Qyriad/fusee-launcher/blob/master/report/fusee_gelee.md
60 43 Denis 'GNUtoo' Carikli
* Code can be appended to the bootrom by writing in a fuse area. Could that be used to disable code signature ? |
61 39 Denis 'GNUtoo' Carikli
| IMX 5 and 6 | * Not all devices are signed
62
* Thanks to "Ref_QBVR2017-0001.txt":https://github.com/f-secure-foundry/usbarmory/blob/master/software/secure_boot/Security_Advisory-Ref_QBVR2017-0001.txt it's possible to bypass signatures anyway, and maybe load code through USB too |
63 33 Denis 'GNUtoo' Carikli
64 54 Denis 'GNUtoo' Carikli
h2. Tools
65
66
|_. Tool |_. Uses |_. supported hardware |_. Pakckages | Howto |
67
| "omap-usb-boot":https://git.replicant.us/contrib/PaulK/omap-usb-boot/ | * checking if the device is has restricted boot
68
                  * Loading bootloaders from USB
69
                  * booting on a different boot media | OMAP3, OMAP4, OMAP5 | "Parabola":https://www.parabola.nu/packages/pcr/x86_64/omap-usb-boot/ , "Archlinux through AUR":https://aur.archlinux.org/packages/omap-usb-boot/ | * [[FindOMAPDevicesWithUnsignedBootloderFromUSB| check if the device has restricted boot through USB]] |
70
| "omap-u-boot-utils":https://nmenon.github.io/omap-u-boot-utils/ | * Loading bootloaders from USB
71
                      * Loading bootloaders from the UART | OMAP3, OMAP4 | "Parabola":https://www.parabola.nu/packages/pcr/x86_64/omap-u-boot-utils-git/ , "Archlinux through AUR":https://aur.archlinux.org/packages/omap-u-boot-utils-git/ | ? |
72
| "crucible":https://github.com/f-secure-foundry/crucible | * checking fuses settings | i.MX53, i.MX6DL, i.MX6DQ, i.MX6SL, i.MX6SLL, i.MX6SX, i.MX6UL, i.MX6ULL, i.MX6ULZ, i.MX7D, i.MX7ULP | TODO | TODO |
73
| "cbootimage":http://http.download.nvidia.com/tegra-public-appnotes/bct-overview.html | * Generate images
74
               * Dump images (including signatures?) | Tegra ? | "Parabola":https://www.parabola.nu/packages/libre/x86_64/cbootimage/ , "Archlinux through AUR":https://aur.archlinux.org/packages/cbootimage/ |
75
| "tegrarcm":https://github.com/NVIDIA/tegrarcm | * Load bootloaders from USB | Tegra ? | TODO | TODO |
76
| "0xFFFF":https://github.com/pali/0xFFFF | * Load signed bootloaders (-c) from USB | OMAP3430 and OMAP3630
77
                                                                                      Might be easy to add more OMAP3 by just commenting code in cold-flash.c | TODO, patch for libusb1 | TODO |
78
| "sunxi-tools":https://github.com/linux-sunxi/sunxi-tools | ? | Allwinner SOCs? | Parabola, archlinux | TODO |
79
80
81 41 Denis 'GNUtoo' Carikli
h2. Links to cathegorize:
82 15 Denis 'GNUtoo' Carikli
83 25 Denis 'GNUtoo' Carikli
* https://www.theiphonewiki.com/ has a list of "Bootrom security issues":https://www.theiphonewiki.com/wiki/Bootrom for apple devices.
84 26 Denis 'GNUtoo' Carikli
* "Ti Nspire":https://hackspire.org ? RSA exponent issues?
85 10 Denis 'GNUtoo' Carikli
86 9 Denis 'GNUtoo' Carikli
== See also ==
87 8 Denis 'GNUtoo' Carikli
88
* [[Upstream]]