New BP4 - how to log in

Hi,

I got a BP4 today. I have not turned it on, yet.

I just put the board into the chassis and screwed it together. Nothing else.

I think it came with a version of Openwrt pre-installed.

Is there a default way to log in on one of the RJ45 ports that it has got?

So, I don’t know how they deliver the BPI-R4 now. But mine didn’t have anything pre-installed. I downloaded the snapshot version (you don’t need it any more because 24.10 officially supports the BPI-R4) and wrote it to an SD card. Then I connected an FTDI-USB 3V3 adapter to the board and connected via Putty. Boot from the SD card and then select point 7. This should write the image to the NAND. If you don’t want this, then you have to go another way. But there are enough instructions for this.

The NAND usually comes with an OpenWrt image preinstalled.

I think this is the best way to start learning how to use Banana Pi:

just flash an sdcard with a OS you want (mainline openwrt also supports bpi-r4)…i would not rely on the old bpi-OS (afair modified openwrt 21.x with kernel 5.4)

https://firmware-selector.openwrt.org/?version=24.10.0&target=mediatek%2Ffilogic&id=bananapi_bpi-r4

1 Like

I concluded that it wasn’t preinstalled because I could not get any activity off any of the NICs. No arps seen. Nothing.

I booted it off the SD card and got into the Luci interface :slight_smile:

but then it says of course that "system running in recovery (initramfs) mode).

I do not know what to do here. I know I have got to flash another specific image but I cannot tell what it wants, yet.

I know it has to flash to Nand to make it stay, but also I do not know how to tell it to flash to nand.

What is the image needed?

Download an image

EMMC-BL31-UBOOT.FIP

EMMC-PRELOADER.BIN

KERNEL

SDCARD.IMG.GZ

SNAND-BL31-UBOOT.FIP

SNAND-PRELOADER.BIN

SYSUPGRADE

… Boot from the SD card and then select point 7.

What point 7?

Where do you see the initramfs message?

Point 7 is most likely in uboot seen on the debug-uart

1 Like

In Luci in the screenshot.

Not sure why luci says it runs in initramfs. Afaik recovery does not contain luci.

Maybe someone on openwrt forum can help

I did not boot recovery.

I booted from openwrt-24.10.1-mediatek-filogic-bananapi_bpi-r4-sdcard.img aka SDCARD.IMG

It is unclear to me which image I should boot off from. I copied the openwrt Sdcard image because I had an SD card. This is deep as my reasoning went.

I have absolutely no idea what I’m doing.

Have you put both bootswitches down? Only then boot from sd is done.

Also it would be goot connecting debug-uart (ftdi recommended) to see whats going on while booting.

Yes both switches are set to boot from sdcard. It boots fine from sdcard.

With both switches set to up nothing happens. No activity on any ports so I presume the BP4 came with nothing installed.

Also it would be goot connecting debug-uart

I hope that I would have mended this by the time I have ordered a debug-uart and had it delivered. because it would take weeks. Press or something you cannot get them locally here . In fact I can’t get anything electrical here.

to be frank, there should be a way of just copying an image of openWRT onto an SD card, booting off the SD card, and letting openWRT install onto an internal flash disc.

Afaik you can use fw_setenv from within openwrt userspace to allow uboot doing the stuff auromaticly,but without see anything imho no good way. Also you can manually install openwrt from running sdcard system

I want to do this. But the method alludes me.

i do not see bpi-r4 instruction-page, but should be similar to bpi-r3

https://openwrt.org/toh/sinovoip/bananapi_bpi-r3

another way would be analysing the steps uboot does and do the same from openwrt userspace

Their articles miss out some important steps. I think I have put these down below, but am not too sure.

I think they want me to:

  1. Boot from the OpenWrt SDcard image.
  2. SSH into the server.
  3. Run: fw_setenv bootcmd “env default bootcmd ; saveenv ; run ubi_init ; bootmenu 0” → Does this part install openwrt onto the NAND?
  4. Turn the server off.
  5. Change the dip switches on the side from “boot sdcard” to “boot nand disc”.
  6. Turn the server on.

At this point the server might boot from somewhere and hopefully install the O/S onto the NAND disc ( This bit has lost be because the logic seems wrong).

However, the bananapi.org instructions really lost me:

https://wiki.banana-pi.org/Getting_Started_with_BPI-R4#How_to_burn_image_for_SD.2C_EMMC_Nand

#### How to burn image to onboard Nand [SNIP]

    1. Copy Nand boot OpenWrt image(mtk-bpi-r4-NAND-20231030.img) to USB disk.*

I think the Bananapi.org instructions presume that the BP4 comes pre-installed with an image, which was not the case for some of us as I have read on this forum.

The answer was no:

root@OpenWrt:~# fw_setenv bootcmd "env default bootcmd ; saveenv ; run ubi_init ; bootmenu 0"
Cannot parse config file '/etc/fw_env.config': No such file or directory
Failed to find NVMEM device
Error: environment not initialized

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/uboot-mediatek/patches/450-add-bpi-r4.patch;hb=HEAD#l452

Looks like you have to use bootmenu_default=6

I wonder why nvme error shows up

Did they forget to put it onto the board.

Did not work using bootmenu 6:

root@OpenWrt:~# fw_setenv bootcmd "env default bootcmd ; saveenv ; run ubi_init ; bootmenu 6"
Cannot parse config file '/etc/fw_env.config': No such file or directory
Failed to find NVMEM device
Error: environment not initialized