Project

General

Profile

BootloadersFreedom » History » Version 68

Denis 'GNUtoo' Carikli, 02/02/2022 10:59 AM
Add Exynos 8890 and 8895

1 1 Denis 'GNUtoo' Carikli
h1. Bootloaders
2
3 40 Denis 'GNUtoo' Carikli
h2. Introduction
4
5 59 Denis 'GNUtoo' Carikli
In order to run free software bootloaders, we need the ability to run the code we want at boot. However in most smartphones and many tablets use code signature at boot, which prevent us to run free software bootloader.
6 40 Denis 'GNUtoo' Carikli
7 59 Denis 'GNUtoo' Carikli
This usually works by hardcoding the hash of a public key either in the rom code that loads the bootloader, or in one time programmable fuses that are then used by the rom code to check the bootloader.
8 1 Denis 'GNUtoo' Carikli
9 59 Denis 'GNUtoo' Carikli
If the signature don't match, the bootloader is not executed, so the device can't boot.
10
11 40 Denis 'GNUtoo' Carikli
In practice:
12
* Some system on a chip either don't implement code signature or the implementation is not used or tested.
13 1 Denis 'GNUtoo' Carikli
* For some other system on a chip, it's up to the device vendor to choose to implement code signature or not.
14 40 Denis 'GNUtoo' Carikli
* 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.
15 59 Denis 'GNUtoo' Carikli
* Some device vendors might use default key that are part of the software to sign bootloaders.
16 1 Denis 'GNUtoo' Carikli
17
h2. Devices configurations
18
19 59 Denis 'GNUtoo' Carikli
|_. Device and documentation |_. Bootloader freedom situation |_. Boot order |
20 52 Denis 'GNUtoo' Carikli
| [[NexusSI902xBootloader| Samsung Nexus S (GT-I902x)]] | Proprietary, Signed on the tested devices | ?->USB->?->eMMC->? |
21 57 Denis 'GNUtoo' Carikli
| [[I9100Bootloader| Samsung Galaxy S2 (GT-I9100)]] | Proprietary, probably Signed | ? |
22 59 Denis 'GNUtoo' Carikli
| [[I9100GBootloader| Samsung Galaxy S2 (GT-I9100G)]] | Signed on some devices
23
                                                        No unsigned devices found yet | ? |
24 66 Denis 'GNUtoo' Carikli
| [[GalaxyTab2AndGalaxyNexusBootloaderFreedom| Samsung Galaxy Tab 2]] | Proprietary, signed | ?->USB->?->eMMC->? |
25 59 Denis 'GNUtoo' Carikli
| [[OptimusBlackBootloader| LG Optimus black (p970)]] | Unsigned, can be replaced with upstream u-boot | eMMC(MMC2)->USB |
26 39 Denis 'GNUtoo' Carikli
| Galaxy SIII (I9300)
27 10 Denis 'GNUtoo' Carikli
Galaxy SIII 4G (I9305)
28
Galaxy Note II (N7100)
29 39 Denis 'GNUtoo' Carikli
Galaxy Note II 4G (N7105) | * Proprietary, Signed
30 59 Denis 'GNUtoo' Carikli
* There is work in progress to understand if we can avoid bypass the signature checks | ?->eMMC->?->USB->? |
31
| Golden Delicous GTA04 | Unsigned, free software | * Aux not pressed during boot: ?
32 1 Denis 'GNUtoo' Carikli
* Aux pressed during boot: ?->SD->?->NAND
33
SYS_BOOT0 = 1
34
SYS_BOOT1 = 1
35
SYS_BOOT2 = 1
36
SYS_BOOT3 = 1
37 31 Denis 'GNUtoo' Carikli
SYS_BOOT4 = 1
38
SYS_BOOT5 = AUX button
39
SYS_BOOT6 = 1 
40 52 Denis 'GNUtoo' Carikli
But cannot find Reference manual for the DM370 |
41 59 Denis 'GNUtoo' Carikli
| Pinephone | Unsigned free software | |
42 52 Denis 'GNUtoo' Carikli
| Librem5 | Unsigned bootloader, nonfree DDR4 controller firmware | |
43 1 Denis 'GNUtoo' Carikli
44 53 Denis 'GNUtoo' Carikli
Other devices with free software and unsigned bootloaders:
45
* Openmoko GTA01 and GTA02: cannot run Replicant (only has 128M of RAM, armv4t).
46
* 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
47 1 Denis 'GNUtoo' Carikli
* 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.
48
49
Other:
50 53 Denis 'GNUtoo' Carikli
* Optimus 3D: There is probably a leaked key for signing the bootloader
51
* [[FindDevicesWithUnsignedBootloaedrs]]: Project to find devices with free software bootloader at a very large scale
52
53 50 Denis 'GNUtoo' Carikli
h2. System on a chip
54 36 Denis 'GNUtoo' Carikli
55 67 Denis 'GNUtoo' Carikli
|_. SOC and documentation     |_. Freedom situation |
56
| [[OMAPBootrom|OMAP]]        | * No known bug
57
                                * Some devices are not signed
