PINE64
boot priority - has precedence changed? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: General Discussion on ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=86)
+--- Thread: boot priority - has precedence changed? (/showthread.php?tid=6566)



boot priority - has precedence changed? - jovval - 09-21-2018

How to install and boot ROCK64 from eMMC? - https://forum.pine64.org/showthread.php?tid=4713
    shows
boot priority:
eMMC--> SPI flash-->  SD card

But, with both eMMC and microSD installed, I am seeing my Rock64 boot to microSD. How can this be?

1. Has the priority of the devices changed generally for the Rock64, or is it just my unit?
2. Does one of the devices boot directly, i.e. not use/require the SPI flash?
3. I found the following.
    Flashing and Erasing the SPI - https://github.com/ayufan-rock64/linux-build/blob/master/recipes/flash-spi.md
Traditionally, booting Linux on the ROCK64 required an eMMC or microSD card, however it is now possible to boot without those, assuming the SPI memory has been flashed. The ROCK64 contains an onboard 128Mbit SPI flash memory, which can be flashed with U-Boot in order to provide additional boot options:
    USB2 / USB3 drive
    PXE
    microSD
    eMMC
Boot order:
  1. SPI flash
  2. eMMC (disable with jumper)
  3. microSD
  4. USB drive
  5. PXE
This suggests that SPI must come first.
Can anyone comfirm the functioning of this u-boot?
Could someone point me to a pertinent thread for this u-boot?

4. How may I restore the original SPI flash?


RE: boot priority - has precedence changed? - mcerveny - 09-22-2018

You are mixing many "boot" phases.

  1. Bootrom phase booting order is "eMMC, SPI Nor Flash, SDMMC card, USB OTG". See RK3328TRM page 14 and can be "changed" only by killing device (like installing jumper that force GND to eMMCCLK signal).
    Bootrom phase search valid "ID magic" and load/run sequentially DDR.bin,TPL.bin, SPL.bin and U-Boot.bin binaries.
  2. U-Boot phase order is determined by "bootcmd" script that uses "boot_targets" variable with "mmc0 mmc1 usb0 pxe dhcp" (mmc# can be SDCARD or eMMC it depends on dts for u-boot). eMMC can still be killed by jumper.
  3. Kernel phase chooses kernel from extlinux.conf (now on root ext4 /boot/extlinux/extlinux.conf and NOT on efi partition /extlinux/extlinux.conf).

So check, change and save U-Boot variable "boot_targets" to change order for U-Boot phase in your U-Boot variables from chosen from Bootrom phase (eMMC in your case).
Default SPI flash is empty.