Code: Select all
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install lzop
cd ~
git clone https://github.com/avian2/barebox.git
cd barebox
export ARCH=arm
make rpi_defconfig
make -j1
sudo cp images/barebox-raspberry-pi-3.img /boot/barebox.img
Those were my exact thoughts. Looks like a reasonably comprehensive 'bootable bare metal C' implementation which could be leveraged for other things. I had some fun building Windows PE set-ups back in the day and this looks similar for Linux.
Needing the serial console is why I haven't tried booting it yet. There's some docs here which may help -
Odd. Under 3 minutes for me on my 3B (non-plus), with the previous deleted and starting over again with cloning from .git
"Sort of" was how it felt to me. Not sure if just enabling framebuffer / console framebuffer is enough to get a USB keyboard + HDMI console working.
I just copied your instructions, hit return just as I realized I had 4 cores - make -j4make -j1
I have been bitten by "-j4" induced make failures in the past so have got into the habit of substituting with "-j1" which solved it back then. "make -j1" is the under 3 minute compilation I'm getting.
Thanks, that's very interesting, more learning- tomorrowIf you add "rescueshell" to recovery.cmdline in noobs or pinn, it will dump you straight to a command shell (ash) to play about in.
Add "ssh" to pinn and you can remote into it as well.
I'm no linux expert so it was mostly a case of 'if you don't know what you're doing; stick with what you know works'. When -j4 created problems I used -j1 to force single job and it worked so stuck with that. The document I read was not clear on what leaving -j out did. With hindsight, having read 'man make', I think it was a lack of clarity in that document over leaving -j out or just the number after -j out.
For interest, I think make was around for decades before multi-core CPU's and the -j option.hippy wrote: ↑Sun May 19, 2019 1:43 pmI'm no linux expert so it was mostly a case of 'if you don't know what you're doing; stick with what you know works'. When -j4 created problems I used -j1 to force single job and it worked so stuck with that. The document I read was not clear on what leaving -j out did. With hindsight, having read 'man make', I think it was a lack of clarity in that document over leaving -j out or just the number after -j out.
Pass. The problem with buildroot seems more that it seems an awful lot of work to use it. I guess that's easier after the first time, and I'm going by Cristophe's guide rather than having actually done it -
I would say so given that appears to be its intended purpose and one can boot stock Buster from within barebox. That's a more convoluted set of commands than I'd like but I am sure it could be turned into something more user friendly -
Code: Select all
global linux.bootargs.vc="$global.vc.bootargs"
bootm -o /vc.dtb /boot/kernel7.img
I assume you mean how fast is it to build a system from buildroot?
Code: Select all
Model: Pi4 Pi3B+ Pi3B Pi2B
Time(h:m:s): 03:34:10 06:04:23 07:00:05 11:50:44
Why re-invent the wheel when you can just use PINN which is already designed to do this? Including backup/restore of each OS, password recovery, fsck etc. PINN supports up to 63 partitions and already works on the Pi4.
Thank, I don't use Noobs or PINN so did not know how they work.Why re-invent the wheel when you can just use PINN which is already designed to do this? Including backup/restore of each OS, password recovery, fsck etc. PINN supports up to 63 partitions and already works on the Pi4.
My verbatim notes from last time I did it on a 3B -
Code: Select all
sudo apt-get install bison flex lzop
cd ~
git clone https://github.com/avian2/barebox.git
cd barebox
export KBUILD_OUTPUT=./build
export ARCH=arm
make rpi_defconfig
make menuconfig # optional
make
sudo cp ./build/images/barebox-raspberry-pi-3.img /boot/barebox.img
Code: Select all
sudo nano /boot/config.txt
kernel=barebox.img
enable_uart=1
sudo reboot