58
                                * Undocumented? (probably a very good sign if it's the case) |
59 38 Denis 'GNUtoo' Carikli
| [[Exynos4Bootrom|Exynos 4]] | * Some or all devices are signed
60 1 Denis 'GNUtoo' Carikli
* work in progress to understand if it's possible to bypass the signature |
61 68 Denis 'GNUtoo' Carikli
| Exynos 8890 and 8895        | * "Exploit tool available":https://fredericb.info/2020/06/exynos-usbdl-unsigned-code-loader-for-exynos-bootrom.html#exynos-usbdl-unsigned-code-loader-for-exynos-bootrom |
62 67 Denis 'GNUtoo' Carikli
| [[BroadcomVideoCore]]       | The SOCs have the ability to check signatures |
63
| [[TegraBootrom]]            | * Not all devices use code signature
64
                                * Boot from USB is possible thanks to "fusee_gelee":https://github.com/Qyriad/fusee-launcher/blob/master/report/fusee_gelee.md
65
                                * Code can be appended to the bootrom by writing in a fuse area. Could that be used to disable code signature ? |
66
| IMX 5 and 6                 | * Not all devices are signed
67
                                * 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 |
68 33 Denis 'GNUtoo' Carikli
69 54 Denis 'GNUtoo' Carikli
h2. Tools
70
71 55 Denis 'GNUtoo' Carikli
Some of the tools below can also be used to find devices that don't have restricted boot.
72
73 54 Denis 'GNUtoo' Carikli
|_. Tool |_. Uses |_. supported hardware |_. Pakckages | Howto |
74
| "omap-usb-boot":https://git.replicant.us/contrib/PaulK/omap-usb-boot/ | * checking if the device is has restricted boot
75
                  * Loading bootloaders from USB
76
                  * 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]] |
77
| "omap-u-boot-utils":https://nmenon.github.io/omap-u-boot-utils/ | * Loading bootloaders from USB
78
                      * 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/ | ? |
79
| "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 |
80
| "cbootimage":http://http.download.nvidia.com/tegra-public-appnotes/bct-overview.html | * Generate images
81
               * Dump images (including signatures?) | Tegra ? | "Parabola":https://www.parabola.nu/packages/libre/x86_64/cbootimage/ , "Archlinux through AUR":https://aur.archlinux.org/packages/cbootimage/ |
82
| "tegrarcm":https://github.com/NVIDIA/tegrarcm | * Load bootloaders from USB | Tegra ? | TODO | TODO |
83
| "0xFFFF":https://github.com/pali/0xFFFF | * Load signed bootloaders (-c) from USB | OMAP3430 and OMAP3630
84
                                                                                      Might be easy to add more OMAP3 by just commenting code in cold-flash.c | TODO, patch for libusb1 | TODO |
85 61 Denis 'GNUtoo' Carikli
| "sunxi-tools":https://github.com/linux-sunxi/sunxi-tools | ? | Allwinner SOCs? | "Parabola":https://www.parabola.nu/packages/community/x86_64/sunxi-tools/, "Archlinux":https://www.archlinux.org/packages/community/x86_64/sunxi-tools/ | TODO |
86 62 Denis 'GNUtoo' Carikli
| "ifdtool":https://review.coreboot.org/cgit/coreboot.git/tree/util/ifdtool | * Check if there is a Management Engine firmware | Intel x86 | ? | ? |
87
| "intelmetool":https://review.coreboot.org/cgit/coreboot.git/tree/util/intelmetool | * Check if there is a Management Engine firmware, check if the BIOS region is signed (Bootguard) | Intel x86 | ? | ? |
88 54 Denis 'GNUtoo' Carikli
89 63 Denis 'GNUtoo' Carikli
TODO:
90
* Add various I.MX tools
91 64 Denis 'GNUtoo' Carikli
* Add various u-boot and/or Barebox tools
92
* Add Exynos tools (mk4412 or similar)
93 63 Denis 'GNUtoo' Carikli
94 41 Denis 'GNUtoo' Carikli
h2. Links to cathegorize:
95 15 Denis 'GNUtoo' Carikli
96 25 Denis 'GNUtoo' Carikli
* https://www.theiphonewiki.com/ has a list of "Bootrom security issues":https://www.theiphonewiki.com/wiki/Bootrom for apple devices.
97 26 Denis 'GNUtoo' Carikli
* "Ti Nspire":https://hackspire.org ? RSA exponent issues?
98 10 Denis 'GNUtoo' Carikli
99 65 Denis 'GNUtoo' Carikli
h2. TODO
100
101
* Find a way to add the fact that a device variant is signed on wikidata
102
* Make sure we got the data model right to classify devices: we got pages for GT-I9100G but not GT-I9100G_CHN_CHN or the branded version for foo operator, or PCB version x.y.
103
104 9 Denis 'GNUtoo' Carikli
== See also ==
105 8 Denis 'GNUtoo' Carikli
106
* [[Upstream]]