Comment by cyberax

Comment by cyberax 7 days ago

3 replies

There are some advantages to Arduino. Like <100ms boot times, you can go from power on to running within a blink of an eye.

This _is_ possible with Linux, but not at all trivial and likely impossible with general-purpose distros.

Interrupt handling and (on RP2040) dedicated multicore code is also nice.

arjvik 7 days ago

Curious - how does one achieve this in Linux?

I assume initramfs-only with special purpose pid0 and only the modules needed statically compiled into the kernel?

What else would it take?

  • cyberax 6 days ago

    The main slowdowns will likely come from device initialization and the bootloader.

    Bootloaders need to initialize most of the devices and load the kernel image. Then they hand the control over to Linux which proceeds to re-init these devices again.

    The userspace matters, but on recent computers it doesn't matter that much. You can get to sub-40ms with https://katacontainers.io/ That's a project that uses full VMs to run Docker images boot instead of kernel namespacing.

mrheosuper 6 days ago

100ms boottime is very high, in theory they should have near instant boottime(placing application code right at reset vector)