{"id":175,"date":"2022-08-07T23:59:43","date_gmt":"2022-08-07T23:59:43","guid":{"rendered":"https:\/\/blogs.gentoo.org\/gsoc\/?p=175"},"modified":"2022-08-08T00:01:36","modified_gmt":"2022-08-08T00:01:36","slug":"gentoo-musl-support-expansion-for-qt-kde-week-8","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/gsoc\/2022\/08\/07\/gentoo-musl-support-expansion-for-qt-kde-week-8\/","title":{"rendered":"Gentoo musl Support Expansion for Qt\/KDE Week 8"},"content":{"rendered":"<p>This week I&#8217;ve spent most of my time getting Gentoo musl to run on my PinePhone Pro and packaging mauikit apps. I have also done some minor testing on KDE applications and some other miscellaneous things.<\/p>\n<p>In my proposal I had initially planned on porting KDE applications and making them build on Gentoo musl the following two weeks, and then making sure test suites run the week following that. But I&#8217;ve already gotten kde-apps-meta installed and the programs are working well for the most part. Though I haven&#8217;t enabled every use flag for the KDE apps and I haven&#8217;t ran every test suite so there&#8217;s definitely work to do left, just not 3 weeks work. So instead I asked Sam if I could spend some time working on getting Gentoo musl to run on my PinePhone Pro with Plasma Mobile as a side project.<br \/>\n<!--more--><\/p>\n<p>Starting with the PinePhone. The Gentoo install itself was pretty smooth and I didn&#8217;t run into any major issues. But I really got stuck on some other more low level and non-Gentoo bits.<br \/>\nThe first issue I ran into was when I installed a new kernel onto it. Apparently a single developer called Megi does most of the PPP kernel development so I installed his kernel. Confusingly his development branch is called &#8220;orange-pi-5.x&#8221; and it took me some time figuring that out :D. Anyways, the compilation itself was straight forward, and the defconfig _almost_ worked well. I stole the bootloader configuration from PostmarketOS, rsync:ed the kernel + dtbs, and then changed some relevant parts in the bootloader config. Sadly the phone did not boot, and there was no output to be seen on the screen :\/.<br \/>\nAfter reading the wiki I found out that I could connect via serial through the headphone jack. I used an RS232-to-USB adapter and soldered it onto the internal wires of a 3.5mm cable. For output this did work, but when connecting TX to also get input, the output just got messed up and I couldn&#8217;t read it. I tried to debug this and also seeked help from others, but ultimately couldn&#8217;t get it to work. Luckily the only thing I needed was output because I saw in the bootlog that EFI stub was missing from the kernel. Enabling that and generating an initramfs made the phone boot!<\/p>\n<p>Then I started emerging some packages, and even though I had the charger plugged in, the phone completely discharged after a while. After that the phone did not want to boot and I tried all kinds of things, like booting from SD card, reflashing bootloader, trying different cables and nothing worked &#8230; It turned out that the bootloader (Tow-boot) had a bug that made the phone not charge after the battery as emptied, and I needed to boot it into a special mode holding a button with a sim card opener.<\/p>\n<p>After that I set up distcc with cross compilation, and there came the second issue. &#8220;__aarch64_cas4_sync undefined symbol&#8221;. I asked Sam and he said it probably was a distcc issue. Because of me not wanting to run into this again I tried the aarch64-gentoo-linux-musl-emerge wrapper instead. This worked for the most part, but I had trouble with copying over my phones configuration to \/usr\/&#8230;\/etc\/portage.<br \/>\nI then learned about the ROOT, SYSROOT, and PORTAGE_CONFIGROOT variables. Toghether with sshfs I could easily emerge packages for the phone on my PC without using something slow like qemu-user, nice!<br \/>\nI emerged a lot of packages like this and noticed that the program dispatch-conf did not honour the variables. This was easy to fix and I PR:ed it here https:\/\/github.com\/gentoo\/portage\/pull\/881.<\/p>\n<p>I have also created a lot of ebuilds for Mauikit apps, these are cross platform KDE applications that look great on smaller devices like phones. https:\/\/github.com\/gentoo\/kde\/pull\/910\/commits. They also work great on my PC.<\/p>\n<p>All in all I&#8217;ve spent most my time this week working on the PinePhone, and the two following weeks I&#8217;ll do a lot of testing for the KDE applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I&#8217;ve spent most of my time getting Gentoo musl to run on my PinePhone Pro and packaging mauikit apps. I have also done some minor testing on KDE applications and some other miscellaneous things. In my proposal I &hellip; <a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2022\/08\/07\/gentoo-musl-support-expansion-for-qt-kde-week-8\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":177,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts\/175"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/users\/177"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"predecessor-version":[{"id":176,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts\/175\/revisions\/176"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}