Gentoo Archives: gentoo-soc

From: cat@××××××××.org
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Gentoo musl Support Expansion for Qt/KDE Week 8
Date: Mon, 08 Aug 2022 16:42:47
Message-Id: N8yK_Uy--3-2@catcream.org
1 Understood. Though the thing I had planned to focus on the most during week 12 was the musl porting guide. Basically writing explanations and fixes for recurring problems that I've run into during this project.
2
3 I do want to experiment with the phone a bit more before I feel comfortable writing a complete Gentoo install guide. For example I want to test levinboot and some more user space stuff. Will probably start with it on sunday since it's usually my blogging day.
4 --
5 Sent with Tutanota, enjoy secure & ad-free emails.
6
7
8
9 Aug 8, 2022, 14:49 by ebo@×××××××.com:
10
11 > I would also suggest not putting this off until week 12 -- it takes time to work back and forth and make changes. Also, if you are working with other people, they are just as busy as you needing to crank out the last bits, and need whatever lead-time their schedules require. Last minuite requests always mess things up.
12 >
13 > On Aug 8 2022 7:39 AM, cat@××××××××.org wrote:
14 >
15 >> Okay I got you, sure!
16 >>
17 >>
18 >>
19 >> Aug 8, 2022, 13:18 by ebo@×××××××.com:
20 >>
21 >>> When you get the draft of step-by-step doc, sit down and do a clean install and follow the step-by-step to verify that it works as documented. Maybe if you have someone that can beta test things, they can verify the final docs.
22 >>>
23 >>> Anyway, that is all I meant.
24 >>>
25 >>> EBo --
26 >>>
27 >>>
28 >>> On Aug 8 2022 6:58 AM, cat@××××××××.org wrote:
29 >>>
30 >>>> Yes! I have week 12 fully dedicated to writing documentation actually.
31 >>>> I have written some notes but I'll also use my daily blogs to remind
32 >>>> me of what to write about :)
33 >>>>
34 >>>> What do you mean by "and verification that they are really up to
35 >>>> date", like so the older docs are really up to date? For the PinePhone
36 >>>> Pro in particular I'd like to do something like this
37 >>>> https://wiki.gentoo.org/wiki/PinePhone but with a lot more
38 >>>> information.
39 >>>>
40 >>>>
41 >>>>
42 >>>> Aug 8, 2022, 02:33 by ebo@×××××××.com:
43 >>>>
44 >>>>> I'm not one of your mentors (I am a former GSOC intern and mentor; which explains why I am still on the lists).
45 >>>>>
46 >>>>> All of this sounds like wonderful progress. The one thing I have not seen you mention is documentation, quick-starts, and verification that they are really up to date. Spending a week or two on those to polish then up would be a wonderful addition.
47 >>>>>
48 >>>>> EBo --
49 >>>>>
50 >>>>> On Aug 7 2022 8:01 PM, cat@××××××××.org wrote:
51 >>>>>
52 >>>>>> This week I've spent most of my time getting Gentoo musl to run on my
53 >>>>>> PinePhone Pro and packaging mauikit apps. I have also done some minor
54 >>>>>> testing on KDE applications and some other miscellaneous things.
55 >>>>>>
56 >>>>>> In my proposal I had initially planned on porting KDE applications and
57 >>>>>> making them build on Gentoo musl the following two weeks, and then
58 >>>>>> making sure test suites run the week following that. But I've already
59 >>>>>> gotten kde-apps-meta installed and the programs are working well for
60 >>>>>> the most part. Though I haven't enabled every use flag for the KDE
61 >>>>>> apps and I haven't ran every test suite so there's definitely work to
62 >>>>>> do left, just not 3 weeks work. So instead I asked Sam if I could
63 >>>>>> spend some time working on getting Gentoo musl to run on my PinePhone
64 >>>>>> Pro with Plasma Mobile as a side project.
65 >>>>>> <!--more-->
66 >>>>>>
67 >>>>>> Starting with the PinePhone. The Gentoo install itself was pretty
68 >>>>>> smooth and I didn't run into any major issues. But I really got stuck
69 >>>>>> on some other more low level and non-Gentoo bits.
70 >>>>>> The first issue I ran into was when I installed a new kernel onto it.
71 >>>>>> Apparently a single developer called Megi does most of the PPP kernel
72 >>>>>> development so I installed his kernel. Confusingly his development
73 >>>>>> branch is called "orange-pi-5.x" and it took me some time figuring
74 >>>>>> that out :D. Anyways, the compilation itself was straight forward, and
75 >>>>>> the defconfig _almost_ worked well. I stole the bootloader
76 >>>>>> configuration from PostmarketOS, rsync:ed the kernel + dtbs, and then
77 >>>>>> changed some relevant parts in the bootloader config. Sadly the phone
78 >>>>>> did not boot, and there was no output to be seen on the screen :/.
79 >>>>>> After reading the wiki I found out that I could connect via serial
80 >>>>>> through the headphone jack. I used an RS232-to-USB adapter and
81 >>>>>> soldered it onto the internal wires of a 3.5mm cable. For output this
82 >>>>>> did work, but when connecting TX to also get input, the output just
83 >>>>>> got messed up and I couldn't read it. I tried to debug this and also
84 >>>>>> seeked help from others, but ultimately couldn't get it to work.
85 >>>>>> Luckily the only thing I needed was output because I saw in the
86 >>>>>> bootlog that EFI stub was missing from the kernel. Enabling that and
87 >>>>>> generating an initramfs made the phone boot!
88 >>>>>>
89 >>>>>> Then I started emerging some packages, and even though I had the
90 >>>>>> charger plugged in, the phone completely discharged after a while.
91 >>>>>> After that the phone did not want to boot and I tried all kinds of
92 >>>>>> things, like booting from SD card, reflashing bootloader, trying
93 >>>>>> different cables and nothing worked ... It turned out that the
94 >>>>>> bootloader (Tow-boot) had a bug that made the phone not charge after
95 >>>>>> the battery as emptied, and I needed to boot it into a special mode
96 >>>>>> holding a button with a sim card opener.
97 >>>>>>
98 >>>>>> After that I set up distcc with cross compilation, and there came the
99 >>>>>> second issue. "__aarch64_cas4_sync undefined symbol". I asked Sam and
100 >>>>>> he said it probably was a distcc issue. Because of me not wanting to
101 >>>>>> run into this again I tried the aarch64-gentoo-linux-musl-emerge
102 >>>>>> wrapper instead. This worked for the most part, but I had trouble with
103 >>>>>> copying over my phones configuration to /usr/.../etc/portage.
104 >>>>>> I then learned about the ROOT, SYSROOT, and PORTAGE_CONFIGROOT
105 >>>>>> variables. Toghether with sshfs I could easily emerge packages for the
106 >>>>>> phone on my PC without using something slow like qemu-user, nice!
107 >>>>>> I emerged a lot of packages like this and noticed that the program
108 >>>>>> dispatch-conf did not honour the variables. This was easy to fix and I
109 >>>>>> PR:ed it here https://github.com/gentoo/portage/pull/881.
110 >>>>>>
111 >>>>>> I have also created a lot of ebuilds for Mauikit apps, these are cross
112 >>>>>> platform KDE applications that look great on smaller devices like
113 >>>>>> phones. https://github.com/gentoo/kde/pull/910/commits. They also work
114 >>>>>> great on my PC.
115 >>>>>>
116 >>>>>> All in all I've spent most my time this week working on the PinePhone,
117 >>>>>> and the two following weeks I'll do a lot of testing for the KDE
118 >>>>>> applications.
119 >>>>>>