I am writing an article about the NAS-542 "boot procedure"

Options
There are 2 bootloaders in the spi-flash - "u-boot" and "barebox". - But reading the article by John Bonesio - (Bootloaders for Embedded Linux Systems) - I read the following : ( https://thenewstack.io/bootloaders-for-embedded-linux-systems/ )

Other bootloaders :
"Barebox" is a derivative of "U-Boot". It has a lot of the same flexibility as U-Boot but strives to be more Linux-like. It uses a driver architecture similar to the Linux kernel and includes the use of an internal filesystem including device nodes in /dev.

So why 2 bootloaders for the same job ??
 Do I misunderstand some important secrets ? - Is there any explanation, with what code "u-boot" is loaded and with what command "barebox" is loaded ? When (in which script)  the Zyxel kernel is loaded ? I did not find the command-line or any reboot.
.

All Replies

  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    So why 2 bootloaders for the same job ??

    Are you sure the first bootloader is u-boot? The partition is called uloader, and as I never analyzed it, I simply presumed it is the barebox version of u-boot SPL.

    The PPL (Primary Program Loader in the SoC) is often not mature enough to load a complete u-boot (or barebox) in memory and execute it. Then the SPL (Secondary PL) is needed. The PPL loads the SPL, which is 'smart' enough to load the final bootloader and execute it.

    For u-boot that SPL is glued before the actual bootloader, and when you replace the bootloader the SPL has to be replaced as well. So it's neat when the SPL has it's own partition, and you can update the final bootloader separately.

    Except for the Comcerto 2000 I haven't seen barebox in the wild. The NAS5xx has it, and Synology has a NAS with the same SoC which also used barebox (414j?). WD also has a Comcerto based NAS (WD My Cloud), but I don't know which bootloader it uses. My guess is Mindspeed sold the SoC together with an SDK containing barebox. and further everybody stuck with u-boot. It is nice to have a bootloader capable to do complex tasks, but at the end of the day embedded boxes only need a reliable way to boot Linux.

    About the scripts inside barebox, I refer to several threads in this forum about bricked boxes after installing OMV.

Consumer Product Help Center