Helios4 NAS Bring-up

I recently got a Helios4 to replace my old NAS. It’s a cute little board around Armada 388 SoC. My previous NAS was a NSA320 which was also based on Armada SoC (SoC 380). This should be a decent upgrade for the NAS, which is pretty much idling and serving little data really :)

I wanted to keep my old setup which was essentially:

  • U-Boot bootloader on Flash
  • Debian/Ubuntu on one of the driver (/boot and kernel on disk)
  • No USB devices (ports free for devices), no SD card (reliability)

Boot modes

The Helios4 supports (in theory :D) booting from flash (connected via SPI), USB and SATA. While this is the theory I wasn’t able to boot via SATA. I suspect the bootloader (u-boot) must be placed in some particular location and perhaps with some particular format. Trying to boot from SATA will give some errors from the BootROM via UART. So how do we fix this?

The first step is to follow the official guide and boot from SD Card, to do that just download an Armbian image and flash it to the SD card, then boot it in the Helios4 and follow the Armbian “Setup Wizard”. Once you get a shell you might follow the Official Guide to boot from SPI flashwhich essentially consists in adding spi_workaround=on to the /boot/armbianEnv.txt file, running sudo nand-sata-install and reverting the SPI env change. That will flash U-boot to the SPI image. Now proceed to prepare the SATA drive with an Armbian image (like we did with the SD card).

At this point I thought I was more or less done, but no :D It won’t boot from the SPI properly. Actually it will load U-boot from the flash and run it, but U-Boot will fail to boot the kernel. After some digging I came to this commands that will boot the kernel from the disk (here it assumes it is /dev/sda1, ensure the disk is connected to the SATA1 port).

Run this:

setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootwait rootfstype=ext4 ubootdev=scsi scandelay loglevel=1"setenv bootcmd_sata "scsi reset; scsi scan; load scsi 0:1 0x2040000 /boot/dtb/armada-388-helios4.dtb; load scsi 0:1 0x2880000 /boot/uInitrd; load scsi 0:1 0x2080000 /boot/zImage; bootz 0x2080000 0x2880000 0x2040000;"

and finally run bootcmd_sata. That will boot linux using /dev/sda1 as root partition. We did it! Now to make this permanent run the two setenvs and also setenv bootcmd "run bootcmd_sata". Your env should be ready to go, so save it using savenev which will write the environment to the flash. On the next boot no intervention will be required to boot from SATA.