gilius wrote: ↑
Wed Apr 11, 2018 7:41 pm
It would be interesting to document the process of how you were able to take that distribution, like any arm64 distribution, and repackage it with a KVM-enabled kernel. And, just out of curiosity, are there any guides published on the Internet right now that resemble the process you undertook? It's my belief that a lot of these Linux techniques are not particularly well known, documented, distributed or shared in the open. Knowledge is power, and perhaps people's careers depend on keeping certain things under wraps - in spite of the free open-source nature of the software. That's just my impression from researching guides, searching online for solutions to problems, and mingling with you guys.
As to documentation, there isn't a single path that will suit everyone, but here are some pointers that may help if you want to deep dive...
First of all, if you haven't done so already, and you can afford to block out the time, I strongly recommend running through a Linux from Scratch
install, as a learning exercise. It's easiest to do this on an old laptop or similar (or you can even do it on a VM on a PC) - while LFS does support various embedded targets, staring at a swapping compiler isn't perhaps the most educational part of the process ^-^. The manual for LFS is fantastic - if you can stick it through to the end, you'll learn a lot about how a Linux system works under the hood.
Next, I have written an end-to-end install guide for Gentoo Linux ("Sakaki's EFI Install Guide
"), as a sort of augmented version of the Gentoo Handbook
. Again, this is PC-focussed, but I blend in tutorial sections on things like Portage
(Gentoo's package management system), building custom kernels
, installing GNOME / XWayland
, setting up secure boot
, using firejail
to properly isolate vulnerable apps etc., many of which have at least some application in the SBC domain. So that might be worth a look, particularly if you intend staying with Gentoo longer term, and would like to understand its system construction mechanics sufficiently to bend them to your own will (kind of the point of running Gentoo in the first place, it describes itself
as a "metadistribution" after all ^-^).
Then, wrt this particular target (64-bit RPi3 B / B+)... actually Gentoo, being primarily a source-based distro where the average user has something of a "tinkering" mindset, tends to have pretty good sharing of info about architecture build-outs, and this case is no exception.
For example, also on the Gentoo Wiki, NeddySeagoon has an excellent page which covers building a 64-bit RPi3 system from scratch, here
That was basically the process I followed originally for the baseline gentoo-on-rpi3-64bit
system, but then I packaged the various platform-specific tweaks as OpenRC services (details here
), the ebuilds for which live in this
overlay. And I set up a custom profile
to cover the various keywording, USE flags etc. needed to get a clean build (the profile files can be reviewed here
Also, for the RPi3 B+, I needed to make some additional changes, covered in this post
on the project's sticky thread on the Gentoo Forums.
As regards build setup, I use a distcc
system which offloads compilation to a crossdev
toolchain (Gentoo's cross-compiler framework) on a PC; I have instructions for setting this up on the gentoo-on-rpi3-64bit project's wiki
, along with instructions on how to e.g. build an RPi3 kernel directly on your PC
(this is how I created your custom kernel, incidentally). There is also a section on building a custom kernel on your RPi3 itself on the gentoo-on-rpi3-64bit GitHub page, here
(be prepared for 4-5 hour build time though, if you don't use distcc).
Once the system is built I have a custom script to "clean" it and prepare a vanilla image; that's the only bit that isn't currently public, but it is fairly mature now, so I may publish it at some stage; in any event if you are only building out a system for local use, you don't need this.
Lastly, I have set up an automated build server covering the project's userland and kernel, to allow users to keep their system up-to-date via binary packages
should they choose. Some details about this may be found here
Hope that helps - if you have have any problems using Gentoo, just ask (either here, or you can post in the project's sticky thread
on the Gentoo forum; we don't bite!)
gilius wrote: ↑
Wed Apr 11, 2018 7:41 pm
sudo apt-get install libglib2.0-dev
sudo apt-get install libpixman-1-dev
sudo apt-get install libpixman-1-0
sudo apt-get install libsdl2-dev
sudo apt-get install autoconf
This being Gentoo, I've shipped all the dev libraries and tools you need to build all of the end-user binaries on the image, on the image ^-^
A full set of the supplied packages may be viewed here
(the version numbers are from the Gentoo ebuilds, but these normally map 1-to-1 onto the upstream versions).
procount wrote: ↑
Wed Apr 11, 2018 9:11 pm
(Just so you know...Sakaki is female
I've learnt to take things like "good man" as a compliment online tbh (& no one's yet made the mistake when they meet me in person lol) ^-^