Booting Kirkwood NASes directly from disk (was:Synology DS211j boot support)

Just something to steer the pot. Barebox has support for some kirkwood boards and has very neat feature compared to U-Boot, it can be chainloaded. Pack it to uImage (if that's what Synology wants to boot) and put it in place of the kernel. Could be easily adjusted to boot from all the mediums You want and will leave the original bootloader intact. Don't know how many drivers are in Barebox for kirkwood, since I only tried imx27 and ar9331, but should be worth to consider as an option.

Makes sense - do you know of some existing Barebox recipe for OpenWrt or Buildroot? OTOH I've seen chainloaded U-boot somewhere, so maybe it'll be enough.

I don't know any recipe for OpenWrt, buildroot has it under "Bootloaders" option.
Regarding U-Boot chainload, I'm not aware of any option which would enable that (Caraboot has it, but that's only for MIPS). Last time I searched for that, it was said that's not supported or You'll need to hack around. Anyway if You accomplish it, the bootcmd would definitely need an adjustment, while with barebox none of that would be needed, so that's at least, one step less in installation instruction.

IMO generic should stay. If You think about SD, SATA, etc.. Maybe 'non-mtd'?

Sorry for my late reply. I rarely check the forum posts...

Yeah, adding a new subtarget sounds more feasible. Options might include:

  1. Create sata subtarget and add support there for devices that boot from disk.
  2. Create tiny subtarget, move devices with "small" flash from generic to tiny, and enable SATA and USB in generic.

Some thoughts:

  • Asking to be sure, if we create an ext4 image then it could be installed on both HDD, USB, or SD, right?

  • I don't have a clear view on the subtarget names yet.

    • "nand": NAS1 boots from 16MB NOR flash
    • "disk", "sata": not that inclusive term
    • "mtd", "drive": not too sure

    For now my first pick is ("nand", "sata") like apm821xx target.

  • Perhaps we can support both ways of installation for one device, i.e. flash image in nand subtarget and disk image in sata subtarget...

This is interesting option. Tiny target could be copy of recent generic config. After move tiny devices to new subtarget, we can boot features in generic. Most devices have custom u-boot (or u-boot envs), so it can be adjustable in future.

Yes. But the best way, is combined image. Pure ext4 (or f2fs) images don't suport some features, e.g. firstboot.

Your "tiny subtarget" sound most interesting for me at this moment.
What do You think?

Fully agree, I think the tiny subtarget is the way to go, and making combined images for disk-based devices was my first idea anyway - just as used on x86 and imx.
With configurable U-boot environment we could implement booting of same image type from either SATA or USB dynamically, and even have automatic fallback to TFTP recovery, shall that fail for any reason.

1 Like

I'm trying to customize the Seagate Blackarmor NAS220 kernel for use on the Lacie NS2. So far I've managed to run it well, but I'm finding it difficult to deploy the sysupgrade, as the target is mtd and not the sata drive by default, I have to change that. Thanks for the tips.

By Lacie NS2 are you referring to the Lacie Network Space v2? If so there is already support in mainline kernel for this device. See There also appear to be mainline U-Boot source available at

1 Like