The challenge is to find the complete set of sources that corresponds to what you have installed. I've never succeeded in doing that with any Linux installation - to be fair I've not tried in many years. With the BSDs OTOH it's easy because they're set up that way. I have no idea about self-hosting RiscOS.
--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
On a sunny day (Sun, 1 Mar 2020 08:30:44 +0000) it happened Ahem A Rivet's Shot wrote in :
Oh well I have recompiled kernels on my PCs many many times, not on Raspi, should work the same though. On the PC I could add an entry to grub so I have a selection at boot time what version I run.
But that is also why I do not do upgrades, once you are in that multiple kernel stuff your system is simply unique, and last thing you want is anybody or anything making changes.
My oldest PC still running after ??? years boot menu:
formatting link
win98 still on it and working last time I looked. Linux 2.6 something kernel choices. I still use it, as it has a satellite TV PCI card and 2 special HQ audio cards and a parport connector (useful for my PIC programmer) Sometimes you need to bang it for it to stop beeping in despair and actually start.. Need to re-insert the board connectors likely, bad contacts).
Perhaps that requires some (inside?) knowledge of what Gentoo is.
Yes, Gentoo can certainly self host and self (re)compile every thing on the system.
I suspect that it can even recompile / relink / reassemble the pieces of proprietary code needed to boot the system. At least given what's publicly available.
Others have reminded me that Gentoo is a self-hosting Linux distribution - in many ways it looks like FreeBSD will when pkg-base lands. The build system is complex (portage/emerge) but it is self hosting by design like the BSDs.
--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
In a Debian system, the source for every package is available as a sopurce package. You need the right lines in your /etc/apt/sources.list file. This includes the source for the kernel.
As Raspbian is essentially Debian, I'd expect it to be the same. Indeed on my (very) old out-of-date Raspbian system I can download source files - I simply added a "deb-src" line that the same as my "deb" line, and did
apt-get source some-package-name
in some directory where I want the source files to be stored.
This is documented on the debian wiki at
formatting link
I read very many responses to your query, but somehow they all seemed to miss this fact! (mumble mumble mumble) from what I've seen I'm not sure asking on the raspberry pi forums would a lot better - but I think you would have got one or two better answers.
Ok, this is a good start. I find bob@raspberrypi:~ $ more /etc/apt/sources.list deb
formatting link
buster main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src
formatting link
buster main contrib non-free rpi
but AIUI apt-get triggers a complete download/overwrite of whatever got downloaded before. That's likely to be wasteful, slow and hard on flash. Is there an option switch like CVS or subversion that fetches changes only?
I saw the references to portage and emerge on the gentoo site and didn't recognize what they did. Alas, Raspbian does not seem to offer them:
bob@raspberrypi:~ $ sudo apt-get install portage [sudo] password for bob: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package portage bob@raspberrypi:~ $ sudo apt-get install emerge Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package emerge bob@raspberrypi:~ $
Might they reside under another name?
It does appear that raspberrypi.org offers the sources, including encumbered binaries. Paraphrasing a question asked elsewhere, can apt-get (or something else) update in a granular way like subversion or CVS? It seems wasteful to overwrite lots of files to fix a typo.
Try using 'less' instead of 'more'. 'more' does more or less (geddit?) the same job but is nicer to use and can do more useful things, such as starting a new shell over its top or spawning the editor defined by $EDITOR editor so it shows the text that 'less' was displaying. 'exit' the shell or the editor and you're back in 'less', positioned where you left it.
That's what I'd expect, but obligatory warning: I know RH Fedora's 'dnf' a lot better than I know Debian's 'apt'.
Well yes, I use buildroot running on bigiron Linux machines to cross-compile for customer platforms. But you should be able to set it to run on a Pi for a Pi. I haven't tried it but it should be just a case of setting the cross-compiler to be the installed gcc on the Pi.
It takes a while on a 48core Xeon with 256G of ram so I'm not sure how that will work out even on a Pi4. You'd certainly want something better than an SDcard for storage!
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.