Project

General

Profile

Upstream » History » Version 399

Kurtis Hanna, 11/26/2020 05:41 PM
added upstream Note 10.1 links in order to close #2178

1 12 Denis 'GNUtoo' Carikli
h1. Upstream Linux
2 1 Denis 'GNUtoo' Carikli
3 57 Denis 'GNUtoo' Carikli
{{>toc}}
4
5 362 Denis 'GNUtoo' Carikli
h2. Tracking upstream patches
6 100 Denis 'GNUtoo' Carikli
7 362 Denis 'GNUtoo' Carikli
We have a "new issue tracker":https://redmine.replicant.us/projects/upstreaming/issues for tracking upstream status of various patches.
8 100 Denis 'GNUtoo' Carikli
9 11 Denis 'GNUtoo' Carikli
h2. Benefits of using Upstream Linux
10 2 Denis 'GNUtoo' Carikli
11 11 Denis 'GNUtoo' Carikli
Currently, Replicant uses device specific Hardware Abstraction Layers, because device manufacturers implemented non-standard kernel interfaces. However, Android works with upstream kernels and supports plug-n-play hardware nowadays, so it makes sense to have generic Hardware Abstraction Layers for the standard interfaces of the Linux kernel (ALSA, V4L2, etc).
12 2 Denis 'GNUtoo' Carikli
13
Benefits:
14
* It would allow supporting external WiFi dongles such as the ones supported by the ath9k_htc driver and free firmwares without the need for a specific application or configuration.
15 46 Denis 'GNUtoo' Carikli
* It would make devices last longer by alleviating the device specific maintenance burden: If LineageOS stops supporting a Replicant supported device, Replicant would need to maintain it by its own. This would require a lot of work, unless the device is already supported the upstream Linux kernel and generic hardware abstractions layers. This would also enable Replicant to support devices that are not currently supported by LineageOS with a lot less work.
16 11 Denis 'GNUtoo' Carikli
* It would enable the support for devices that are or will be added to upstream Linux.
17 2 Denis 'GNUtoo' Carikli
18 22 Denis 'GNUtoo' Carikli
As GNU/Linux expects standard kernel interfaces, this would also enable to run GNU/Linux out of the box on such devices.
19
This has some interesting outcomes:
20 46 Denis 'GNUtoo' Carikli
* The device specific work could be shared between GNU/Linux communities and Replicant communities. This could result in less work to do to support individual devices. Since Android libraries depends on Android's libc, non-standard proprietary libraries might be harder to reuse than the free software implementations, so we might get even more collaboration thanks to that.
21
* It would enable GNU/Linux distributions to more easily support smartphones and tablets, which would hopefully enable FSDG distributions to be able to focus on usability instead of hardware support. This way, if one day Android devices stop using the Linux kernel, stops being free software, or if the code takes directions that are too much problematic, already having GNU/Linux based Android alternatives would reduce the amount of work needed to be able to get again a fully free software distribution for smartphones and tablets.
22 23 Denis 'GNUtoo' Carikli
* Older devices with less amount of RAM than Replicant current minimum requirements could be used with GNU/Linux and possibly repurposed for other usages, reducing the amount of electronic devices waste.
23 22 Denis 'GNUtoo' Carikli
24 2 Denis 'GNUtoo' Carikli
h2. Requirements
25
26 11 Denis 'GNUtoo' Carikli
* For the other standard interfaces (like ASLA, etc) a device running a upstream Linux Kenrel with as few patches as possible is required.
27 2 Denis 'GNUtoo' Carikli
28 4 Denis 'GNUtoo' Carikli
h2. Devices
29
30 5 Denis 'GNUtoo' Carikli
It is best to use a device that requires the least amount of work to be functional under Replicant.
31
More precisely we want to minimize:
32 11 Denis 'GNUtoo' Carikli
* The work needed to have the device usable with upstream Linux.
33 5 Denis 'GNUtoo' Carikli
* The work porting or writing Android hardware abstractions layers.
34
35
To achieve that we can choose a device that:
36
* requires no or very minimal work to be fully supported by Linux.
37
* have less hardware features (so we don't need to support them in Linux and in the HALs).
38
* is easy to buy, so the work can be shared among multiple people.
39 53 Denis 'GNUtoo' Carikli
* doesn't have more freedom flaws than the devices currently supported by Replicant
40 5 Denis 'GNUtoo' Carikli
41 54 Denis 'GNUtoo' Carikli
It is also a good idea to keep one image per device at first, as trying to make a single image that
42 55 Denis 'GNUtoo' Carikli
would work on all ARM device supported by upstream Linux is complicated: Even GNU/Linux
43
distributions have a hard time doing that for ARM devices.
44 6 Denis 'GNUtoo' Carikli
45 58 Denis 'GNUtoo' Carikli
h2. Linux upstream status
46
47 363 Denis 'GNUtoo' Carikli
In some cases, even if the upstream status looks good, nonfree bootlaoders can get in the way. We have a list of stock bootloaders incompatible with upstream Linux in this page: [[BootloadersIncompatibleWithLinux]].
48
49 11 Denis 'GNUtoo' Carikli
h3. Smartphones and tablets with a free software bootloader and work in progress upstream Linux support
50 4 Denis 'GNUtoo' Carikli
51 59 Denis 'GNUtoo' Carikli
|_. Formfactor |_. Vendor |_. Product  |_. Linux dts |_. Linux status | Verdict |
52
| Smartphone | LG | Optimus Black | "omap3-sniper.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-sniper.dts | no display(no driver), very few peripherals | Too much work required |
53
| Tablet | Amazon | Kindle Fire (first generation) | "omap4-kc1.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap4-kc1.dts | no display(no driver), very few peripherals | Too much work required |
54 64 Denis 'GNUtoo' Carikli
| Smartphone | | GTA04 A3 | "omap3-gta04a3.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-gta04a3.dts |/3. http://projects.goldelico.com/p/gta04-kernel/page/UpstreamStatus/ |/3. Good fit: Free software bootloader, very few parts not upstream  |
55 60 Denis 'GNUtoo' Carikli
| Smartphone | | GTA04 A4 | "omap3-gta04a4.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-gta04a4.dts |
56
| Smartphone | | GTA04 A5 | "omap3-gta04a5.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-gta04a5.dts |
57 31 Denis 'GNUtoo' Carikli
58 4 Denis 'GNUtoo' Carikli
h3. Replicant supported Samsung Exynos devices
59
60 65 Denis 'GNUtoo' Carikli
|_. Formfactor |_. Vendor |_. Product |_. Linux dts | Linux status page | Issues | Verdict |
61 247 Denis 'GNUtoo' Carikli
| Smartphone | Samsung | Galaxy S (i9000)  | "s5pv210-galaxys.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/s5pv210-galaxys.dts  | https://github.com/PabloPL/linux/wiki (needs verified, but looks right) | * Probably has a signed bootloader. See the [[Upstream#Bootloader-status|bootloader status below]] for more information on it.
62 102 Denis 'GNUtoo' Carikli
* Has shared memory between the modem and the processor running Replicant
63 103 Denis 'GNUtoo' Carikli
* Is supported by Replicant 4.2 but not Replicant 6.0 
64 1 Denis 'GNUtoo' Carikli
* Barely meets Android 9 requirements | |
65 370 Kurtis Hanna
| Smartphone | Samsung | Galaxy S II (i9100)  | "exynos4210-i9100.dts":https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/exynos4210-i9100.dts | * See the "Samsung_Galaxy_SII_(samsung-i9100) page":https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SII_(samsung-i9100) on the PostmarketOS wiki for more details.
66 333 Kurtis Hanna
* This work was based on a "4.20 downstream kernel":https://github.com/Sekilsgs2/i9100_kernel_mainline_port 
67 358 Kurtis Hanna
* JustChrono is "regenerating some history / splitting the 4.2 port into smaller parts":https://github.com/ChronoMonochrome/android_kernel_samsung_smdk4412/commits/lk-4.20-i9100 since there is not much history in the other repo
68 360 Kurtis Hanna
* yurnam also has some "recent commits":https://github.com/yurnam/i9100_kernel_mainline_port/commits/master | * Probably has a signed bootloader
69
* Attempts were made to get Samsung IPC modem support via oFono from "this patchset":https://lists.ofono.org/pipermail/ofono/2012-September/013766.html but it was not accepted and "does not build":https://github.com/tssk/pmbootstrap/commits/device-samsung-i9100_modem 
70
* postmarketOS is seeking help to "support the modem":https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SII_(samsung-i9100)#Modem | |
71 276 Kurtis Hanna
| Smartphone | Samsung | Galaxy S III (i9300) | "exynos4412-i9300.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-i9300.dts |/3. https://blog.forkwhiletrue.me/pages/midas-mainline/ + "patch required for Samsung bootloader":https://github.com/fourkbomb/linux/commit/2a6027178ae40c1d3baa965fe21b19cbf09493ce ("reference":http://lkml.iu.edu/hypermail/linux/kernel/1212.1/01610.html) |/2. The first stage is signed. See the [[Upstream#Bootloader-status|bootloader status below]] for more information on it. | Good fit: Only the modem, "touch keys":https://redmine.replicant.us/issues/1885, and small parts are missing upstream but are available as patches on top of it |
72
| Smartphone | Samsung | Galaxy Note 2 3G (N7100) | "exynos4412-n710x.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-n710x.dts (needs to be modified to exynos4412-n7100.dts via "this patch.":https://github.com/fourkbomb/linux/commit/8ce0752f2cc22b8f8fa980c21be802ea387f9a86) | Good fit: the LCD, the modem, "touch keys":https://redmine.replicant.us/issues/1885, and small parts are missing but are available as patches on top of it |
73 1 Denis 'GNUtoo' Carikli
| Tablet | Samsung | Galaxy Note 8.0 (N51XX) | The platform is kona, not midas, but it might be fairly easy to port to mainline since it uses the same SoC, same fuelgauge, same audio, same radio chip, and maybe other parts apart from LCD and touchscreen as the i9300 and n7100 | * The bootloader is most probably signed. See the [[Upstream#Bootloader-status|bootloader status below]] for more information on it.
74
* Soldered battery => Shops might be able to replace it
75 348 Denis 'GNUtoo' Carikli
* Need to find a way to get access to the serial port => The special connector might have serial on it | |
76 153 Denis 'GNUtoo' Carikli
77 143 Denis 'GNUtoo' Carikli
h3. Replicant supported Texas Instruments OMAP4 devices
78
79
|_. Formfactor |_. Vendor |_. Product |_. Linux dts | Linux status page | Issues | Verdict |
80 144 Denis 'GNUtoo' Carikli
| Smartphone | Samsung | Galaxy Nexus (I9250) | None | * "Status on PostmarketOS wiki":https://wiki.postmarketos.org/wiki/Google_Galaxy_Nexus_GSM_(samsung-maguro)#Mainline_Kernel_Status
81
* "mainline fork":https://github.com/drebrez/linux/commits/samsung-maguro | ? | Need to write a DTS |
82 148 Denis 'GNUtoo' Carikli
| Tablet | Samsung | Galaxy Tab 2 7.0 (P31xx) |/2. None |/2. ? |/2. * Soldered battery => Shops might be able to replace it
83
* Need to find a way to get access to the serial port => The special connector might have serial on it |/2. ? |
84 147 Denis 'GNUtoo' Carikli
| Tablet | Samsung | Galaxy Tab 2 10.1 (P51xx) |
85 143 Denis 'GNUtoo' Carikli
86 27 Denis 'GNUtoo' Carikli
h3. Other devices with some upstream support.
87
88 68 Denis 'GNUtoo' Carikli
|_. Formfactor  |_. Vendor |_. Product |_. Linux dts |_. Linux status page |_. Issues |_. Verdict |
89 82 Denis 'GNUtoo' Carikli
| Tablet | Difrnce | DIT4350 | "sun5i-a13-difrnce-dit4350.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun5i-a13-difrnce-dit4350.dts | | | |
90 83 Denis 'GNUtoo' Carikli
| Tablet | Empire Electronix | D709 tablet | "sun5i-a13-empire-electronix-d709.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun5i-a13-empire-electronix-d709.dts | | | |
91 86 Denis 'GNUtoo' Carikli
| Tablet | Empire Electronix | M712 tablet | "sun5i-a13-empire-electronix-m712.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun5i-a13-empire-electronix-m712.dts | | | |
92 81 Denis 'GNUtoo' Carikli
| Tablet | Gemei | G9 Tablet | "sun4i-a10-gemei-g9.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | "TODO in the dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts#n66 | | "Missing touchscreen":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts#n71 |
93 337 Kurtis Hanna
| Smartphone | Samsung | Galaxy SIII 4G (i9305) | "exynos4412-i9305.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-i9305.dts |/2. https://blog.forkwhiletrue.me/pages/midas-mainline/ + "patch required for Samsung bootloader":https://github.com/fourkbomb/linux/commit/2a6027178ae40c1d3baa965fe21b19cbf09493ce |/3. The bootloader is signed. See the [[Upstream#Bootloader-status|bootloader status below]] for more information on it. | Good fit:
94 271 Kurtis Hanna
* Not fully supported by Replicant because it "lacks modem support":https://redmine.replicant.us/issues/1813 but the work can be reused by the Galaxy SIII, Galaxy SII, Note 2, Note 8.0, and Note 10.1 (2012 edition). 
95 275 Kurtis Hanna
* "touch keys":https://redmine.replicant.us/issues/1885, and small parts are missing upstream but are available as patches on top of it. |
96 1 Denis 'GNUtoo' Carikli
| Smartphone | Samsung | Galaxy Note 2 4G (N7105) | "exynos4412-n710x.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-n710x.dts needs to be modified to exynos4412-n7105.dts via "this patch":https://github.com/fourkbomb/linux/commit/8ce0752f2cc22b8f8fa980c21be802ea387f9a86 since it has a different modem than the n7100. | Good fit: the LCD, "touch keys":https://redmine.replicant.us/issues/1885, and small parts are missing but are available as patches on top of it. The modem "might be in mainline":https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/clk/qcom/gcc-mdm9615.c?h=v5.2.7, but probably lacks firmware loading. |
97 399 Kurtis Hanna
| Tablet | Samsung | Galaxy Note 10.1 (2012 edition) | "exynos4412-p4note-n8010.dts":https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/arch/arm/boot/dts/exynos4412-p4note-n8010.dts | Support matrix: https://viciouss.github.io/static_pages/galaxy_note_10_1_mainline/ 
98
Blog post: https://viciouss.github.io/2020/11/18/note-10_1-journey/ | A developer, Viciouss, is working to add upstream to this device. |
99 73 Denis 'GNUtoo' Carikli
| Smartphone | Nokia | N900 | "omap3-n900.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-n900.dts | https://elinux.org/N900 | * Has a signed bootloader
100
* Has only 256M of RAM | Bad fit: not enough RAM |
101 75 Denis 'GNUtoo' Carikli
| Smartphone | Nokia | N9 | "omap3-n9.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-n9.dts | https://elinux.org/N9 |/2. * Probably have a signed bootloader
102 373 Denis 'GNUtoo' Carikli
* "The touchscreen 'firmware' is just some calibration data that can be generated with free software":https://lists.osuosl.org/pipermail/replicant/2020-October/003098.html |/2. Some upstream support (missing display?), though not a lot seem left. See also the "PostmarketOS":https://wiki.postmarketos.org/wiki/Nokia_N9 and "elinux.org":https://elinux.org/N950 wiki pages |
103 75 Denis 'GNUtoo' Carikli
| Smartphone | Nokia | N950 | "omap3-n950.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap3-n950.dts | https://elinux.org/N950 |
104 72 Denis 'GNUtoo' Carikli
| Smartphone | Motorolla | Droid 4 (XT894) | "omap4-droid4-xt894.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/omap4-droid4-xt894.dts | http://elektranox.org/droid4/ | Probably has a signed bootloader, may have a signed kernel requiring kexec | Bad fit: requires a signed Linux kernel in the boot chain |
105 71 Denis 'GNUtoo' Carikli
| Smartphone | | Nexus 7 (2012) | "qcom-apq8064-asus-nexus7-flo.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | |/8. Qualcomm SOC (signed bootloader, unknown modem isolation) |/8. Bad fit:
106
* Would need more guarantees requarding the modem isolation on recent qualcomm SOCs
107
* Would need more research to on the state of free software for more recent qualcom SOCs
108
* Not enough support in the Linux kernel for devices with Qualcomm SOCs |
109 70 Denis 'GNUtoo' Carikli
| | | | "qcom-apq8064-sony-xperia-yuga.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |  |
110
| | | | "qcom-msm8974-sony-xperia-amami.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dts | |
111 85 Denis 'GNUtoo' Carikli
| Tablet | Sony | Xperia Z2 Tablet | "qcom-msm8974-sony-xperia-castor.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts |  |
112 70 Denis 'GNUtoo' Carikli
| | | | "qcom-msm8974-sony-xperia-honami.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts |  |
113
| Smartphone | | Nexus 5 | "qcom-msm8974-lge-nexus5-hammerhead.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | |
114
| Smartphone | Samsung | Galaxy S5 | "qcom-msm8974-samsung-klte.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | |
115 80 Denis 'GNUtoo' Carikli
| | | Fairphone 2 | "qcom-msm8974-fairphone-fp2.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | |
116 92 Denis 'GNUtoo' Carikli
| Tablet | MSI | Primo81 | "sun6i-a31s-primo81.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun6i-a31s-primo81.dts | | | |
117
| Tablet | Yones TopTech | BS1078 v2 Tablet | "sun6i-a31s-yones-toptech-bs1078-v2.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | | | |
118 88 Denis 'GNUtoo' Carikli
| Tablet | Allwinner? | Q8 A13 Tablet | "sun5i-a13-q8-tablet.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | | | |
119
| Tablet | Utoo | P66 | "sun5i-a13-utoo-p66.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | | | |
120 1 Denis 'GNUtoo' Carikli
| Tablet | Primux | INet-98V Rev 02 | "sun5i-a13-inet-98v-rev2.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun5i-a13-inet-98v-rev2.dts | | | |
121 93 Denis 'GNUtoo' Carikli
| Tablet | Primux | INet-86DZ Rev 01 | "sun8i-a23-inet86dz.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a23-inet86dz.dts | | | |
122 90 Denis 'GNUtoo' Carikli
| Tablet | Wondermedia? | WM8650-MID Tablet | "wm8650-mid.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/wm8650-mid.dts | | | |
123 91 Denis 'GNUtoo' Carikli
| Tablet | Wondermedia? | WM8850-W70v2 Tablet | "wm8850-w70v2.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/wm8850-w70v2.dts | | | |
124 89 Denis 'GNUtoo' Carikli
| Tablet | Colorfly | E708 Q1 tablet | "sun6i-a31s-colorfly-e708-q1.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun6i-a31s-colorfly-e708-q1.dts | | | |
125 94 Denis 'GNUtoo' Carikli
| Tablet | Polaroid | MID2407PXE03 tablet | "sun8i-a23-polaroid-mid2407pxe03.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts | | | |
126
| Tablet | Polaroid | MID2809PXE04 tablet | "sun8i-a23-polaroid-mid2809pxe04.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | | | |
127 95 Denis 'GNUtoo' Carikli
| Tablet | Allwinner? | Q8 A23 Tablet | "sun8i-a23-q8-tablet.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | | | |
128
| Tablet | Allwinner? | Q8 A33 Tablet | "sun8i-a33-q8-tablet.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts | | | |
129 96 Denis 'GNUtoo' Carikli
| Tablet | TBS Biometrics | A711 Tablet | "sun8i-a83t-tbs-a711.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | | | |
130 97 Denis 'GNUtoo' Carikli
| Tablet | iNet Tek | iNet Q972 tablet | "sun6i-a31s-inet-q972.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun6i-a31s-inet-q972.dts | | | |
131 98 Denis 'GNUtoo' Carikli
| Tablet | Allwinner? | GT90H Dual Core Tablet (v4) | "sun8i-a23-gt90h-v4.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | | | |
132
| Tablet | Allwinner? | GA10H Quad Core Tablet (v1.1) | "sun8i-a33-ga10h-v1.1.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts | | | |
133 99 Denis 'GNUtoo' Carikli
| Tablet | Allwinner? | INet-D978 Rev 02 | "sun8i-a33-inet-d978-rev2.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts | | | |
134 27 Denis 'GNUtoo' Carikli
135 261 Kurtis Hanna
More upcoming Exynos related mainlining work could potentially be discovered at "this Tizen wiki page":https://wiki.tizen.org/Exynos_Mainline_Kernel_TODO
136
137 1 Denis 'GNUtoo' Carikli
h3. Allwinner devices
138 13 Denis 'GNUtoo' Carikli
139
Devices with Allwinner SOCs are an interesting targets because:
140
* Many of them do not use signed bootloaders.
141
* Many of the SOCs and various devices using them have good Linux and u-boot mainline support
142
143
For instance the Lime 2 from Olimex is pretty well supported and is easy to find.
144
However this device is a single board computer and, as such it doesn't have the have the usual peripherals that are commonly found in tablets and smartphones. This makes a port on this device less relevant and less useful.
145
146
Some research is needed to identify which devices are easiest to work with. Tablets that don't have a modem seem to be better than smartphones, as supporting the modem would require to have it supported in Linux and the userspace libraries. This might even require to write and upstream a Linux driver for the modem.
147
148
A good tablet for this task should have:
149
* A SOC that has good mainline support, see "the Linux mainlining effort page on linux-sunxi":https://linux-sunxi.org/Linux_mainlining_effort for more details.
150
* A Free software bootloader, or the ability to easily add support for the tablet to a free software bootloader.
151
* The ability to power and use an USB WiFi card or chip that is compatible with the ath9k_htc driver.
152
153
It would also be better if the chosen tablet doesn't use an AllWinner SOC with a PowerVR GPU, as MALI GPU have more probability to be usable with free software in the future.
154 1 Denis 'GNUtoo' Carikli
155 78 Denis 'GNUtoo' Carikli
h3. Rockchip devices
156
157 79 Denis 'GNUtoo' Carikli
* There is a "Linux upstream status page":http://opensource.rock-chips.com/wiki_Status_Matrix#Mainline%20Kernel%20Status%20Matrix in the "opensource.rock-chips wiki":http://opensource.rock-chips.com
158
* There is also "some information on u-boot":http://opensource.rock-chips.com/wiki_U-Boot in the "opensource.rock-chips wiki":http://opensource.rock-chips.com/
159
160 113 Kurtis Hanna
|_. Formfactor  |_. Vendor |_. Product |_. Linux dts |_. Linux status page |_. Issues |_. Verdict |
161 329 Kurtis Hanna
| Tablet | Acer | "Chromebook Tab 10 D651N-K9WT":https://www.acer.com/ac/en/US/content/model/NX.H0BAA.001 - codenamed Scarlet ("earliest EOL is Aug 2023":https://support.google.com/chrome/a/answer/6220366) | "rk3399-gru-scarlet.dtsi":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi | |/3. The Asus Chromebook Flip C101PA (codenamed Bob) has the same RK3399 SoC and was recently added to "mainline u-boot":https://gitlab.denx.de/u-boot/u-boot/blob/master/arch/arm/mach-rockchip/rk3399/Kconfig. RK3399 in "upstream u-boot":https://gitlab.denx.de/u-boot/u-boot/commits/master/configs/evb-rk3399_defconfig doesn't include these tablets yet. These tablets, like the C101PA, ship with Coreboot bootloaders. Google used the "Depthcharge payload in Coreboot to boot Android":https://www.chromestory.com/2016/01/pixel-c-uses-a-chrome-os-boot-image-not-android/ on the Pixel C, which has a different SoC, but also shipped with Coreboot. "Upstream Coreboot repo":https://review.coreboot.org/cgit/coreboot.git/tree/src/mainboard/google/gru/devicetree.scarlet.cb "Android specific code in Depthcharge payload":https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/master/src/boot/android_dt.c "u-boot README.rockchip":https://gitlab.denx.de/u-boot/u-boot/blob/master/doc/README.rockchip "u-boot README.rockusb":https://gitlab.denx.de/u-boot/u-boot/blob/master/doc/README.rockusb "rkdevelopmenttool":https://github.com/rockchip-linux/rkdeveloptool "First (and only?) XDA thread about porting AOSP/CyanogenMod to a Chromebook":https://forum.xda-developers.com/showthread.php?t=2258446 These devices have "ARM Trusted Firmeware support":http://opensource.rock-chips.com/wiki_ATF#Supported_Devices | |
162 269 Kurtis Hanna
| Tablet | Asus | "Chromebook Tablet CT100":https://www.asus.com/Tablets/ASUS-Chromebook-Tablet-CT100PA/ - codenamed Dumo |/2. "rk3399-gru-scarlet.dtsi":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi (needs to be verified, but both device's Board Names and Base Boards "are codenamed Scarlet":https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices) | | | 
163 265 Kurtis Hanna
| Tablet | CTL | "Chromebook Tab Tx1":https://ctl.net/collections/tablets/products/ctl-chrome-tablet-tx1 - codenamed Druwl | | |
164 78 Denis 'GNUtoo' Carikli
165 134 Denis 'GNUtoo' Carikli
h1. Bootloaders
166 1 Denis 'GNUtoo' Carikli
167
h2. Bootloader status
168
169
|_. Formfactor |_. Vendor |_. Product  |_. signatures |_. Source code |_. u-boot status |_. Verdict |
170 257 Kurtis Hanna
|/6.Smartphone |/6.Samsung | Galaxy S - i9000  | The bootloader is probably signed | "downstream u-boot":https://github.com/xc-racer99/u-boot-galaxys4g/ | * u-boot mainline was placed in BL2, copying much of the bootloader work done on the i9300 and n7100
171 246 Denis 'GNUtoo' Carikli
* That u-boot also supports being installed in place of the Linux kernel, leaving the stock bootloader in place | * Probably signed
172
* The port to run instead of the Linux kernel seem interesting as it could be used on "midas" to disable the MMU and caches |
173 359 Kurtis Hanna
| "Galaxy S 2 - I9100":https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 | Signed, see "emulating-exynos-4210-bootrom-in-qemu.html":https://fredericb.info/2018/03/emulating-exynos-4210-bootrom-in-qemu.html | downstream u-boot:
174 351 Denis 'GNUtoo' Carikli
* "Sekilsgs2/i9100-uboot":https://github.com/Sekilsgs2/i9100-uboot
175 1 Denis 'GNUtoo' Carikli
* "Talustus/i9100-uboot":https://github.com/Talustus/i9100-uboot
176 359 Kurtis Hanna
* "onny/i9100-uboot":https://git.project-insanity.org/onny/uboot-i9100
177
* "TALUAtGitHub/i9100-uboot":https://github.com/TALUAtGitHub/i9100-uboot
178 353 Denis 'GNUtoo' Carikli
* "uboot-bootloader-true-multiboot-t1680898":https://forum.xda-developers.com/galaxy-s2/general/uboot-bootloader-true-multiboot-t1680898
179 350 Denis 'GNUtoo' Carikli
upstream u-boot for devices with same SoC: "origen":https://gitlab.denx.de/u-boot/u-boot/blob/master/configs/origen_defconfig "smdkv310":https://gitlab.denx.de/u-boot/u-boot/blob/master/configs/smdkv310_defconfig "s5pc210":https://gitlab.denx.de/u-boot/u-boot/blob/master/configs/s5pc210_universal_defconfig "trats":https://gitlab.denx.de/u-boot/u-boot/blob/master/configs/trats_defconfig | * "xda post about i9100-uboot":https://forum.xda-developers.com/galaxy-s2/general/uboot-bootloader-true-multiboot-t1680898 
180 352 Denis 'GNUtoo' Carikli
* How do the downstream u-boot boot (After BL1? As kernel?)
181 334 Kurtis Hanna
* Are there other u-boots? (look on common git hosting providers) | ? |
182 253 Kurtis Hanna
| "Galaxy SIII - I9300":https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9300 |/7. * The first stage is signed.
183 1 Denis 'GNUtoo' Carikli
* The stock first stage checks the second stage signatures.
184 338 Kurtis Hanna
* A signed first stage that doesn't enforce subsequent signatures exists but it's nonfree and non-redistributable|/4. "downstream u-boot for the second stage":https://github.com/fourkbomb/u-boot. This was "submitted upstream":http://u-boot.10912.n7.nabble.com/PATCH-0-7-Exynos4412-SPL-support-td341181.html but it broke the "Odroid U3":https://gitlab.denx.de/u-boot/u-boot/blob/master/configs/odroid_defconfig, so the code was probably not merged because of that.
185
* TODO: Make sure it works on the "Odroid U3":https://gitlab.denx.de/u-boot/u-boot/blob/master/configs/odroid_defconfig and resubmit upstream |/4. * That u-boot version is meant to be used in combination with a nonfree and non-redistributable first stage bootloader.
186 278 Kurtis Hanna
* This combination doesn't load the nonfree TrustZone OS
187 253 Kurtis Hanna
* Replicant 9 can run on devices with this bootloader, but the current Replicant 6 kernel expects a TrustZone OS to work. |/7. * We need to find a way to completely replace the first bootloader stage (BL1) as the one that is used to run u-boot is nonfree and non-redistributable. 
188 245 Denis 'GNUtoo' Carikli
* More details on that issue can be found in the [[Exynos4_Bootrom]] wiki page. |
189 253 Kurtis Hanna
| "Galaxy SIII 4G - I9305":https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9305 |
190
| "Galaxy Note 2 - N7100":https://redmine.replicant.us/projects/replicant/wiki/GalaxyNote2N7100 |
191 285 Kurtis Hanna
| "Galaxy Note 2 4G - N7105":https://redmine.replicant.us/projects/replicant/wiki/GalaxyNote2N7105 |
192 361 Kurtis Hanna
|/2.Tablet |/2.Samsung | "Galaxy Note 8.0 - N51XX":https://redmine.replicant.us/projects/replicant/wiki/GalaxyNote80N51xx | ? |/2. Has the same System On a Chip (SOC) as the Galaxy SIII and Note 2, the Exynos4412, but slightly modified u-boot might need to be written. Testing needed. |
193
| "Galaxy Note 10.1 - N8000":https://redmine.replicant.us/issues/1946 | "SD Card Boot Touch Point":http://forum.gsmhosting.com/vbb/f609/need-sdc-boot-tp-n8000-1921507/ |
194 272 Kurtis Hanna
| Camera | Samsung | "Galaxy Camera 2 - EK-GC200":https://en.wikipedia.org/wiki/Samsung_Galaxy_Camera_2 | ? | "First Exynos4412 Samsung device to get u-boot support":https://www.xda-developers.com/samsung-galaxy-camera-gets-open-source-bootloader/ in 2012 |
195 254 Kurtis Hanna
| Smartphone | Google and Samsung | "Galaxy Nexus - I9250":https://redmine.replicant.us/projects/replicant/wiki/GalaxyNexusI9250 | | "downstream u-boot for the second stage":http://ksyslabs.org/ukernels/gnex_uboot/ | |
196 231 Kurtis Hanna
| Smartphone | LG | "Optimus Black":https://redmine.replicant.us/projects/replicant/wiki/OptimusBlack |/5. unsigned | "upstream u-boot":https://git.denx.de/?p=u-boot.git;a=blob;f=configs/sniper_defconfig | no display(no driver), very few peripherals but enough to be usable | |
197 138 Denis 'GNUtoo' Carikli
| Tablet | Amazon | Kindle Fire (first generation) | "upstream u-boot":https://git.denx.de/?p=u-boot.git;a=blob;f=configs/kc1_defconfig | | |
198 139 Denis 'GNUtoo' Carikli
|/3. Smartphone |/3. | GTA04 A3 |/3. "downstream u-boot and xloader":http://projects.goldelico.com/p/gta04-uboot/  |/3. |/3. |
199 137 Denis 'GNUtoo' Carikli
| GTA04 A4 |
200
| GTA04 A5 |
201 345 Denis 'GNUtoo' Carikli
| Smartphone | Nokia | N900 | The bootloader is signed | "Upstream u-boot":https://gitlab.denx.de/u-boot/u-boot/raw/master/configs/nokia_rx51_defconfig | * Xloader which is the first stage bootloader is signed and loads a nonfree second stage bootloader which is called NOLO. | * The upstream u-boot is to be installed in the kenrel partition and runs instead of Linux. A similar implementation could also be used on midas to disable caches and the MMU and have generic images |
202 121 Denis 'GNUtoo' Carikli
203 1 Denis 'GNUtoo' Carikli
h2. See also
204
205
* [[Google Summer of Code 2018]]
206 12 Denis 'GNUtoo' Carikli
207 379 Denis 'GNUtoo' Carikli
h1. GNU/Linux components
208 19 Denis 'GNUtoo' Carikli
209 182 Denis 'GNUtoo' Carikli
h2. Modem support
210 1 Denis 'GNUtoo' Carikli
211 183 Denis 'GNUtoo' Carikli
|_. Protocols |_. Implmentation |_. comments |
212 190 Denis 'GNUtoo' Carikli
| QMI | Android <-> RIL <-> libqmi-ril to be completed <-> libqmi | |
213 184 Denis 'GNUtoo' Carikli
|/2. * QMI
214 1 Denis 'GNUtoo' Carikli
* AT
215 190 Denis 'GNUtoo' Carikli
* Other | Android <-> RIL <-> libraries to be written | 
216 226 Denis 'GNUtoo' Carikli
| "android_frameworks_opt_telephony_ril_ofono":https://github.com/scintill/android_frameworks_opt_telephony_ril_ofono + ofono + ofono backend (AT, QMI, etc) | * Using ofono would enable us to share more effort with upstream GNU/Linux and support many other protocol like AT for the GTA04 or qmi-ril for the Galaxy SIII 4G (I9305) or the Galaxy Note II 4G (N7105)
217 228 Denis 'GNUtoo' Carikli
* According to the "README":https://github.com/scintill/android_frameworks_opt_telephony_ril_ofono/blob/master/README.md, it has already been tested with most of Replicant 6 code but on a smartphones not yet supported by Replicant. Calls, Audio, SMS, etc are knwon to work.
218 281 Kurtis Hanna
* "BuildRilWrapper.java":https://github.com/scintill/android_frameworks_opt_telephony_ril_ofono/blob/master/build/java/net/scintill/ril_ofono/BuildRilWrapper.java seems to use introspection to automatically generate the API between the Framework Java RIL and itself (which replaces rild) (See the "official documentation":https://source.android.com/devices/tech/connect/ril for background information on the Android architecture)
219 282 Kurtis Hanna
* Replicant and oFono based Java RIL "video presentation":https://redmine.replicant.us/projects/replicant/wiki/ContributorsMeetingJuly2019#Presentations |
220 198 Denis 'GNUtoo' Carikli
|/5. samsung-ipc | Ofono (rilmodem backend/driver) <-> rild <-> libsamsung-ril <-> libsamsung-ipc | * Might be usable for GNU/Linux distributions with "libhybris":https://en.wikipedia.org/wiki/Hybris_%28software%29
221 1 Denis 'GNUtoo' Carikli
* Could be usable for testing Replicant as ofono could run on the host computer and the rild socket could be exported with adb
222 197 Denis 'GNUtoo' Carikli
* Some forks exist: check if they still have interesting patches
223 281 Kurtis Hanna
* https://github.com/rilmodem/ofono|
224 347 Denis 'GNUtoo' Carikli
| Android <-> rild <-> libsamsung-ril <-> libsamsung-ipc | * Currently in use in Replicant
225
* Well integrated with Android
226
* Potentially usable by other distributions
227
* No known way to support different modems protocols in the same Replicant image with that |
228 189 Denis 'GNUtoo' Carikli
| Android <-> Ofono <-> libsamsung-ipc | * "An ofono fork with libsamsung-ipc support is available":https://github.com/fourkbomb/ofono
229 346 Denis 'GNUtoo' Carikli
"Patches":https://lists.ofono.org/pipermail/ofono/2012-September/013777.html to add that upstream were "refused":https://lists.ofono.org/pipermail/ofono/2012-September/013778.html because upstream didn't want to make the project become GPLv3 (libsamsung-ipc was GPLv3 at the time) but now libsamsung-ipc has been relicensed to GPLv2+
230
* Could be used to have generic a Replicant image supporting many devices with very different modems protocols (like libsamsung-ipc or QMI based ones) and have ofono do the modem detection |
231 185 Denis 'GNUtoo' Carikli
|
232 197 Denis 'GNUtoo' Carikli
| FSO <-> libsamsung-ipc | * Probably not easily usable in Replicant
233 194 Denis 'GNUtoo' Carikli
* Is FSO still actively maintained?
234 193 Denis 'GNUtoo' Carikli
* Was used by SHR and potentially other GNU/Linux distributions supporting the Openmoko GTA04 smartphones |
235 182 Denis 'GNUtoo' Carikli
236
h2. Upstream userspace hardware support libraries
237
238
|_. Usage |_. Replicant |_. GNU/Linux |_. comments |
239
| Bluetooth stack | BlueDroid | Bluez | |
240
| GPS hardware support | ? | gpsd | |
241
242 16 Denis 'GNUtoo' Carikli
243 20 Denis 'GNUtoo' Carikli
h2. Upstream non-hardware specific userspace
244 18 Denis 'GNUtoo' Carikli
245
|_. Usage |_. Replicant |_. GNU/Linux |_. comments |
246 151 Denis 'GNUtoo' Carikli
| Unix command line tools | ? | * Busybox
247
* Coreutils | * Busybox already has Android specific code in it but no Android.mk 
248
* Busybox build is very similar to Linux, and Linux can be built by Android |
249 44 Denis 'GNUtoo' Carikli
250 354 Denis 'GNUtoo' Carikli
h2. MTP
251
252 355 Denis 'GNUtoo' Carikli
TODO: 
253
* look at https://github.com/viveris/uMTP-Responder to see if it can be integrated in Android. It is known to work with the upstream kernel.
254
* Also compare with other implementation, including the Android one.
255 354 Denis 'GNUtoo' Carikli
256 229 Denis 'GNUtoo' Carikli
h2. libc
257
258
|_. Feature |_. Advantages |_. Disadvantages |_. sustainability |
259
| glibc + libhybris | * You just need an Android.mk to compile GNU/Linux software | * You need to link the Android part that need bionic functions to libhybris | TODO: Evaluate how close to bionic is libhybris |
260
| bionic | Android default | * You spend lot of time trying to run GNU/Linux debug tools like evtest on Android:
261
* Parabola cannot be used on old kenrels (FATAL: kernel too old)
262
* GuiX and libreCMC might not have the package and might need tweaking to be recompiled with an old glibc and kernel headers
263
* TODO: try crosstool-ng
264 230 Denis 'GNUtoo' Carikli
* Most of the other GNU/Linux distributions are not FSDG compliant or do not support ARM
265
* The software might not work on Android due to missing bionic functions like versionsort(...) |
266 229 Denis 'GNUtoo' Carikli
267 44 Denis 'GNUtoo' Carikli
h2. Other projects interested in using upstream Linux and/or contributing to it
268
269 339 Kurtis Hanna
h3. PostmarketOS
270
"pmOS wiki: upstream kernel":https://wiki.postmarketos.org/wiki/The_Mainline_Kernel
271
"pmOS wiki: i9305 with upstream kernel":https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SIII_LTE_(samsung-i9305)#Mainline_Kernel
272
273 340 Kurtis Hanna
h3. O-DROID
274
275
h3. osmocomBB
276
277
h3. Mali
278
279
h3. LineageOS
280
281
h3. oFono
282
283
h3. Parabola
284 116 Denis 'GNUtoo' Carikli
285 380 Denis 'GNUtoo' Carikli
h1. GNU/Linux distributions
286 318 Denis 'GNUtoo' Carikli
287 320 Denis 'GNUtoo' Carikli
h2. Halium
288
289 318 Denis 'GNUtoo' Carikli
Some GNU/Linux distributions like Plasma Mobile, LuneOS, Ubuntu Touch use libhybris through the "Halium project":https://halium.org/ to reuse proprietary Android libraries
290 1 Denis 'GNUtoo' Carikli
291 323 Denis 'GNUtoo' Carikli
h2. Mer
292
293 324 Denis 'GNUtoo' Carikli
* Mer uses ofono for handling the modem
294
* For OpenGL it's not clear if they use nonfree drivers. It would be worth looking into it. Their stack seem to be able to use free implementations as well as nonfree implementations.
295 323 Denis 'GNUtoo' Carikli
296
See the "Mer architecture":https://wiki.merproject.org/wiki/Architecture for more details.
297
298 320 Denis 'GNUtoo' Carikli
h2. PostmarketOS
299
300 322 Denis 'GNUtoo' Carikli
"PostmaketOS":https://postmarketos.org/ is probably not using libhybris at all and is instead working with upstream and probably doesn't depend on nonfree libraries
301 320 Denis 'GNUtoo' Carikli
302
h2. Replicant strategies
303
304 381 Denis 'GNUtoo' Carikli
Replicant is currently involved with upstream GNU/Linux, but it would probably be a good idea to collaborate more with  distributions that don't depend on libhybris.
305 318 Denis 'GNUtoo' Carikli
306 378 Denis 'GNUtoo' Carikli
h1. Android distributions
307 1 Denis 'GNUtoo' Carikli
308 384 Denis 'GNUtoo' Carikli
h2. AOSP
309
310
AOSP doesn't support many devices, but it seem to support some devboards. 
311
312
The advantage is that in general devboards are well supported by upstream kernels.
313
314 385 Denis 'GNUtoo' Carikli
Supported devboards[1]?:
315 384 Denis 'GNUtoo' Carikli
| Devboard | Freedom issues | Comments |
316
| Beagleboard-X15 | No free GPU driver | Well supported by GNU/Linux, free bootloader |
317
| Cuttlefish emulator | ? | ? |
318 1 Denis 'GNUtoo' Carikli
| Other | ? | ? |
319 385 Denis 'GNUtoo' Carikli
320
The official documentation also "mentions some devboards":https://source.android.com/setup/build/devices .
321 384 Denis 'GNUtoo' Carikli
322
fn1. Some of the devboards in this page are probably supported: https://wiki.linaro.org/AOSP#AOSP_Dev_Board_Reference_Information
323
324 150 Denis 'GNUtoo' Carikli
h2. LineageOS
325 141 Denis 'GNUtoo' Carikli
326 327 Denis 'GNUtoo' Carikli
See "device-support-requirements.md":https://github.com/LineageOS/charter/blob/master/device-support-requirements.md for more information on LineageOS expectations.
327 120 Denis 'GNUtoo' Carikli
328 327 Denis 'GNUtoo' Carikli
Replicant has "a script":https://git.replicant.us/replicant/vendor_replicant-scripts/tree/research that is able to parse the "LineageOS wiki data":https://github.com/LineageOS/lineage_wiki . That can be useful to find information on devices supported by LineageOS.
329 326 Denis 'GNUtoo' Carikli
330 325 Denis 'GNUtoo' Carikli
The "devices supported by LineageOS 16":https://wiki.lineageos.org/devices/ have either:
331
* A Qualcomm SOC with an integrated modem inside (MSM*) for many devices
332
* A Qualcomm SOC without a modem inside (APQ*) for many devices
333 1 Denis 'GNUtoo' Carikli
* A HiSilicon Kirin 970 SOCs for devices like:
334 326 Denis 'GNUtoo' Carikli
** The "Huawei Honor View 10":https://wiki.lineageos.org/devices/berkeley
335 325 Denis 'GNUtoo' Carikli
** The "Huawei P20 Pro":https://wiki.lineageos.org/devices/charlotte
336
* A Samsung Exynos 7580 SOC for the following device
337 328 Denis 'GNUtoo' Carikli
** "Galaxy S5 Neo":https://wiki.lineageos.org/devices/s5neolte (Smartphone): It has shared memory between the modem and the SOC
338 120 Denis 'GNUtoo' Carikli
339 1 Denis 'GNUtoo' Carikli
It may be because they rely on nonfree software to support devices, which has not been ported to Android 9, or may be because they need more time to add devices with other SOCs like exynos.
340 141 Denis 'GNUtoo' Carikli
341 388 Denis 'GNUtoo' Carikli
h2. CustomROMs
342
343
CustomROMs seem to be a space for unofficial port of LineageOS. The idea is probably to develop the port until they manage to meet LineageOS's "device-support-requirements.md":https://github.com/LineageOS/charter/blob/master/device-support-requirements.md . When the requirements are met, they are probably included in LineageOS directly.
344
345
Interesting ports:
346
* The Galaxy SIII (GT-I9300) is being ported to more recent LineageOS versions. There is "a thread on the collaboration with Replicant":https://github.com/CustomROMs/android_local_manifests_i9300/issues/1 in github. The person/people doing the port seem to alternate between an upstream kernel and a older kernel based on the vendor code depending on the amount of work required to finish the port and/or the difficulties encountered. As we are also using a kernel based on upstream Linux we collaborate on that part by reusing each other work when applicable.
347
348 374 Denis 'GNUtoo' Carikli
h2. DivestOS Mobile
349
350
This distribution is based on LineageOS. While they seem to reuse nonfree software to make the hardware work, they spent some time cleaning up LineageOS code itself.
351
352
For instance it contains patches to remove privacy issues and nonfree software included in CyanogenMod or LineageOS.
353
354 375 Denis 'GNUtoo' Carikli
As we need to do that too in Replicant as long as we use LineageOS as base, it would be interesting to collaborate more with DivestOS on that part.
355
356 374 Denis 'GNUtoo' Carikli
Web site:
357
*https*: https://divestos.org/
358
*Onion*: http://6sdlxbqgcxdbkvysoir2qvqqs5ro3fxgyl3phvuphcdyklv7rg57jhid.onion
359
360 376 Denis 'GNUtoo' Carikli
h2. Fairphone
361
362
As October 2020, they are porting the Fairphone 2 to Android 9. However to do that, they are using 3.4 kernel and not any upstream kernels.
363
364
In addition, they don't seem very interested in free software bootloaders, and the Fiarphone 1 and 2 use Qualcomm System On a Chip.
365
366
However they are probably interested in free software libraries to make the port to newer Android versions easier.
367
368 382 Denis 'GNUtoo' Carikli
h2. Android x86
369
370
At the time of writing, the most recent images are RC images for Android 9, but there are branches for Android 10.
371
372
As they use (mostly?) upstream kernels, they sometimes have interesting code.
373
374
*Source code*: https://git.osdn.net/view?a=project_list;pf=android-x86
375 383 Denis 'GNUtoo' Carikli
*Manifest*: git://git.osdn.net/gitroot/android-x86/manifest.git
376 382 Denis 'GNUtoo' Carikli
377
Branches[1]: 
378
379
| Branch | Android version |
380
| q-x86 | 10.0 |
381
| pie-x86 | 9.0 |
382
| oreo-x86 | 8.1 |
383
| nougat-x86 | 7.1 |
384
| marshmallow-x86 | 6.0 |
385
| lollipop-x86 | 5.1 |
386
| kitkat-x86 | 4.4 |
387
| jb-x86 | 4.3 |
388
| ics-x86 | 4.0 |
389
| honeycomb-x86 | 3.2 |
390
| gingerbread-x86 | 2.3 |
391
| froyo-x86 | 2.2 |
392
| eclair-x86 | 2.1 |
393
| donut-x86 | 1.6 |
394
| cupcake-x86 | 1.5 |
395
 
396
fn1. https://www.android-x86.org/source.html
397
398 150 Denis 'GNUtoo' Carikli
h2. AOSP and LineageOS
399 141 Denis 'GNUtoo' Carikli
400
| Feature | AOSP | LineageOS |
401
| Code quality | Better than LineageOS | |
402 142 Denis 'GNUtoo' Carikli
| Documentation | Better than LineageOS | |
403 141 Denis 'GNUtoo' Carikli
| root | Not sure if supported or not | Supported |
404 200 Denis 'GNUtoo' Carikli
| Minor release versioning | supported with Git tags | Not supported.
405 202 Denis 'GNUtoo' Carikli
For instance frameworks/native has no LineageOS tags (only cm-1x tags) and has no other branch for lineage OS 16.0 than the lineage-16.0 branch, as the other branches name are for other things. This was confirmed after running 'git fetch github' in frameworks/native to fetch the other branches that are not fetched by repo by default.
406 200 Denis 'GNUtoo' Carikli
Despite that, some code was even merged in after the lineage-16.0 release:
407
<pre>
408
commit 22abc3cf4077644463a2dc1c59a5a74e9518ea16
409
Merge: 9e96d54 8a6b6c3
410
Date:   Sat Jul 13 18:57:45 2019 +0200
411
412
    Merge remote-tracking branch 'aosp/pie-gsi' into lineage-16.0-pie-gsi
413
</pre> |
414 141 Denis 'GNUtoo' Carikli
| GUI features for developers
415
* Advanced reboot | ? | Supported |
416 386 Denis 'GNUtoo' Carikli
| Integrated kernel builds | Unsupported | Supported | 
417 155 Denis 'GNUtoo' Carikli
418 306 Denis 'GNUtoo' Carikli
h2. Building a collaboration with other Android distributions
419
420
Given that:
421
* Replicant doesn't want to support devices that have more freedom issues than the ones currently supported.
422
* Many other Android distributions probably don't the same goals with the freedom of the devices they support.
423
* Replicant 9 is based on upstream Linux and will have to maintain its userspace libraries.
424
* Some users may still want to support devices that have more freedom issues than the ones supported by Replicant.
425
426
It could be a good idea to share the maintenance of the code used to make Replicant 9 with other distributions.
427
428 155 Denis 'GNUtoo' Carikli
h2. Design decisions
429
430 256 Kurtis Hanna
Some decisions have been taken by upstream projects, for instance the the Android Open Source Project (AOSP) is pushing device manufacturers to use "signed bootloaders":https://source.android.com/security/verifiedboot/device-state#root-of-trust and not give the users the ability to replace those bootloaders. Therefor it is best to revisit such decisions and decide whether or not to implement a given feature.
431 1 Denis 'GNUtoo' Carikli
432 210 Denis 'GNUtoo' Carikli
h3. Various
433
434 1 Denis 'GNUtoo' Carikli
| Feature | Advantages | Disadvantages |
435
| adb and root at boot | Easier to debug:
436
* We get the logs at boot
437
* May be able to diagnose non-booting devices (partition not mountable, etc) | Way less secure:
438
* Vulnerable to "Juice_Jacking":https://en.wikipedia.org/wiki/
439
* Vulnerable to an attacker that just connect an usb cable to a running phone
440
* Breaks the user's expectation of security (lock screen etc) |
441 210 Denis 'GNUtoo' Carikli
442 377 Denis 'GNUtoo' Carikli
We can get both: we can enable users to get logs at boot while avoiding any security issues. 
443
444
To do that we can keep disable adb and root disabled at boot, and enable users to add it back by editing the boot.img or recovery images. We have a tutorial for that in the [[AddingADBRootToAnImage]] page and we are working on script to automate it even more.
445
446 210 Denis 'GNUtoo' Carikli
h3. root filesystem related
447
448
|_. Feature |_. Advantages |_. Disadvantages |_. sustainability |
449
| System as root | * The kernel size can be bigger
450
* You have to hardcode the root partition in the cmdline or use PARTLABEL which might be a security issue: if a microSD has a partition named SYSTEM, the kernel may boot on it instead | having an initramfs adds some flexibility:
451
* Selecting partitions can potentially be more  flexible | |
452
| System as root + dm-verity + "dm-init":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/device-mapper/dm-init.txt | * The kernel size can be bigger
453
* The partition selection is flexible and secure  | | |
454
| read-only /system | * more secure and more easily understandable by users and developers | * need to ship in replicant user-scripts or add them to vendor/ | |
455 160 Denis 'GNUtoo' Carikli
456
h3. Gatekeeper HAL backend
457
458 209 Denis 'GNUtoo' Carikli
*Background information*: Gatekeeper is a daemon that is used to store passwords and other secrets.
459
460 1 Denis 'GNUtoo' Carikli
| Backend used | Advantages | Disadvantages |
461 161 Denis 'GNUtoo' Carikli
| simple userspace implementation | * Fast to do
462 213 Denis 'GNUtoo' Carikli
* Simple to understand 
463
* Good enough for most use cases| |
464 164 Denis 'GNUtoo' Carikli
| kernel keyring (man 7 keyrings) | * Secure
465 294 Kurtis Hanna
* The Linux kernel is well known and updated regularly
466 215 Denis 'GNUtoo' Carikli
* Some users are already used to the userspace/kernel security model
467
* Probably fun to implement, can learn how t implement Android daemons and how to use the keyring along the way |
468 1 Denis 'GNUtoo' Carikli
| Free software Trusted Execution Environment (TEE) | * Android does it | * Require access to TrustZone, which doesn't work for all SOCs
469 294 Kurtis Hanna
* Unfamiliar to users and developers (it's supposed to tick in suspend, knowledge about TrustZone is less spread than Linux, etc)
470 214 Denis 'GNUtoo' Carikli
* Probably requires to port a TrustZone OS to every SOC or phone 
471 294 Kurtis Hanna
* The Linux kernel is well known and updated regularly |
472 165 Denis 'GNUtoo' Carikli
| Proprietary software Trusted Execution Environment (TEE) | None: we really want to get rid of it if possible | 
473 160 Denis 'GNUtoo' Carikli
Cannot be trusted:
474
* Not free software
475
* Not under the user control |
476 203 Denis 'GNUtoo' Carikli
477
h3. Handling dynamic major/minor /dev/ nodes
478
479 219 Denis 'GNUtoo' Carikli
*Background information*: We can manage to avoid this use case for now.
480 207 Denis 'GNUtoo' Carikli
481 203 Denis 'GNUtoo' Carikli
| Backend used | Advantages | Disadvantages | sustainability |
482 205 Denis 'GNUtoo' Carikli
| Android default + Upstream Linux | | * does not work by default, probably impossible to make it work as-is |
483 204 Denis 'GNUtoo' Carikli
| Android default + Upstream Linux + very dirty userspace scripts | * Minimal changes | * Not robust
484
* Might eat up resources
485
* Already implemented cleanly in mdev | |
486
| Android default + hacked drivers to use fixed major/minor | * Minimal changes in Linux
487
* No changes required on Android side | * Require to change userspace software (libsamsung-ipc) | * Not upstreamable in Linux |
488 294 Kurtis Hanna
| devtmpfs + hacked Android init | * Minimal changes if upstreamed
489
* Init is hard to debug | * Complex to do as debugging at this stage is complicated | * Need to be upstreamed in Android |
490 1 Denis 'GNUtoo' Carikli
| Stock Andrdroid init + mdev (busybox) | * Bad integration in the Android build system | * Changes are minimal | * Android build system integration need to be upstreamed or maintained |
491 219 Denis 'GNUtoo' Carikli
492
h3. Firmware loading
493
494
| Backend used | Advantages | Disadvantages | sustainability |
495
| system/core/init/firmware_handler.cpp | * Stock Android implementation | None | Already upstream in Android |
496
| Something else | None | The stock Android implementation is good enough and firmware loading is trivial anyway | Not upstream in Android |
497 220 Denis 'GNUtoo' Carikli
498 305 dl lud
h3. Embeddable web engine
499 296 Denis 'GNUtoo' Carikli
500 299 dl lud
The Android API for embedding a web engine is WebView.
501 1 Denis 'GNUtoo' Carikli
502
| Project | Comments |
503 305 dl lud
| "AOSP WebView API implemented with Chromium":https://developer.android.com/reference/android/webkit/WebView | * Built from Chromium compiled for WebView
504 1 Denis 'GNUtoo' Carikli
* Latest additions to the API seem more and more tied to Chromium (e.g. getWebViewRenderProcess, getWebChromeClient) | 
505 305 dl lud
| Old AOSP WebView API implemented with WebKit | * Not used anymore, since Android 4.4
506
* Does not implement the current WebView API |
507 299 dl lud
| "GeckoView":https://mozilla.github.io/geckoview/ | * Not the same API as WebView 
508
* Could be used to implement WebView
509
* Would need to be modified to expose more features from Gecko (e.g. zoom) while others are straightforward |
510 300 dl lud
| "Qt WebEngine":https://doc.qt.io/qt-5/qtwebengine-index.html | * Not the same API (C++ instead of Java)
511 299 dl lud
* Probably the smallest subset of Chromium available |
512 304 Denis 'GNUtoo' Carikli
| "Wine Internet Explorer implementation":https://wiki.winehq.org/Gecko | * Uses Gecko under the hood
513 296 Denis 'GNUtoo' Carikli
* Might be interesting to look at how they did it |
514
515 312 Denis 'GNUtoo' Carikli
h1. Web engine backend
516 296 Denis 'GNUtoo' Carikli
517 313 Denis 'GNUtoo' Carikli
We have an issue with webview (bug #1780):
518
* Using a recent webview based on chromium would create freedom issues as we don't know the license of chromium
519
* Using and old webview based on webkit would bring back many security issues
520
521
To solve that we need to find a solution that depends on a good upstream as we are not going to write a web browser engine ourselves.
522
523 314 Denis 'GNUtoo' Carikli
h2. Upstream web browser engine comparison
524
525
This lists upstream projects that are not forks tracking another upstream project.
526 313 Denis 'GNUtoo' Carikli
527 298 Denis 'GNUtoo' Carikli
| Project | Comments |
528 296 Denis 'GNUtoo' Carikli
| Gecko | * Clear licensing
529 315 Denis 'GNUtoo' Carikli
* Friendly upstream: The tor-browser project works with Mozilla to upstream privacy features in Firefox. So we could probably work with them as well too. |
530 1 Denis 'GNUtoo' Carikli
| Chromium | * Unclear licensing 
531 315 Denis 'GNUtoo' Carikli
* Google has goals for Chromium that are directly opposed to our goals (tracking, linked to google)
532
* Probably unfriendly upstream because of the opposed goals |
533 1 Denis 'GNUtoo' Carikli
| Webkit | ? |
534 315 Denis 'GNUtoo' Carikli
535
h2. Forked web browser engine comparison
536
537
TODO: Add various chromium versions here.
538 220 Denis 'GNUtoo' Carikli
539 317 Denis 'GNUtoo' Carikli
h2. How and if to implement a webview compatible API
540
541
TODO
542
543 307 Denis 'GNUtoo' Carikli
h1. Tools and build systems
544
545
Replicant has an issue with licensing (bug #1973) where we don't know under which license is Replicant. This due to the fact that the Android build system doesn't use a package manager during the build, and so it doesn't have license definition for each repositories.
546
547
A good way to fix that and also gain the ability to natively build GNU/Linux components like MESA or ofono would be to use a build system that use a package during at least during the build.
548
549
Some other communities have issues that do or could also benefit from that:
550
* GNU/Linux distributions need to package Android tools which are built with the custom Android build system
551 309 Denis 'GNUtoo' Carikli
* Some distributions mixes GNU/Linux and Android
552 1 Denis 'GNUtoo' Carikli
553 310 Denis 'GNUtoo' Carikli
h2. Projects
554 308 Denis 'GNUtoo' Carikli
555 309 Denis 'GNUtoo' Carikli
|_. Project |_. use case |_. Comments |
556 396 Denis 'GNUtoo' Carikli
| Android | - Build images
557 395 Denis 'GNUtoo' Carikli
- Build the Android NDK and SDK
558 398 Denis 'GNUtoo' Carikli
- Build the Android tools | - Wrapping build systems (like autotools, cmake, etc) is way too primitive:
559 395 Denis 'GNUtoo' Carikli
-- In LineageOS (not AOSP) The kernel is wrapped with .mk files, but the downside is that it runs make inside Linux source each time it needs to compile something
560
-- In AOSP there is no infrastructure for building software with other build systems, still mesa is built in it, but not the kernel |
561 397 Denis 'GNUtoo' Carikli
| Archlinux | - Build and package Android tools(Fastboot, adb, etc) | - relies on a "fragile script":https://git.archlinux.org/svntogit/community.git/tree/android-tools/trunk/generate_build.rb
562 395 Denis 'GNUtoo' Carikli
- The package for Android tools is self contained and doesn't have its dependencies (like liblog, libcutils, etc) splited in other packages | 
563 392 Denis 'GNUtoo' Carikli
| Debian | | relies on "custom Makefiles":https://salsa.debian.org/android-tools-team/android-tools/tree/master/debian/makefiles |
564 395 Denis 'GNUtoo' Carikli
| [[GuixBuildSystem|Guix]] | - Build android tools 
565
                             - Build the android ndk | Findings:
566
                                                       - Guix uses "android-make-stub":https://github.com/daym/android-make-stub.git to wrap Android.mk 
567
                                                       - We have real packaging of dependencies, however not all dependencies are exported, most are though
568
                                                       - The Android build system is wrapper in a ndk-android-build-system function
569
                                                       - The package definition needs very light and straigtforward patching. See [[GuixBuildSystem|Guix]] for more details. |
570 309 Denis 'GNUtoo' Carikli
| "The GNU/Linux distribution of quectel-modems":https://osmocom.org/projects/quectel-modems | Mix an Android kernel with GNU/Linux userspace | |
571 316 Denis 'GNUtoo' Carikli
| "AsteroidOS":https://github.com/AsteroidOS/asteroid/blob/master/prepare-build.sh#L68 | Mix an Android kernel with GNU/Linux userspace | |
572 1 Denis 'GNUtoo' Carikli
| "openembedded-android":https://github.com/anguslees/openembedded-android | Build the Android NDK? | strongly outdated version of openembedded |