Skip to content

Commit eeb7ada

Browse files
author
JustSoup321
committed
MediaTek Mainlining Madness
1 parent 105773a commit eeb7ada

File tree

26 files changed

+1229
-51
lines changed

26 files changed

+1229
-51
lines changed

Diff for: bundle.min.js

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: categories/index.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<link>http://lowendlibre.github.io/categories/</link>
66
<description>Recent content in Categories on lowendlibre Blog</description>
77
<generator>Hugo -- gohugo.io</generator>
8-
<language>en-us</language><atom:link href="http://lowendlibre.github.io/categories/index.xml" rel="self" type="application/rss+xml" />
8+
<language>en</language><atom:link href="http://lowendlibre.github.io/categories/index.xml" rel="self" type="application/rss+xml" />
99
</channel>
1010
</rss>

Diff for: index.html

+36-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta name="generator" content="Hugo 0.101.0" />
4+
<meta name="generator" content="Hugo 0.117.0">
55

66
<title>lowendlibre Blog</title>
77

@@ -143,6 +143,41 @@
143143

144144

145145

146+
<article class="post on-list">
147+
<h1 class="post-title">
148+
<a href="http://lowendlibre.github.io/posts/mediatek-mainlining-madness/">MediaTek Mainlining Madness</a>
149+
</h1>
150+
151+
<div class="post-meta"><time class="post-date">2023-09-03</time><span class="post-author">JustSoup321</span></div>
152+
153+
154+
<span class="post-tags">
155+
156+
#<a href="http://lowendlibre.github.io/tags/kernel/">Kernel</a>&nbsp;
157+
158+
#<a href="http://lowendlibre.github.io/tags/postmarketos/">postmarketOS</a>&nbsp;
159+
160+
#<a href="http://lowendlibre.github.io/tags/mainline/">mainline</a>&nbsp;
161+
162+
</span>
163+
164+
165+
166+
167+
168+
<div class="post-content">
169+
170+
Progress report on the mainlining of the MediaTek mt6765 SOC.
171+
172+
</div>
173+
174+
175+
<div>
176+
<a class="read-more button" href="/posts/mediatek-mainlining-madness/">Read more →</a>
177+
</div>
178+
179+
</article>
180+
146181
<article class="post on-list">
147182
<h1 class="post-title">
148183
<a href="http://lowendlibre.github.io/posts/from-zero-to-kernel/">From Zero to Kernel</a>

Diff for: index.xml

