I am developing a custom Beaglebone image which I want to deploy on to many other Beaglebones. The easiest way of doing that is using the beaglebone-black-make-microSD-flasher-from-eMMC.sh script provided with every Beaglebone.
That has also worked fine so far until I started deleting /boot/initrd.img-4.19.94-ti-r*.
I need my Beaglebone to boot as fast as possible and I have found out, that by removing the initrd.img-4.19.94-ti-r* file, the boot time is reduced by over 10 seconds. @RobertCNelson has also stated, that this file is not necessarily needed (If I understood that correctly)
Because the shell script creating the micro sd flasher also creates the initrd file, I have written a script, that removes the file if it is present.
But now if I flash a SD card with my image, the first beaglebone I want to overwrite, is flashed successfully. But the second one, won’t flash anymore. (Error: We don’t know how to reset the leds as we are not a BBB compatible device)
Why does the script think, that it isn’t a Beaglebone anymore?
Why does it work the first time, but fail the times after? The micro SD shouln’t be edited, when flashing a Beaglebone or am I wrong? I am confused.
For a project a few years ago my colleagues in the UK couldn’t get the boot time lower than about 16 seconds IIRC. We needed the Hydrogen powered vehicle CAN messages from the moment the ignition key applied power to the system. So I designed a PIC32 to read, timestamp, store and then upload to the PiZeroW when it was finally awake. Included in the messages to the Pi were also GPS which gave the Pi the correct TOD.
In the photo below the PIC32 is underneath the PizeroW. Beside it Cell Modem and GPS.
6
My Panasonic BlueRay Player also runs with Linux under the covers. Very annoying to power it up and have to wait almost 20 seconds before it responds to the drawer open button.
Another user pointed out haveged is no longer reguired on v5.6.x kernel’s, we originally installed this service back in v4.14.x when the crng kernel generation got massivily slowed down, which haveged fixed…
So in Bullseye, with v5.6.+ kernels, just nuke haveaged: then userspace bootup gains another 10 seconds:
root@BeagleBone:~# uname -r
5.10.65-ti-r23
Pre:
root@BeagleBone:~# systemd-analyze
Startup finished in 14.926s (kernel) + 30.569s (userspace) = 45.496s
graphical.target reached after 30.157s in userspace
Post:
root@BeagleBone:~# systemd-analyze
Startup finished in 14.960s (kernel) + 19.538s (userspace) = 34.498s
graphical.target reached after 19.243s in userspace