Booting from SSD

Hello all

I cannot put my Rock 5A in Maskrom however I already can booting from SSD. This is what i did

NOTE: The SSD already must have the OS installed, here is how to do it (you can do it using an USB adapter to the SSD or booting first from microSD )

  1. Booting using MicroSD (I used the oficial version ) and here you can see how to install de OS in a µSD
  2. Open the terminar (CLI) and enable SPI Flash

rsetup

  1. Select “Overlays” (is a warning appers, press enter on “yes”
  2. Then, select “Manage overlays
  3. Press the space bar in your keyboard on “Enable SPI Flash” must be near of Enable SATA0
  4. Press enter and enter again on “OK
  5. Press “esc” key up to exit of rsetup
  6. Reboot your Rock 5A
  7. Open a CLI again and type lsblk now you should see “mtdblock” in the output
  8. Download the SPI clearing file and the ROCK 5A SPI U-Boot image (bootloader)
  9. Extract/uncompress the previous downloaded SPI clearing file and check the integrity of the file (gzip should already be installed otherwise install it):

gzip -d zero.img.gz
md5sum zero.img

it should report back:

2c7ab85a893283e98c931e9511add182 zero.img

  1. Make sure the spi flash is available:

ls /dev/mtdblock*

it should report back:

/dev/mtdblock0

  1. Completely clear the spi flash: (be patient the flash can take 5mins)

sudo dd if=zero.img of=/dev/mtdblock0

  1. Check if the flash was successfully cleared

sudo md5sum /dev/mtdblock0 zero.img

the result should look exactly like this:

2c7ab85a893283e98c931e9511add182 /dev/mtdblock0 2c7ab85a893283e98c931e9511add182 zero.img

  1. Write you desired bootloader to the spi flash *(replace spi-image.img with the name of your downloaded image, should be starts like rock-5a-spi) and just to confirm that all has been written type sync

sudo dd if=spi-image.img of=/dev/mtdblock0
sync

  1. Check if the flash was successfully (replace spi-image.img with the name of your downloaded image again):

sudo md5sum /dev/mtdblock0 spi-image.img

the checksums should be the same again - if not flash the bootloader again .

  1. Shutdown your Rock 5A, remove the microSD card and start it again. Now it must boot from the SSD

Bootloader taken from here (at the end)
Steps to flash the SPI from here