u-boot on SPI: USB boot partition
#1
I have read that it is possible to flash u-boot to the SPI flash to have more choice on boot devices. I have also seen a tutorial in the wiki mentioning it. But what I could not find is a detailed description of what is actually going on when u-boot is starting:

* does it look for a certain device type or are all USB mass storage or UBS/SATA bridges supported?
* does it look for a certain position in the USB bus, for example always the first USB storage found anywhere or always only the first port on the first hub?
* does it search all devices and look for a partition with a certain label?

I cannot seem to find any documentation about this u-boot configuration, also generally I cannot find much documentation about the boot process of the Rock64,  for example if the SPI flash is erased, what does it look for if it comes out of reset, is there always a fixed minimal loader in mask ROM somewhere and is it documented? Is it possible to accidentally brick the device?

It would be nice if someone could give a detailed description of the boot process, please describe it as detailed and low level as possible, target audience for this description would be an embedded (cortex M0 and M4) bare metal programmer who has no fear of beginnig to learn about the low level stuff going on during initialization and boot  in the larger ARM processors.

Thank you.
#2
It is a bit different for every ARM SoC, but usually there is a boot ROM in the hardware that looks for a valid boot device (sdcard, emmc, spi-flash, nand...), then there is a second stage loader (SPL - from u-boot or other source) on the image that initializes DRAM and loads the ATF (ARM Trusted Firmware) and u-boot from the image, u-boot then usually does some more hardware initialization if necessary and then loads your devicetree, initrd, kernel from the image to boot whatever OS you have... how you structure the image wrt to firmware location and partition layout is dependent on the first stage boot ROM and how you configure u-boot as well as what your OS requires, the FAT partition is more a convenience thing for Windows users so they can access some config files, it is not strictly necessary...

You can find more details how RK3328 boot in the technical reference manual (http://opensource.rock-chips.com/images/...170321.pdf) and by looking at ayufan's github for the sources of u-boot, linux and the image build system, also the sources for the u-boot on the SPI flash: http://www.github.com/ayufan-rock64
Come have a chat in the Pine IRC channel >>


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 won't boot luminosity7 10 4,131 03-16-2024, 08:33 AM
Last Post: dmitrymyadzelets
  Rock64 doesn't boot dstallmo 1 334 03-16-2024, 08:29 AM
Last Post: dmitrymyadzelets
  Boot from SPI first mjnck 1 1,532 02-29-2024, 02:12 PM
Last Post: reukiodo
  ROCK64 v3 can it boot from USB? Tsagualsa 4 2,098 11-29-2022, 11:31 AM
Last Post: Macgyver
  Rock64 u-boot for eMMC Build Error mexicanflyer 0 1,059 09-18-2022, 02:29 PM
Last Post: mexicanflyer
  boot hdd usb3 philipe 1 2,651 01-27-2021, 02:12 PM
Last Post: tllim
  Libreelec Rock64 - 4GB no boot spiker15 3 4,570 11-02-2020, 12:36 AM
Last Post: wilsonYan
  Rock64 - boot helpmerock 2 3,541 10-08-2020, 01:29 PM
Last Post: helpmerock
  No boot up after power on Whoopsadaisy 4 5,655 09-26-2020, 05:14 PM
Last Post: simonsouth
Bug u-boot (forks) status mcerveny 14 15,372 08-27-2020, 01:44 PM
Last Post: globaltree

Forum Jump:


Users browsing this thread: 1 Guest(s)