+98-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,104 @@
55
<link>http://lowendlibre.github.io/</link>
66
<description>Recent content on lowendlibre Blog</description>
77
<generator>Hugo -- gohugo.io</generator>
8-
<language>en-us</language>
9-
<lastBuildDate>Wed, 09 Aug 2023 20:27:55 -0400</lastBuildDate><atom:link href="http://lowendlibre.github.io/index.xml" rel="self" type="application/rss+xml" />
8+
<language>en</language>
9+
<lastBuildDate>Sun, 03 Sep 2023 15:58:15 -0400</lastBuildDate><atom:link href="http://lowendlibre.github.io/index.xml" rel="self" type="application/rss+xml" />
10+
<item>
11+
<title>MediaTek Mainlining Madness</title>
12+
<link>http://lowendlibre.github.io/posts/mediatek-mainlining-madness/</link>
13+
<pubDate>Sun, 03 Sep 2023 15:58:15 -0400</pubDate>
14+
15+
<guid>http://lowendlibre.github.io/posts/mediatek-mainlining-madness/</guid>
16+
<description>MediaTek Mainlining Madness Long time no see! We have a lot to cover, so let&amp;rsquo;s get right into it.
17+
We have two devices booting the mt6765 kernel. The Nokia 3.1 Plus (Roo) and the TCL A3 (bangkok_tf). Out of these two devices, the Nokia 3.1 Plus has better support due to being easier to get logs from.
18+
What is working? You won&amp;rsquo;t be replacing your daily driver just yet, but basic computer features are available.</description>
19+
<content>&lt;h1 id=&#34;mediatek-mainlining-madness&#34;&gt;MediaTek Mainlining Madness&lt;/h1&gt;
20+
&lt;p&gt;Long time no see! We have a lot to cover, so let&amp;rsquo;s get right into it.&lt;/p&gt;
21+
&lt;p&gt;We have two devices booting the mt6765 kernel. The Nokia 3.1 Plus (Roo) and the TCL A3 (bangkok_tf). Out of these two devices, the Nokia 3.1 Plus has better support due to being easier to get logs from.&lt;/p&gt;
22+
&lt;h3 id=&#34;what-is-working&#34;&gt;What is working?&lt;/h3&gt;
23+
&lt;p&gt;You won&amp;rsquo;t be replacing your daily driver just yet, but basic computer features are available.&lt;/p&gt;
24+
&lt;ul&gt;
25+
&lt;li&gt;postmarketOS rootfs
26+
&lt;ul&gt;
27+
&lt;li&gt;This is the big one. The kernel is able to load the rootfs from an sdcard. It might be able to load from the emmc, but that is untested.&lt;/li&gt;
28+
&lt;/ul&gt;
29+
&lt;/li&gt;
30+
&lt;li&gt;USB
31+
&lt;ul&gt;
32+
&lt;li&gt;Both connection and USB Networking works, allowing for internet connection.&lt;/li&gt;
33+
&lt;/ul&gt;
34+
&lt;/li&gt;
35+
&lt;li&gt;4 CPU Cores
36+
&lt;ul&gt;
37+
&lt;li&gt;These are only half of the cores available on the mt6765, but they are enough for basic initialization.&lt;/li&gt;
38+
&lt;/ul&gt;
39+
&lt;/li&gt;
40+
&lt;li&gt;Haptics
41+
&lt;ul&gt;
42+
&lt;li&gt;I honestly have no idea why these work, but they do. Nice?&lt;/li&gt;
43+
&lt;/ul&gt;
44+
&lt;/li&gt;
45+
&lt;li&gt;SD-Card
46+
&lt;ul&gt;
47+
&lt;li&gt;The mounting of the sdcard and booting of operating systems of of it works.&lt;/li&gt;
48+
&lt;/ul&gt;
49+
&lt;/li&gt;
50+
&lt;li&gt;PMIC Buttons (Hardware Buttons)
51+
&lt;ul&gt;
52+
&lt;li&gt;You can actually click buttons and they do stuff. Wow.&lt;/li&gt;
53+
&lt;/ul&gt;
54+
&lt;/li&gt;
55+
&lt;li&gt;Real Time Clock
56+
&lt;ul&gt;
57+
&lt;li&gt;Basic ARM stuff that nobody cares about.&lt;/li&gt;
58+
&lt;/ul&gt;
59+
&lt;/li&gt;
60+
&lt;li&gt;Thermal
61+
&lt;ul&gt;
62+
&lt;li&gt;The CPU reports thermals of the device to the kernel. It doesn&amp;rsquo;t report the correct values though, so this will require some tweaking.&lt;/li&gt;
63+
&lt;/ul&gt;
64+
&lt;/li&gt;
65+
&lt;li&gt;i2c
66+
&lt;ul&gt;
67+
&lt;li&gt;This was a pain to get working, but it was required for display.&lt;/li&gt;
68+
&lt;/ul&gt;
69+
&lt;/li&gt;
70+
&lt;li&gt;Backlight
71+
&lt;ul&gt;
72+
&lt;li&gt;The screen actually has brightness. Wow.&lt;/li&gt;
73+
&lt;/ul&gt;
74+
&lt;/li&gt;
75+
&lt;li&gt;Flashlight
76+
&lt;ul&gt;
77+
&lt;li&gt;Another one of those: I honestly have no idea why this works.&lt;/li&gt;
78+
&lt;/ul&gt;
79+
&lt;/li&gt;
80+
&lt;li&gt;Charger
81+
&lt;ul&gt;
82+
&lt;li&gt;The battery is able to get voltage higher than what it is discharging and can handle charging correctly. I am unsure if it is able to charge while suspended as we don&amp;rsquo;t have that implemented yet, so just assume it cannot.&lt;/li&gt;
83+
&lt;/ul&gt;
84+
&lt;/li&gt;
85+
&lt;li&gt;EMMC
86+
&lt;ul&gt;
87+
&lt;li&gt;This was a huge surprise to find working. Not even the mt6763 (which the vollaphone uses) has this working. Apparently the SOC handles EMMC in the same way it handles sdcards, so it was just a process of changing around a few values and we got it working.&lt;/li&gt;
88+
&lt;/ul&gt;
89+
&lt;/li&gt;
90+
&lt;li&gt;Framebuffer
91+
&lt;ul&gt;
92+
&lt;li&gt;Simplefb works but causes a huge kernel panic, so it is almost useless for getting logs. It should be possible to fix it through some switching of the dts memory maps, but that is to be seen.&lt;/li&gt;
93+
&lt;/ul&gt;
94+
&lt;/li&gt;
95+
&lt;/ul&gt;
96+
&lt;h3 id=&#34;upstreaming&#34;&gt;Upstreaming&lt;/h3&gt;
97+
&lt;p&gt;While I would love to be able to bring these patches to the true mainline Linux kernel, the way that the kernel handles the SOC is just incompatible with the main tree. Maybe in a few years time it would be possible if the code was cleaned up as much as possible, but even then, the dts files for the phones would not be accepted due to bootloader hacks.&lt;/p&gt;
98+
&lt;h3 id=&#34;postmarketos-upstreaming&#34;&gt;postmarketOS Upstreaming&lt;/h3&gt;
99+
&lt;p&gt;On the other hand, JustSoup is in the process of writing a kernel package to send upstream to postmarketOS so new ports can make use of this mainline kernel fork. If you are interested in porting a new mt6765/mt6762 device to postmarketOS, keep an eye out for said kernel package, message JustSoup on Mastodon or Matrix, or just ask in the postmarketOS mainlining channel on Matrix.&lt;/p&gt;
100+
&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h3&gt;
101+
&lt;p&gt;While this post was short, I hope it was enough to bring some light to our progress here at lowendlibre. If you have any questions, feel free to ask on the Mastodon post.&lt;/p&gt;
102+
&lt;p&gt;Until next time!&lt;/p&gt;
103+
</content>
104+
</item>
105+
10106
<item>
11107
<title>From Zero to Kernel</title>
12108
<link>http://lowendlibre.github.io/posts/from-zero-to-kernel/</link>

