BPI-R2 Pro EMMC Boot Loader Problem

Hello , I have a Banana Pi R2 Pro right now, I installed Rockchip USB driver and Rockchip USB Download Tool as described in this link ( Getting Started with R2PRO - Banana Pi Wiki ) . My device showed up as MASKROM in RKDevTool. Then I tried to install the debian version in this link ( Debian-10 - Google Drive ). However, I couldn’t load it. Can you help me how to install it? Have a good day.

With kind regards…

Did you ever figure out what was wrong? I know it’s a long time ago, but I’m trying to do the same here and I’m also not successful on loading the firmware.

I suspect there are things which the pro’s know, but that are not explicitly stated?

A BPI-R4 Pro fresh from the factore does nothing visible when it’s turned on, except for a red power light that comes on. What does one do then?

I suspect one has to install a bootloader of some kind and then an OS.

I’d like install Armbian 24.04, but when I try to load the .img I get an error “Loading firmware failed,err=-4!”.

Some noob pointers would be great at this stage.

You do not need propritary rktools. My images can directly flashed to sdcard.

But rk boards prefer emmc over sdcard,so if emmc contains bootloader (or its header) it will not try sdcard. Here you must use maskrom button to disable emmc till uboot is loaded.

But i stopped r2pro development some time ago,so i hope automatic generated images still work.

I need to understand this: To be able to boot the emmc contains a bootloader. This bootloader does not wokr properly (I read somewhere), correct? So it needs to be replaced with something. How does one do that? I haven’t found a page that describes this. Most pages are just windows, windows, windows. I use Linux, so they are not helpful.

Also, to be able to use an SDCard, I need an adaptor installed in the .mini PCIe slot, correct? Can I just use the eMMC to boot an OS, or is that to small? (16GB)

Why? I have not read something like this…

For booting up sdcard you find the above information also in my wiki…there not much for windows :slight_smile:

https://wiki.fw-web.de/doku.php?id=en:bpi-r2pro:start#software

Afair you can use sdcard image for emmc too,but you have to change partition and root in uboot and / in linux fstab to match emmc. Afair i’ve done done some detection in uboot env,so you may need only linux change

Image Size fits a 8gb emmc,so this is no problem…but try adcard boot first

My word! On these pictures I now saw for the first time that there’s an SD Card slot on underneath the main board! I will now load an image on a card and test it.

Seems bpi only mentioned the propritary rktools in the wiki and has no pictures like i did in their wiki.

Hope my image is not broken :slight_smile: else please report here with log. I switched from extlinux way to builtin env (like mtk router boards) some time ago. There were my last tests.

And yes there is a sd/emmc detection in builtin env for r2pro which is called before menu is shown (via reloadmenu which is called in autoboot=bootcmd when not canceled)

I’ve been hacking around with the knowledge I have to date, but success eludes me.

Do I understand this correctly:

  1. The R2 Pro board has firmware that doesn’t boot the device when shipped
  2. This firmware needs to be updated
  3. This differs from the installation of an OS on R2 Pro

Is that correct?

If so, which firmware upgrade should be installed? I have made several attempts to locate this and load in onto the SD card, but it doesn’t work / nothing happens when I try to boot the R2 Pro.

I don’t think you can upgrade the firmware already on board. You have to install new one. What happens when try to boot my image? Have vou connected the uart via the micro-usb? That shows boot process. Have you a linux-pc or windows to connect to uart?

Which of the files in your drive is the actually image I need to write to the SD card?

They all seem pretty small…?

You are in the wrong folder…you have to use the automatic images repo…

Here are some information:

https://wiki.fw-web.de/doku.php?id=en:bpi-r4:start#debian_ubuntu_image_building

And pick one of the r2pro images.

edit: r2pro seems broken in my automatic images sorry…need to look where the problem is

looks like second stage uboot does not work

U-Boot SPL 2024.10-bpi (Nov 03 2024 - 09:45:47 +0000)                                                                                               
Trying to boot from MMC2                                                                                                                            
## Checking hash(es) for config config-1 ... OK                                                                                                     
## Checking hash(es) for Image atf-1 ... sha256+ OK                                                                                                 
## Checking hash(es) for Image u-boot ... sha256 error!                                                                                             
Bad hash value for 'hash' hash node in 'u-boot' image node                                                                                          
spl_load_simple_fit: can't load image loadables index 0 (ret = -1)                                                                                  
mmc_load_image_raw_sector: mmc block read error                                                                                                     
Trying to boot from MMC2                                                                                                                            
## Checking hash(es) for config config-1 ... OK                                                                                                     
## Checking hash(es) for Image atf-1 ... sha256+ OK                                                                                                 
## Checking hash(es) for Image u-boot ... sha256 error!                                                                                             
Bad hash value for 'hash' hash node in 'u-boot' image node                                                                                          
spl_load_simple_fit: can't load image loadables index 0 (ret = -1)                                                                                  
mmc_load_image_raw_sector: mmc block read error                                                                                                     
Trying to boot from MMC1                                                                                                                            
mmc_load_image_raw_sector: mmc block read error                                                                                                     
SPL: failed to boot from all boot devices                                                                                                           
### ERROR ### Please RESET the board ###

