Banana Pi R2 Pro Firmware Install
Caption
The Banana Pi R2 Pro is a powerful smart router development board that comes with gigabit network, an M.2 key-E and mini PCIe interface, 2 MIPI DSI interfaces (one can change to LVDS by software), 1 CSI camera interface, 1 HDMI output, and a SATA port. It's an ideal choice for those looking to create network device solutions tailored to their specific needs.
Although the Banana Pi hardware offers great value for money and has readily available firmware that's regularly updated, their documentation can be challenging to follow, especially for someone new to IoT devices and Linux. In this post, we'll explain how to flash the firmware onto the onboard EMMC module of the R2 Pro.
There are several images available to flash on the R2 Pro, including Ubuntu 22.04, Android 12, and OpenWrt. However, some images may not enable all hardware features. For example, the OpenWrt image doesn't enable HDMI, so you'll be left staring at a blank screen wondering if the installation worked. Make sure to use the latest images available on the Banana Pi R2 Pro wiki.
In addition, although links to the images can be found on the Banana Pi Wiki they may link to older images. There have been cases in the past where images are broken too, so if you don't succeed in flashing a particular image try another. By the time you read this, the images would have been updated but the official place for image links is the Banana Pi R2 Pro wiki.
The images we commonly use are:
There are two ways to flash the image according to the Banana Pi wiki.
In this post, we'll describe the installation process using USB installation via Maskrom mode, a special operation mode for the CPU to wait for the USB OTG port command. Banana Pi provides a customized tool to flash the image to the device once it's in Maskrom mode. We'll explain how to do this in Linux. In Windows, you can use GUI tools to flash the device rather than the command line. The steps to get the R2 Pro into Maskrom mode and how to complete the installation after the initial installation onto the EMMC are the same so this post should be helpful even if you not using Linux. (You really should you know)
We are going to use the maskrom mode method to deploy to the emmc module. This means we need to:
Download an image from the wiki. We will be using the SDCard image so download the file with "SDBoot" in its name. Unzip it. It should contain a file called "update.img". This file seems to be a single binary containing all the images required to install the operating system. The file with "EMMCBoot" in its name is an exploded version of this file, as far as I can tell. I couldn't find out how to deploy the "EMMCBoot" image with Linux but one can with Windows using yet another GUI tool. Make sure you have the "update.img" file in a path you can find for deployment.
Tip: In Linux, it is best to use the command line to unzip "unzip <filename>". I have found the GUI unzip option has resulted in a corrupted image in the past.
First, download the Linux USB tool. Then as per the wiki.
$ unzip Linux_Upgrade_Tool_xxxx.zip $ cd Linux_UpgradeTool_xxxx $ sudo mv upgrade_tool /usr/local/bin $ sudo chown root:root /usr/local/bin/upgrade_tool $ sudo chmod a+x /usr/local/bin/upgrade_tool
To put the R2 Pro into Maskrom mode hold down the "maskroom" button and push the reset button. (Note the misspelling of maskrom) Release the reset button and then release the "maskroom" button. If. from the PC you are deploying form, you do a
"tail -f /var/log/syslog"
you should see a new USB device being discovered when you release the "maskroom" button. Alternatively, run "upgrade_tool ld" (ld = list devices). It should detect the Rockchip USB device. If it says "No devices found" then you need to redo the steps to set the R2 Pro into maskrom mode. If it lists the Rockchip USB device you are good to go.
Now that you have the R2 Pro in maskrom mode and downloaded the image you can deploy to the EMMC module. This step is Linux specific. For Windows please use the tool as per the Banana Pi wiki. To begin the download execute:
upgrade_tool uf <path_to/update.img>
This will download the image to the EMMC module.
You can ignore this error as the image has been successfully deployed.
You now need to reboot the R2 Pro. If you have had the serial output running you will see that you have been dumped to the command line or, in the case of the OpenWRT image, you will see the network has been successfully initialised and you will not have access to the cli. You can reboot at this point. If you don't have access to the serial output reboot once the "upgrade_tool" app has exited. It's simplest to do this with the reset button.
When you have the serial console output you can see it booting. Otherwise you just have to wait for it to reboot and initialise. It will take a minute or two but not longer than 10 minutes to come up.
In the case of the Linux image you will eventually get a GUI login. The username password is pi/banana pi. For the Android image you will have access to the Android GUI. For the OpenWRT image you will have no GUI access via the HDMI output. You will need to open a web browser and access the IP address of the network port you have plugged into the R2 Pro or use ssh. The default username/password is "root/123456"
If you don't know the IP address assigned to the R2 Pro then run
nmap -sn <ip network address/24>
Examine the output to determine the assigned IP address. (You may need to install nmap with "sudo apt get install nmap". I my network I had to run "namp -sn 10.0.0.0/24".
Congratulations. You have installed the image to the Banan Pi R2 Pro. If it hasn't worked for you check the following: