Project

General

Profile

Upstream » History » Version 96

Denis 'GNUtoo' Carikli, 01/20/2019 10:16 PM

1 12 Denis 'GNUtoo' Carikli
h1. Upstream Linux
2 1 Denis 'GNUtoo' Carikli
3 57 Denis 'GNUtoo' Carikli
{{>toc}}
4
5 11 Denis 'GNUtoo' Carikli
h2. Benefits of using Upstream Linux
6 2 Denis 'GNUtoo' Carikli
7 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).
8 2 Denis 'GNUtoo' Carikli
9
Benefits:
10
* 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.
11 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.
12 11 Denis 'GNUtoo' Carikli
* It would enable the support for devices that are or will be added to upstream Linux.
13 2 Denis 'GNUtoo' Carikli
14 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.
15
This has some interesting outcomes:
16 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.
17
* 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.
18 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.
19 22 Denis 'GNUtoo' Carikli
20 2 Denis 'GNUtoo' Carikli
h2. Requirements
21
22 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.
23 2 Denis 'GNUtoo' Carikli
24 4 Denis 'GNUtoo' Carikli
h2. Devices
25
26 5 Denis 'GNUtoo' Carikli
It is best to use a device that requires the least amount of work to be functional under Replicant.
27
More precisely we want to minimize:
28 11 Denis 'GNUtoo' Carikli
* The work needed to have the device usable with upstream Linux.
29 5 Denis 'GNUtoo' Carikli
* The work porting or writing Android hardware abstractions layers.
30
31
To achieve that we can choose a device that:
32
* requires no or very minimal work to be fully supported by Linux.
33
* have less hardware features (so we don't need to support them in Linux and in the HALs).
34
* is easy to buy, so the work can be shared among multiple people.
35 53 Denis 'GNUtoo' Carikli
* doesn't have more freedom flaws than the devices currently supported by Replicant
36 5 Denis 'GNUtoo' Carikli
37 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
38 55 Denis 'GNUtoo' Carikli
would work on all ARM device supported by upstream Linux is complicated: Even GNU/Linux
39
distributions have a hard time doing that for ARM devices.
40 6 Denis 'GNUtoo' Carikli
41 58 Denis 'GNUtoo' Carikli
h2. Linux upstream status
42
43 11 Denis 'GNUtoo' Carikli
h3. Smartphones and tablets with a free software bootloader and work in progress upstream Linux support
44 4 Denis 'GNUtoo' Carikli
45 59 Denis 'GNUtoo' Carikli
|_. Formfactor |_. Vendor |_. Product  |_. Linux dts |_. Linux status | Verdict |
46
| 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 |
47
| 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 |
48 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  |
49 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 |
50
| 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 |
51 31 Denis 'GNUtoo' Carikli
52 4 Denis 'GNUtoo' Carikli
h3. Replicant supported Samsung Exynos devices
53
54 65 Denis 'GNUtoo' Carikli
|_. Formfactor |_. Vendor |_. Product |_. Linux dts | Linux status page | Issues | Verdict |
55
| Smartphone | Samsung | Galaxy S II (i9100)  | "exynos4210-trats.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4210-trats.dts  | | Probably has a signed bootloader | |
56 77 Denis 'GNUtoo' Carikli
| 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 |/2. https://blog.forkwhiletrue.me/pages/midas-mainline/ | signed bootloader | Good fit: Only the modem, touch keys, and small parts are missing upstream but are available as patches on top of it |
57 67 Denis 'GNUtoo' Carikli
| Smartphone | Samsung | Galaxy Note 2 (N7100) | "exynos4412-n710x.dts":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-n710x.dts | signed bootloader | Good fit: the LCD, the modem, touch keys, and small parts are missing but are available as patches on top of it |
58 1 Denis 'GNUtoo' Carikli
59 27 Denis 'GNUtoo' Carikli
h3. Other devices with some upstream support.
60
61 68 Denis 'GNUtoo' Carikli
|_. Formfactor  |_. Vendor |_. Product |_. Linux dts |_. Linux status page |_. Issues |_. Verdict |
62 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 | | | |
63 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 | | | |
64 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 | | | |
65 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 |
66 69 Denis 'GNUtoo' Carikli
| 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 | https://blog.forkwhiletrue.me/pages/midas-mainline/ | Signed bootloader | Good fit:
67
* Not fully supported by Replicant because of its modem but the work can be reused by the Galaxy SIII, Galaxy SII and Note 2 
68
* touch keys, and small parts are missing upstream but are available as patches on top of it. |
69 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
70
* Has only 256M of RAM | Bad fit: not enough RAM |
71 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
72
* Needs investigation to see if the touchscreen firmware is mandatory |/2. Would need investigation to see if the touchscreen firmware is mandatory |
73
| 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 |
74 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 |
75 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:
76
* Would need more guarantees requarding the modem isolation on recent qualcomm SOCs
77
* Would need more research to on the state of free software for more recent qualcom SOCs
78
* Not enough support in the Linux kernel for devices with Qualcomm SOCs |
79 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 |  |
80
| | | | "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 | |
81 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 |  |
82 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 |  |
83
| 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 | |
84
| 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 | |
85 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 | |
86 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 | | | |
87
| 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 | | | |
88 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 | | | |
89
| 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 | | | |
90 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 | | | |
91 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 | | | |
92 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 | | | |
93 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 | | | |
94 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 | | | |
95 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 | | | |
96
| 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 | | | |
97 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 | | | |
98
| 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 | | | |
99 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 | | | |
100 27 Denis 'GNUtoo' Carikli
101 1 Denis 'GNUtoo' Carikli
h3. Allwinner devices
102 13 Denis 'GNUtoo' Carikli
103
Devices with Allwinner SOCs are an interesting targets because:
104
* Many of them do not use signed bootloaders.
105
* Many of the SOCs and various devices using them have good Linux and u-boot mainline support
106
107
For instance the Lime 2 from Olimex is pretty well supported and is easy to find.
108
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.
109
110
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.
111
112
A good tablet for this task should have:
113
* 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.
114
* A Free software bootloader, or the ability to easily add support for the tablet to a free software bootloader.
115
* The ability to power and use an USB WiFi card or chip that is compatible with the ath9k_htc driver.
116
117
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.
118 1 Denis 'GNUtoo' Carikli
119 78 Denis 'GNUtoo' Carikli
h3. Rockchip devices
120
121 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
122
* 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/
123
124 78 Denis 'GNUtoo' Carikli
125 1 Denis 'GNUtoo' Carikli
h2. See also
126
127
* [[Google Summer of Code 2018]]
128 12 Denis 'GNUtoo' Carikli
129 19 Denis 'GNUtoo' Carikli
h1. Userspace
130
131
h2. Upstream userspace hardware support libraries
132 1 Denis 'GNUtoo' Carikli
133 17 Denis 'GNUtoo' Carikli
|_. Usage |_. Replicant |_. GNU/Linux |_. comments |
134
| Bluetooth stack | BlueDroid | Bluez | |
135 47 Denis 'GNUtoo' Carikli
| GPS hardware support | ? | gpsd | |
136 16 Denis 'GNUtoo' Carikli
137 20 Denis 'GNUtoo' Carikli
h2. Upstream non-hardware specific userspace
138 18 Denis 'GNUtoo' Carikli
139
|_. Usage |_. Replicant |_. GNU/Linux |_. comments |
140
| Unix command line tools | ? | Busybox, Coreutils | |
141 44 Denis 'GNUtoo' Carikli
142
h2. Other projects interested in using upstream Linux and/or contributing to it
143
144
* "Postmarketos":https://wiki.postmarketos.org/wiki/The_Mainline_Kernel