manually fixed the issue (reinstall uboot binary), need to find location in my buildchain to fix automatic build…base createimg looks right (u-boot-rockchip.bin to 32k = block 64), also run createimg locally and reflashed first 1M of my card…still working. Pipeline creating the image was without error…so really strange.

just started new image building-process…new image bpi-r2pro_bookworm_6.12.7-main.img.gz does not have boot issue…so not reproducable

gunzip -c bpi-r2pro_bookworm_6.12.7-main.img.gz | sudo dd bs=1M status=progress conv=notrunc,fsync of=/dev/sdX

How do I see the debug output in Linux when using a micro-USB cable as shown here?

I do not detect a serial port with dmesg.

$ sudo dmesg | egrep -i --color 'serial|ttyS'
[194283.899781] usb 2-1.5: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[194283.899787] usb 2-1.5: SerialNumber: 000000000039
[198385.752789] usb 2-1.5: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[198385.752799] usb 2-1.5: SerialNumber: 000000000039

Also, this is all I get from lsusb:

$ sudo lsusb -v | grep "Bus 0"
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 062a:4c01 MosArt Semiconductor Corp. 2,4Ghz Wireless Transceiver [for Delux M618 Plus Wireless Vertical Mouse]
Bus 001 Device 004: ID 413c:2003 Dell Computer Corp. Keyboard SK-8115
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Reading this wiki page it seems I have a problem with my usb cable?

Please help if you know what to do.

I also use a simple microUSB cable (but maybe you have a charge-only cable)…you should see a ttyUSBx as ch341

[ 7200.025767] usb 1-1: new full-speed USB device number 7 using xhci_hcd
[ 7200.153618] usb 1-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice=80.33
[ 7200.153624] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 7200.153626] usb 1-1: Product: USB Serial
[ 7200.156107] ch341 1-1:1.0: ch341-uart converter detected
[ 7200.156545] usb 1-1: ch341-uart converter now attached to ttyUSB4
Bus 001 Device 007: ID 1a86:7523 QinHeng Electronics CH340 serial converter

important for r2pro is that you need to set the baudrate to 1.5Mbaud

minicom -D /dev/ttyUSB4 -b 1500000

Yeah, the problem was the cable. I found another cable and now I have /dev/ttyUSB0 Bus 002 Device 060: ID 1a86:7523 QinHeng Electronics CH340 serial converter

I’ve done picocom -b 1500000 /dev/ttyUSB0 and I get a connection, but no output when I turned the BPI on, if I press reset, or do anything. It’s as if the unit is totally dead.

I also tried minicom -D /dev/ttyUSB0 -b 1500000 and no console output at all, except for the minicom menu.

I tried holding in the MASKROM button while turning the BPI on, but still no output.

You also write in your pages: if emmc is bootable, it will be booted first, sdcard boot is only possible when pressing sw1 while poweron (till bl2 is shown). Which one is sw1 and what is bl2?

Is sdcard locked (completely inserted)? Do you have only 1 ttyUSB? Not sure what offline means,i guess only for modem mode related,so imho you can ignore this

sw1 should be maskrom button

No power-led? Bl2 is second stage bootloader…first part on sdcard

Yes, the card is completely inserted and locked. Ok, sw1 is Maskrom, I’ve got that.

The power LED comes on (red). If I press “reset”, then all the ehternet port led’s flash briefly.

Here’s what gparted shows is on my SDcard

Here are all my usb ports.

$ sudo lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 062a:4c01 MosArt Semiconductor Corp. 2,4Ghz Wireless Transceiver [for Delux M618 Plus Wireless Vertical Mouse]
Bus 001 Device 004: ID 413c:2003 Dell Computer Corp. Keyboard SK-8115
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 061: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 002 Device 062: ID 8564:4000 Transcend Information, Inc. microSD/SD/CF UHS-II Card Reader [RDF8, RDF9]
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

I deleted all the partitions from the SDcard and redid the dd and now the image boots! Yay!

1 Like

Now the next step would be to install Ubuntu (which is the image I use) to the EMMC. Is there a guide for this somewhere?

Afair i’ve wrote no step-by-step guide,but basicly you can simply dd the sdcard image to emmc and it should boot. Only need to change fstab to use the right device for rootfs. Afair no bootloader change is needed (no bl2 to boot0 or different uboot as i have a detection in uboot which chooses emmc when sd is not accessable).