Jump to content

Recommended Posts

Posted

Hey there! I've just bought a used Orange Pi 5, according to the owner he never managed too boot up the first time, because he said it was bricked, for the price he offered for the device and accessories I thought I'd give it a go.. and yeah, I tried to install on different microSD cards, Armbian, OrangePi Os, Android 12 for Orange Pi, many tries but none of them booted or did anything after waiting even 15min. If I set the device into maskrom mode it enters the mode but it gives error to anything I try. I read on a post that using this firmware fixed someones board: https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/ I tried and I get the following:

Download Boot Start, Download Boot Success, Wait for Maskrom Start and Success and then on Test Device Start, I get Test Device Fail , Note: Comunication issues, Certainly please check usb, Completed... 

 

If I go to the advanced function tab, Test Device fails, Get ChipInfo fails, ReadFlashInfo Fails too Flash ID... all of them,... IDK if I'm missing something or this one is really dead and there is nothing I can do.

 

If someone has any idea of what could I try to do to get it working it would be nice!

 

Thank you!

Posted

It seems there is smth on the flash preventing boot, so I would remove SD card, enter mask rom, release button or other contact used to enter maskrom (it is necessary only to "tell" to bootrom that no internal flash is available for boot) and format/erase flash.

After that disconnect the device from PC and power, and then reconnect/power on device, it should enter maskrom by itself since internal flash is empty. Then just boot from SD card with appropriate armbian image.

Posted
Quote

@MaxT

It seems there is smth on the flash preventing boot, so I would remove SD card, enter mask rom, release button or other contact used to enter maskrom (it is necessary only to "tell" to bootrom that no internal flash is available for boot) and format/erase flash.

After that disconnect the device from PC and power, and then reconnect/power on device, it should enter maskrom by itself since internal flash is empty. Then just boot from SD card with appropriate armbian image.

 

I tried that but I ge the message "Get FlashInfo Fail" when I click on EraseAll in RKDevTool 3.19, I tried on all the other versions recommended as well and i get the same result. It looks like the device directly books in maskrom, I'm buying the TTL USB adaptor to see what else can i read from the boot. If the SPI is fried or its totally corrupted an unrecoverable I might try to replace it soldering by another one. I want to do that as a tinkering project either, I'm used to soldering so why not :)

 

I will update the post once I get the USB TTL stick to check the bootloader, if there is anything else i can try that I haven't I will too! I also tried inserting SD card and pressing the recovery button but it does nothing I guess because its stuck to maskrom mode, i can connect it through usb without pressing the maskrom button and it's in that state already when I turn on.

Posted

You might want to try communicating with the board over USB (male to male USB is needed) under Linux rather than windows. In mask rom mode it allows loading blobs into memory, flashing device, etc.
I've used that a while ago and with a different board, but AFIAK this works across all RK based boards

Posted (edited)

@MaxT Hey, do you mean USB-A? using the 2.0 port of the orange pi? I'll will give it a go! will create a linux on an external drive and see if I can make it work! over there while I wait for the TTL usb!

Edited by diafebus
Posted

Yes, usb A which is rare since, if I remember correctly, USB standard does not mention OTG functionality for it. OTG is for eg micro USB.

AFAIK usb-A to usb-C + adapter (if needed) might also do the job, but it is possible that not every cable and/or adapter will work, just remember there were discussions on this a few years ago.

Can't comment on which usb port you have to use on your board - I did that on a different one.

Just realized- if you already can interface with the board in the mask rom mode from windows PC, that's it. Now you have to try the same connection under Linux with Linux tools and blobs for your board.


When I did my exercise, I just opened Ubuntu VM on my ESXi server and passed through USB to that VM. So you might want to try doing similar with Virtualbox or VMware Workstation.

Posted

Help:

Rkdeveloptool

Rockusb

rk3588_spl_loader_v1.15.113.bin as miniloader

 

I assume that you have a computer with Linux OS installed.
The rkdeveloptool utility is installed or built.

Connect your device to this computer using a USB cable.

Press the Maskrom button and hold it down to turn on the power on the device.

In the next step, you should download the mini loader to your device using the rkdeveloptool utility.

rkdeveloptool db rkxx_loader_vx.xx.bin

Now the device should come to life and should respond to requests and perform some actions.

 

If you have pre-downloaded and unpacked the u-boot armbian binary package for your device (extract the bootloader file from the package),

