Some questions about boot process

I’ve read some stuff here about booting RTD1296 and have several questions, that can be divided into 2 main topic:

  1. How RTD1296 boots when sw4 is in position 1 aka “boot from SD card with eMMC fallback”

    1.1. In many instrurtions/topics there are references to SPI flash which is some kind of first stage bootloader whose aim is to find location of second stage bootloader (U-Boot in our case) on SD card (or on eMMC as fallback). Is it correct?

    1.2. Is there source code of firmware flashed into SPI flash or at least description of algorithm used to find second stage bootloader aka U-Boot on SD card and eMMC?

    1.3. This SPI flash - is it part of RTD1296 or it is separate chip? What size of this memory?

    1.4. Near the sw4 there is USB button. What hapens when I power on bananpi w2 with sw4 in position 1 and USB button pressed? How it affect first stage bootloader in SPI flash?

    1.5 How can I update firmware on this SPI flash? What options I have? Maybe SPI flash available from system booted on RTD1296? Or through some pins on 40-pin header?

  2. How RTD1296 boots when sw4 is in position 0 aka “boot from eMMC”

    2.1. It seems that in this case cortex core executes code directly from somewhere on eMMC and code from SPI flash firmware doesn’t executes. Is it correct?

    2.2. If SPI flash firmware code doesn’t executes, where is first stage bootloader? Is the code same as SPI flash firmware?

    2.3. What happens when I power on bananpi w2 with sw4 in position 0 and USB button pressed?

    2.4. When I boot system from SD card I can see some mmcblk devices using lsblk command:

    root@bpi-iot-ros-ai:~# lsblk
    NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    mmcblk1      179:0    0  7.3G  0 disk
    `-mmcblk1p1  179:1    0   16M  0 part
    mmcblk1boot0 179:8    0    4M  1 disk
    mmcblk1boot1 179:16   0    4M  1 disk
    mmcblk1rpmb  179:24   0  512K  0 disk
    mmcblk0      179:32   0 59.5G  0 disk
    |-mmcblk0p1  179:33   0  256M  0 part
    `-mmcblk0p2  179:34   0  6.8G  0 part /
    

    mmcblk0 is SD card I’m booted from mmcblk1 it seems is eMMC (according to size), but what is mmcblk1boot0, mmcblk1boot1, mmcblk1rpmb?

    2.5. Is it possible to access eMMC content without booting RTD1296?

If someone knows how to answer at least 1 question it would really help everyone else here.

  1. spi flash is just a normal 128Mbits nor flash, for linux image, it’s the first boot stage for both sd and emmc image, and load u-boot from the seek=2k position of sd/emmc.

  2. becase chip rom doesn’t support boot from SD, so SW4 is used for swich the boot priority of nor flash and emmc, so that sd linux image can boot at first.

  3. spi firmware is rtk non-opensource code, and binary flashed in factory.

  4. android image only support boot from emmc , so you must switch sw4 to emmc boot.

  5. usb button is force rom boot from usb to connect usb download tool for flashing android image.

  6. about mmcblk1boot0 , mmcblk1boot1 , mmcblk1rpmb, please google emmc partition.

1 Like

That’s strange since in instructions about bootable SD card there is no mention about U-Boot on SD card, only about U-Boot that should be flashed “into board” (probably somewhere in eMMC?). Either your explanation or this instructions is incorrect/incomplete.

that link was a very complex way and obsolete.

1 Like