Diff for: page/1/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en-us">
2+
<html lang="en">
33
<head>
44
<title>http://lowendlibre.github.io/</title>
55
<link rel="canonical" href="http://lowendlibre.github.io/">

Diff for: posts/from-zero-to-kernel/index.html

+7
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ <h3 id="conclusion">Conclusion<a href="#conclusion" class="hanchor" ariaLabel="A
188188
</div>
189189
<div class="pagination__buttons">
190190

191+
<span class="button previous">
192+
<a href="http://lowendlibre.github.io/posts/mediatek-mainlining-madness/">
193+
<span class="button__icon"></span>
194+
<span class="button__text">MediaTek Mainlining Madness</span>
195+
</a>
196+
</span>
197+
191198

192199
<span class="button next">
193200
<a href="http://lowendlibre.github.io/posts/hello-world/">

Diff for: posts/index.html

+34
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,40 @@
133133

134134
<div class="posts">
135135

136+
<article class="post on-list">
137+
<h1 class="post-title">
138+
<a href="http://lowendlibre.github.io/posts/mediatek-mainlining-madness/">MediaTek Mainlining Madness</a>
139+
</h1>
140+
<div class="post-meta"><time class="post-date">2023-09-03</time><span class="post-author">JustSoup321</span></div>
141+
142+
143+
<span class="post-tags">
144+
145+
#<a href="http://lowendlibre.github.io/tags/kernel/">Kernel</a>&nbsp;
146+
147+
#<a href="http://lowendlibre.github.io/tags/postmarketos/">postmarketOS</a>&nbsp;
148+
149+
#<a href="http://lowendlibre.github.io/tags/mainline/">mainline</a>&nbsp;
150+
151+
</span>
152+
153+
154+
155+
156+
157+
<div class="post-content">
158+
159+
Progress report on the mainlining of the MediaTek mt6765 SOC.
160+
161+
</div>
162+
163+
164+
<div>
165+
<a class="read-more button" href="/posts/mediatek-mainlining-madness/">Read more →</a>
166+
</div>
167+
168+
</article>
169+
136170
<article class="post on-list">
137171
<h1 class="post-title">
138172
<a href="http://lowendlibre.github.io/posts/from-zero-to-kernel/">From Zero to Kernel</a>

