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
  boot hdd usb3 philipe 1 653 01-27-2021, 02:12 PM
Last Post: tllim
  Libreelec Rock64 - 4GB no boot spiker15 3 1,525 11-02-2020, 12:36 AM
Last Post: wilsonYan
  Rock64 - boot helpmerock 2 1,257 10-08-2020, 01:29 PM
Last Post: helpmerock
  No boot up after power on Whoopsadaisy 4 2,255 09-26-2020, 05:14 PM
Last Post: simonsouth
Bug u-boot (forks) status mcerveny 14 7,457 08-27-2020, 01:44 PM
Last Post: globaltree
Sad No boot, garbage console text and blinking red light ... jean_bruder 2 1,494 07-19-2020, 08:37 AM
Last Post: jean_bruder
  Graphical boot manager john3voltas 0 739 03-25-2020, 02:27 PM
Last Post: john3voltas
  doesn't boot, no video cjyar 7 2,889 11-15-2019, 03:45 PM
Last Post: ab1jx
  Unable to boot from SPI stevefan1999 4 2,561 05-01-2019, 04:47 PM
Last Post: rhens1
  No Boot, Red Green and White flash at 1 sec intervals wesleykonrad 2 1,713 01-28-2019, 11:54 PM
Last Post: wesleykonrad

Forum Jump:


Users browsing this thread: 1 Guest(s)