you can do the following:

Just in case, run the clear command.
Write the armbian bootloader to the memory chip.

For tips on the offset, see the u-boot package script.

 

Posted (edited)

ok so I'm on Linux Fedora right now if I connect the Orange pi using the USB 2.0 cable (yeah i happened to have one of those weird cables ahah, first time i use it)

I go:

rkdeveloptool ld

DevNo=1    Vid=0x2207,Pid=0x350b,LocationID=101    Maskrom

 

so yes it shows up, but when I do any other commands like erase flash or readflashID i get the same errors i was getting on windows:

 

rkdeveloptool ef

Creating Comm Object failed!

 

rkdeveloptool rfi
Read Flash Info quit, creating comm object failed!

 

rkdeveloptool db
Did not find loader item in config!

 

When i try to flash the .bin file i get that:

rkdeveloptool db /home/diafebus/Downloads/rk3588_spl_loader_v1.15.113.bin
Creating Comm Object failed!

 

and so forth...

Edited by diafebus
Posted

I would then find pin on the 40 pin connector to short SPI flash to ground (if such pin is exposed) and then tried to boot from SD card. It hard to guess why the board could not boot from SD previously, but guess it's worth trying with SPI flash grounded.

Maybe there is some way to load uboot into memory but without usb-ttl it would be difficult to proceed further.

If you will be replacing SPI flash, I would recommend either finding same chip or make sure that alternative works on the same or higher max frequency - just to avoid any potential mismatch with dts re SPI max frequency.

Posted (edited)

@MaxT okay, the Orange pi 5 has 26 GPIO instead of 40, that would be the pin out: http://www.orangepi.org/orangepiwiki/index.php/26_Pin_Interface_Pin_Description

 

I see pin 19, 21, and 23 are related to SPI, which of those would you ground? MOSI (input?) MISO (output) or the clock?

 

SPI4_MOSI_M0 pin 19

SPI4_MISO_M0 pin 21

SPI4_CLK_M0 pin 23

SPI4_CS1_M0 pin 24

 

Thank you man! its fun to try all this stuff 

Edited by diafebus
Posted

Clock, but make sure it is the same SPI as SPI flash is wired to.

Otherwise you might want to try just solder a wire to SPI flash clock pin and ground it in that way and while at it touch SPI flash pins which a soldering iron to exclude soldering defects.

Posted

I don't think there is smth more/else to ground.

Try burning to SD card some guaranteed to work image (there were some issues with armbian images - some were not working) - quick glance on form showed me that someone wrote that his OPi5 was running 5.10.110 kernel, so take minimal image (just to speed up) from armbian old archive http://fi.mirror.armbian.de/oldarchive/orangepi5/archive/. Image/kernel version doesn't matter at this stage.

If after powering up the board with sd card, pc will not detect it as being in mask rom, then it probably is working in this or that way. Also remember that first time boot takes some time due to partition resizing, but your test is maskrom mode state.

If not, I'm out of ideas and help from someone really knowledgeable is needed. Hope @going will be able to give you more help. Just keep in mind that he is using translation to write here and probably to read.

Posted

Okay will try that and give up feedback, but I already tried a few images before, ChatGPT suggested to ground pin 1 instead, which is chip select, but the result is the same, so apparently if the SPI is corrupted or shorted internally it can cause the maskrom mode to get stuck, the other option i have is to try to desolder the chip already, but I'd like to get the USB TTL first before going for bigger changes.

Posted

Even if the SPI chip is burned/shortened, this does not explain why the board doesn't boot from SD. Maskrom mode is just the state of RK CPU which boot room didn't find bootable system on any of SPI/eMMC/SD, so it just goes to this mode, but AFIAK CPU cannot be stuck in this mode, it is only a matter of providing a bootable system to it.

I don't know whether SD card should be accessible by rkdeveloptool in the same was as SPI chip or emmc usually are, but you might search whether this is the case and check in practice - if it should be accessible but it is not, then there might be smth wrong with either SD slot or card itself.

Posted

OPI-5, OPI-5-plus - The connection scheme of the SPI flash memory chip is similar.

I did an experiment with OP-5-plus.
On a running OS, I erased all mtd-flash using the dd if=/dev/zero of=/dev/mtd command.

The device turned into a brick.
Downloading from an SD card or NVME has become impossible.

 

Recovery:

