Jump to content

u-boot 2022.10-armbian hangs when a USB hard disk is connected


Marco d_Itri

Recommended Posts

u-boot from Armbian_23.02.0-trunk_Bananapim5_sid_edge_6.2.0-rc3_minimal.img hangs if I try to boot with my USB hard disk connected.

I replaced it with u-boot from Armbian_22.08.7_Bananapim5_bullseye_edge_5.19.16.img and that one works fine.

 

U-Boot 2022.10-armbian (Feb 12 2023 - 17:20:43 +0000)bpi-m5

Model: Banana Pi BPI-M5
SoC:   Amlogic Meson SM1 (S905X3) Revision 2b:c (10:2)
DRAM:  3.8 GiB
Core:  384 devices, 27 uclasses, devicetree: separate
MMC:   sd@ffe05000: 0, mmc@ffe07000: 1
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@ff3f0000
Autoboot in 2 seconds
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10 
scanning bus usb@ff500000 for devices... error in inquiry

 

If I unplug the USB hard disk then also the newer u-boot works fine:

scanning bus usb@ff500000 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

 

Link to comment
Share on other sites

@Igor I got quite similar problem of infinite boot loop on Banana Pi M5. It is caused by one of the patch where usb/nvme/scsi are given higher boot priority. I've resolved the problem by compiling new u-boot.bin from trunk to address this issue and  has been tested for u-boot v2022.10 and v2023.4.  I have send a PR. Please have a look.

 

Regards.

Edited by MrBoyi
Link to comment
Share on other sites

Hello @MrBoyi,

There is a way, simple as terminals commands, so I can upgrade the u-boot on my device to fix this issue?

I have a M2pro board and I am trying to assemble a NAS server with OMV, but facing the wall with this boot sequence problem.

I try to found a more simple way to solve this problem because I dont have enough technical knowledge to do the same way as you.

Best regards.

Link to comment
Share on other sites

Hello @Marco d_Itri, thank you for the quick answer.

 

I tried to follow the steps on your blog, but I get lost on the part that you say, if I understand correct, that you copy the u-boot files from you old Cubieboard.

I don't know if I'm asking too much, but I was expecting something like: Replace this file, change this configuration or maybe upgrade this package.

As i said, I don't have enough technical knowledge. I tried to follow the PR send by @MrBoyi and i saw that the boot priority was causing this issue, my first thought was to find this file and do the change, but I understood that was no so simple.    

 

I tried other way to solve the problem like: I downloaded the Debian image on the banana-pi team gdrive, but its a very old image and i was not able to instal OMV on it. So I tried to replace the system partition with armbian image, that way I would stay with a good boot, and a better version of the system, but i endup with a very buggy system.

 

Anyway I still facing the problem.

 

Thank you.

Link to comment
Share on other sites

I think that the simplest way for you would be to download the older Armbian image with the older u-boot version, USB-boot it and then use the two dd commands to install u-boot on you actual boot device. Or else just download it on your board, loopback-mount it and copy the file with dd from there.

Link to comment
Share on other sites

My goal is to have a armbian with the proper boot installed on the emmc, this way I will be able to have my personal NAS with OMV.

I don't know if I follow completely your tip, you are suggesting to use a older version of Armbian. How old? Like, go back to Buster? This old versions split the installation in two different partitions, one for boot and the other for the system?

I asking, because the Debian that i downloaded from banana-pi team, works this way, with two partitions. But, the most recents Armbian images install in only one.

So the step-by-step would be:

1 - Download and install the older version of armbian.

2 - Replace the system partition with a dd command using a more recent image of armbian.


Something like this?

 

Thank you again.

 

Edited by dioles
Link to comment
Share on other sites

Hello @Igor


I tried two images from that repository:

Armbian_23.5.1_Bananapim5_bookworm_current_6.1.30_minimal.img.xz

Armbian_23.5.1_Bananapim5_bookworm_current_6.1.30.img.xz


All of then installs with no issue, but when a connect my external drive e reboot the system, the boot error is still there.

But now its a different error, before the boot screen freezed indicating that was not possible to boot from the usb drive connected, now its a boot loop.

I managed to took a picture, its not that good because the screen flashes very fast.

20230530_155007.jpeg

20230530_155014.jpeg

 

Thank you.

Edited by dioles
Link to comment
Share on other sites

 @dioles

 

One easy way to update u-boot in Armbian:

  1. cd /lib/linux-u*
  2. backup u-boot.bin in the folder
  3. put a new u-boot.bin in the folder
  4. Use armbian-config -> system settings -> “Install” “Install to/update boot loader” -> Install/Update the bootloader on SD/eMMC

 

By the way, it seems that you still got a problem. I you don't mind experimenting, you can have a look at this bootloader, built based on the firmware at Sinovoip's https://github.com/Dangku/amlogic-u-boot.git on the branch odroidg12-v2015.01-c4-m5. This branch has more commits than the default (used by Armbian from amlogic-boot-fip) and is describe in upstream u-boot doc on Bpi-M5. Basically it has newer firmware. One of my M5 can't boot with regular armbian (don't know why, may be latest board version, not sure). This bootloader (buid from armbian trunk) works on this problematic board and other boards too. Not sure if it can actually help, though.

 

Regards.

 

Link to comment
Share on other sites

@dioles That's great. Glad I can help.

 

@chewitt Could you consider updating the repo amlogic-boot-fip for BPi-M5 to the odroidg12-v2015.01-c4-m5 branch? At least now there are two occasions - mine can't boot, and @dioles's got error when booting USB - which could be due to updated board which is incompatible with current firmware. If you want, I can create a PR.

 

Link to comment
Share on other sites

I can confirm that the FIP developed from odroidg12-v2015.01-c4-m5 branch works on all three of my M5 (including the one with boot problem) for u-boot v2022.10. But U-boot v2023.04 cause boot loop when USB hard disk is connected to that one board.

Link to comment
Share on other sites

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