Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Booting ROCK Pi 4(A/B/C) with mainline u-boot in SPI, NVMe and Armbian v20.11.x

Featured Replies

Hi. I have soldered a Spansion FL064LIF01 SPI flash on my ROCK PI 4 SE and it is not recognised by debug console:

Quote

Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: 01, 60, 17
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

The wierd thing is that "lsblk" detect it:

Quote

mtdblock0    31:0    0     8M  0 disk

I have connected an ASM1166 SATA controller to m.2 slot and installing armbian to boot from SD and have root on SATA works fine, but fails if install to boot from MTD and have root on SATA. Is there any way to include ASM1166 driver in u-boot to be able to boot the board using MTD+ SATA ASM1166  adapter? 

Is it possible to make u-boot to cycle from eMMC->SPI->SD->USB->NVME->PXE like in RPi5 for example?

Thanks

10 hours ago, DeMo said:

The wierd thing is that "lsblk" detect it:

That is because it is the linux kernel that is driving you own/custom SPI-flash chip. When you power on the board, it follows a certain priority of devices, see schematics of the board. It might be that SPI-flash is not included. And if included, the U-Boot you put in there might assume different wiring or none at all. It is can be because the U-Boot config it is compiled from does not include the right options. So create a custom U-Boot for your custom board.

 

I don't have a custom board. I have a ROCK PI 4 SE. These boards do not come with SPI flash IC soldered on the board, but have space if one chooses to solder SPI flash himself. Since I couldn't find flash IC that Raxda recommends: https://wiki.radxa.com/Rockpi4/hardware/spi_flash (W25Q64FV; GD25Q127CSIG;XT25F32B;XT25F128B) I found equivalent to W25Q64FV. The vendor Id of FL064LIF01 is different so I'm guessing that is why it is not recognized. I read that Piter75 had support for XTX flashes at first so other flash ICs can be added maybe?

Quote

So create a custom U-Boot for your custom board.

This is exactly what my goal is but since I'm new to this I though posting on forum and ask for some help would not hurt.

Thanks

The foreign added SPI-flash makes it custom in terms of Armbian bootloader.

Look how to build U-Boot from Armbian build environment (development basically) or find howto on denx.de. It been a while since I last did that myself, so things might have changed a bit.

Quote

The foreign added SPI-flash makes it custom in terms of Armbian bootloader.

Well its equivalent so other than vendor not beeing in a database does not count as custom in my books, but that is beside the point. Armbian correctly recognizes the size and I can write to it and that is important.

Now flashing an existing image is simple. My preferred way is dd as described by Piter75:

dd if=uboot.img of=/dev/mtdblock0 bs=4K for u-boot images

and

dd if=idbloader.img of=/dev/mtdblock0 seek=64 bs=512 conv=sync

dd if=u-boot.itb of=/dev/mtdblock0 seek=16384 bs=512 conv=sync

if used with image tree blob. Nice thing is that if new u-boot hangs or does not boot I can just short pin 23-25 to boot from SD card and try again. Since I have an 8Mb flash I would really like to bake in m.2 to SATA drivers - for ASM1166 in my case. Any pointers are welcome.

 

DeMo

 

 

On 12/4/2020 at 11:04 PM, piter75 said:

Hi, Piter
Where do I download this file now?

I’m using the bootloader rk3399_loader_spinor_v1.20.126.bin because I have a ROCK PI 4A+ with board version 1.74.

rk3399_loader_spinor_v1.20.126.bin

The SPI bootloader only works with a RADXA U‑BOOT — any version based on 2017.09.img. I want to upgrade to a newer, working U‑Boot for SPI booting.

rockpi4a-uboot-trust-spi_2017.09.img.xz

 

The latest Armbian image that works and boots from an SD card is Armbian 23.02.2 Rockpi‑4a current, with Kernel: Linux 5.15.93. Later images won’t boot from the SD card, even if I short pins 23 and 25.

At the same time, upgrading Armbian 23.02.2 to the current Armbian 26.08.X (Kernel: Linux 6.18.X) works fine, and the board boots successfully.

 

I found the latest U-boot for the ROCK PI 4, as well as for other boards, on GitHub. Here is the link and the actual U-boot archive.
inindev / uboot-rockchip
rk3399-rock-pi-4.zip

All current ARMBIAN (26.08) images for Rock PI 4A start up with the new U-boot v2026.04

Edited by Energokom

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.