Diff for: posts/index.xml

+98-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,104 @@
55
<link>http://lowendlibre.github.io/posts/</link>
66
<description>Recent content in Posts on lowendlibre Blog</description>
77
<generator>Hugo -- gohugo.io</generator>
8-
<language>en-us</language>
9-
<lastBuildDate>Wed, 09 Aug 2023 20:27:55 -0400</lastBuildDate><atom:link href="http://lowendlibre.github.io/posts/index.xml" rel="self" type="application/rss+xml" />
8+
<language>en</language>
9+
<lastBuildDate>Sun, 03 Sep 2023 15:58:15 -0400</lastBuildDate><atom:link href="http://lowendlibre.github.io/posts/index.xml" rel="self" type="application/rss+xml" />
10+
<item>
11+
<title>MediaTek Mainlining Madness</title>
12+
<link>http://lowendlibre.github.io/posts/mediatek-mainlining-madness/</link>
13+
<pubDate>Sun, 03 Sep 2023 15:58:15 -0400</pubDate>
14+
15+
<guid>http://lowendlibre.github.io/posts/mediatek-mainlining-madness/</guid>
16+
<description>MediaTek Mainlining Madness Long time no see! We have a lot to cover, so let&amp;rsquo;s get right into it.
17+
We have two devices booting the mt6765 kernel. The Nokia 3.1 Plus (Roo) and the TCL A3 (bangkok_tf). Out of these two devices, the Nokia 3.1 Plus has better support due to being easier to get logs from.
18+
What is working? You won&amp;rsquo;t be replacing your daily driver just yet, but basic computer features are available.</description>
19+
<content>&lt;h1 id=&#34;mediatek-mainlining-madness&#34;&gt;MediaTek Mainlining Madness&lt;/h1&gt;
20+
&lt;p&gt;Long time no see! We have a lot to cover, so let&amp;rsquo;s get right into it.&lt;/p&gt;
21+
&lt;p&gt;We have two devices booting the mt6765 kernel. The Nokia 3.1 Plus (Roo) and the TCL A3 (bangkok_tf). Out of these two devices, the Nokia 3.1 Plus has better support due to being easier to get logs from.&lt;/p&gt;
22+
&lt;h3 id=&#34;what-is-working&#34;&gt;What is working?&lt;/h3&gt;
23+
&lt;p&gt;You won&amp;rsquo;t be replacing your daily driver just yet, but basic computer features are available.&lt;/p&gt;
24+
&lt;ul&gt;
25+
&lt;li&gt;postmarketOS rootfs
26+
&lt;ul&gt;
27+
&lt;li&gt;This is the big one. The kernel is able to load the rootfs from an sdcard. It might be able to load from the emmc, but that is untested.&lt;/li&gt;
28+
&lt;/ul&gt;
29+
&lt;/li&gt;
30+
&lt;li&gt;USB
31+
&lt;ul&gt;
32+
&lt;li&gt;Both connection and USB Networking works, allowing for internet connection.&lt;/li&gt;
33+
&lt;/ul&gt;
34+
&lt;/li&gt;
35+
&lt;li&gt;4 CPU Cores
36+
&lt;ul&gt;
37+
&lt;li&gt;These are only half of the cores available on the mt6765, but they are enough for basic initialization.&lt;/li&gt;
38+
&lt;/ul&gt;
39+
&lt;/li&gt;
40+
&lt;li&gt;Haptics
41+
&lt;ul&gt;
42+
&lt;li&gt;I honestly have no idea why these work, but they do. Nice?&lt;/li&gt;
43+
&lt;/ul&gt;
44+
&lt;/li&gt;
45+
&lt;li&gt;SD-Card
46+
&lt;ul&gt;
47+
&lt;li&gt;The mounting of the sdcard and booting of operating systems of of it works.&lt;/li&gt;
48+
&lt;/ul&gt;
49+
&lt;/li&gt;
50+
&lt;li&gt;PMIC Buttons (Hardware Buttons)
51+
&lt;ul&gt;
52+
&lt;li&gt;You can actually click buttons and they do stuff. Wow.&lt;/li&gt;
53+
&lt;/ul&gt;
54+
&lt;/li&gt;
55+
&lt;li&gt;Real Time Clock
56+
&lt;ul&gt;
57+
&lt;li&gt;Basic ARM stuff that nobody cares about.&lt;/li&gt;
58+
&lt;/ul&gt;
59+
&lt;/li&gt;
60+
&lt;li&gt;Thermal
61+
&lt;ul&gt;
62+
&lt;li&gt;The CPU reports thermals of the device to the kernel. It doesn&amp;rsquo;t report the correct values though, so this will require some tweaking.&lt;/li&gt;
63+
&lt;/ul&gt;
64+
&lt;/li&gt;
65+
&lt;li&gt;i2c
66+
&lt;ul&gt;
67+
&lt;li&gt;This was a pain to get working, but it was required for display.&lt;/li&gt;
68+
&lt;/ul&gt;
69+
&lt;/li&gt;
70+
&lt;li&gt;Backlight
71+
&lt;ul&gt;
72+
&lt;li&gt;The screen actually has brightness. Wow.&lt;/li&gt;
73+
&lt;/ul&gt;
74+
&lt;/li&gt;
75+
&lt;li&gt;Flashlight
76+
&lt;ul&gt;
77+
&lt;li&gt;Another one of those: I honestly have no idea why this works.&lt;/li&gt;
78+
&lt;/ul&gt;
79+
&lt;/li&gt;
80+
&lt;li&gt;Charger
81+
&lt;ul&gt;
82+
&lt;li&gt;The battery is able to get voltage higher than what it is discharging and can handle charging correctly. I am unsure if it is able to charge while suspended as we don&amp;rsquo;t have that implemented yet, so just assume it cannot.&lt;/li&gt;
83+
&lt;/ul&gt;
84+
&lt;/li&gt;
85+
&lt;li&gt;EMMC
86+
&lt;ul&gt;
87+
&lt;li&gt;This was a huge surprise to find working. Not even the mt6763 (which the vollaphone uses) has this working. Apparently the SOC handles EMMC in the same way it handles sdcards, so it was just a process of changing around a few values and we got it working.&lt;/li&gt;
88+
&lt;/ul&gt;
89+
&lt;/li&gt;
90+
&lt;li&gt;Framebuffer
91+
&lt;ul&gt;
92+
&lt;li&gt;Simplefb works but causes a huge kernel panic, so it is almost useless for getting logs. It should be possible to fix it through some switching of the dts memory maps, but that is to be seen.&lt;/li&gt;
93+
&lt;/ul&gt;
94+
&lt;/li&gt;
95+
&lt;/ul&gt;
96+
&lt;h3 id=&#34;upstreaming&#34;&gt;Upstreaming&lt;/h3&gt;
97+
&lt;p&gt;While I would love to be able to bring these patches to the true mainline Linux kernel, the way that the kernel handles the SOC is just incompatible with the main tree. Maybe in a few years time it would be possible if the code was cleaned up as much as possible, but even then, the dts files for the phones would not be accepted due to bootloader hacks.&lt;/p&gt;
98+
&lt;h3 id=&#34;postmarketos-upstreaming&#34;&gt;postmarketOS Upstreaming&lt;/h3&gt;
99+
&lt;p&gt;On the other hand, JustSoup is in the process of writing a kernel package to send upstream to postmarketOS so new ports can make use of this mainline kernel fork. If you are interested in porting a new mt6765/mt6762 device to postmarketOS, keep an eye out for said kernel package, message JustSoup on Mastodon or Matrix, or just ask in the postmarketOS mainlining channel on Matrix.&lt;/p&gt;
100+
&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h3&gt;
101+
&lt;p&gt;While this post was short, I hope it was enough to bring some light to our progress here at lowendlibre. If you have any questions, feel free to ask on the Mastodon post.&lt;/p&gt;
102+
&lt;p&gt;Until next time!&lt;/p&gt;
103+
</content>
104+
</item>
105+
10106
<item>
11107
<title>From Zero to Kernel</title>
12108
<link>http://lowendlibre.github.io/posts/from-zero-to-kernel/</link>

0 commit comments

Comments
 (0)