I downloaded this archive from the official orangepi website:

MiniLoader - what is needed for burning Linux images-20241230T170815Z-001.zip

The device is in MaskRom mode and the MaskRom button is not pressed.

MiniLoader> ls -al
итого 6136
drwxr-xr-x 2 leo users     208 янв  1 20:33 .
drwxr-xr-x 4 leo users      45 дек 31 16:30 ..
-rw-r--r-- 1 leo users  448960 янв  1  1980 MiniLoaderAll.bin
-rw-r--r-- 1 leo users    1249 янв  1  1980 rk3588_linux_emmc.cfg
-rw-r--r-- 1 leo users    1859 янв  1  1980 rk3588_linux_pcie.cfg
-rw-r--r-- 1 leo users    1249 янв  1  1980 rk3588_linux_spiflash.cfg
-rw-r--r-- 1 leo users    1249 янв  1  1980 rk3588_linux_tfcard.cfg
-rw-r--r-- 1 leo users 4194304 янв  1  1980 rkspi_loader.img
-rw-r--r-- 1 leo users 1620480 янв  1 18:53 u-boot-rockchip-spi.bin

rkdeveloptool db MiniLoaderAll.bin

If your device switches to MaskRom mode on its own and the command returns an error at this stage, the MaskRom button may be defective (it is always pressed). This is an assumption.
In my case, I had to press a button, then turn on the power and release the button.

Nothing is connected to the device. There is no SD card. There is no HDMI cable. There is no UART.
Only the power cable and the USB cable to the PC.

 

Boot_option

It is not possible to boot this device if the mtd chip is clean.

In my case, I wrote the entire u-boot v2025.01 code to mtd.

I built it myself in the Armbian build system without any additional patches.

Today, my device loads any image (OS) from all the memory devices I have.

 

Well good luck.
With respect to you as a person who knows how to operate a soldering iron.

Posted
11 часов назад, diafebus сказал:

at least nothing smelled like fries. But yes still shows up as in marksrom mode on rkdeveloptool on linux. with microSD or without microSD. maybe i have to ground some other pin instead of clock?

I still recommend restoring the original circuit.

Posted (edited)

I will check about that but I wasn't being able to write anything on the SPI, it's stuck on maskrom mode but might be for some other reason, I checked button continuity and it's correct, so unfortunately is not a bad maskrom switch. I will wait for the USB TTL adaptor to arrive to see a little further, where the problem beggins, I still have faith it can be worked out, trying rkflashtool I managed to dump the SPI image, which was all 00000s as expected but at least i could read it! But when I tried rkflashtool to flash anything into it, it would not get done. 

EDIT: I'd say it might be a bad SPI, the previous owner said to me he never managed to boot from this board neither with SSD or SD so it might have come with maskrom mode locked from factory, he left it on a drawer and forgot about it, so i bought it to see if i could do something with it, or learn something in the way!

 

 

Edited by diafebus
Posted
8 часов назад, diafebus сказал:

I will wait for the USB TTL adaptor to arrive

I think he won't give much information in this situation.

 

8 часов назад, diafebus сказал:

I'd say it might be a bad SPI, the previous owner said to me he never managed to boot from this board neither with SSD or SD so it might have come with maskrom mode locked from factory

I have these two boards (OPI-5, OPI-5-plus).
They both arrived with a pre-installed loader in SPI-Flash.

The loading order on both boards is the same.
BootRom searches for the boot code on SPI-flash and downloads it.
In other words. If u-boot v2019 is written to the SPI-flash and the bootloader v2025.01 is written to the SD card,

I will see the v2019 message in the UART console.

 

Maybe the documentation will give you a hint?
This is part of the wiring diagram.

OPI-5-rk3588s-boot-mode-config.thumb.png.d62719a2e5a3b7e57db13f34ed3aeced.png

Posted

When using the RKDevTool, do you have anything plugged into any of the USB ports?

 

If so, remove anything so that the board is essentially out of the box.

 

When I first started using the RKDevTool, I had a WiFi/BT dongle and a wireless dongle for my mouse, which game me maskrom errors when attempting to flash Android.

 

As soon as I removed them, all worked well.

 

Probably a long shot in this case but worth checking.

 

Have you also tried to use the reset button on the board? There seems no documentation about it's use but it must do something practical. Perhaps hold it down for a few seconds whilst powering up.

 

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines