Banana Pi BPI-M5 erase eMMC

Hello, bpi m5 does not boot …

DSU clk: 1200 Mhz
CPU clk: 1200 MHz 
Set clk81 to 166.6M
eMMC boot @ 0
sw8 s
DDR driver_vesion: LPDDR4_PHY_V_0_1_15 build time: Jun 18 2019 20:29:37
board id: 1
Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from eMMC, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
00000000
emmc switch 1 ok
00000000
emmc switch 2 ok
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
00000000
emmc switch 0 ok

dmc_version 0001
Check phy result
INFO : End of initialization
INFO : ERROR : Training has failed!
1D training failed
Cfg max: 2, cur: 2. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0001
Check phy result
INFO : End of initialization
INFO : ERROR : Training has failed!
1D training failed
All ddr config failed...
Reset...
boot times 7

it runs for an hour and more.
tried to flash with AML burn tool … but the board will not be detected ( smartphone does!)

is the BPI-M5 board now finally bricked ?

start reson was to flash an armbian- image from SD to eMMC - anything went wrong and now it is not booting, does not detect SD-card …

or any idea to brig it up again

Fred

Tring to erase the emmc BPI-CM4 eMMC wipe

as wrote above:

tried to flash with AML burn tool … but the board will not be detected ( smartphone does!)

searching for other solution

Fred

you should confirm the aml windows drivers install correctly, load the right android image, and enter usb download mode, not just check your usb cable with smartphone.

  • you should confirm the aml windows drivers install correctly,

downloaded and followed setup installation - tried v 2.2.3.3 and v 3.2.0

  • load the right android image, took image from BPI M5 site = 2023-03-01-bpi-m5-m2pro-mbox-android9.img tired also: aml_upgrade_package.img

  • and enter usb download mode, how to do it ? not found any hint how to switch on BPI-M5 board any mode there is no download-mode in menu (only load image…) discribed to use Start-button … nothing happens

  • not just check your usb cable with smartphone.

thats why there ist NO device on burning-tool when BPI-M5 plugged in on USB-C “push reset on M5” does nothing

push START on burning tool does nothing I thought there should a device appear at burning tool ( as shown at pic’s) but never seen a USB-connection … hmmm , tried also with SW1, SW3 and SW4 (SW2-Reset works! all begins again…) need to erase eMMC ?? otherwise boot from SD-card - even TFTP-boot could help

Fred

Just for completeness, did you press the SW4 button when you try to flash the android image?

It could be bootloader problem related to amlogic-boot-fip. I’ve got this quite a similar problem with one of my boards, but it’s worse as it can’t even boot the SD. But my bootloading process exceed farther in the 1D training but failed before the end. If you can erase the eMMC, I can provide the u-boot.bin to check whether that’s the real cause. [EDIT: If you use armbian provided by Sinovoip, disregard this. They can boot just fine. I think they use updated fip. My specific problem only relevant with stock armbian.]

Anyway, how do you flash the image into the eMMC?

Hello Boyi, tried both . push with SW4 ( also with SW1)

  • how to ? booted a armbian from SD and flashed image to eMMC with dd
    see bpi-m5 getting started: sudo unzip -p xxx-bpi-m5-xxx.img.zip | pv | dd of=/dev/mmcblk0 bs=10M status=noxfe

got errros from eMMC … so had to ersae eMMC: followed bpi.M5 getting started … erase eMMC variant2: bananapi_m5# mmc erase 0 1000

and… voila got result in top message -> endless loop from ??? no u-boot anymore only

SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:00000703
L2:00008067
L3:15000020
S1:00000000
B2:20282000
B1:a0f83180

TE: 121168

BL2 Built : 20:29:41, Jun 18 2019. g12a ga659aac - luan.yuan@droid15-sz

Board ID = 1
Set cpu clk to 24M
Set clk81 to 24M
Use GP1_pll as DSU clk.
DSU clk: 1200 Mhz
CPU clk: 1200 MHz
Set clk81 to 166.6M
eMMC boot @ 0
sw8 s
DDR driver_vesion: LPDDR4_PHY_V_0_1_15 build time: Jun 18 2019 20:29:37
board id: 1
Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part                      
fw parse done
Load ddrfw from eMMC, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part:                                                             0
Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part:                                                         0
PIEI prepare done
fastboot data load
00000000
emmc switch 1 ok
00000000
emmc switch 2 ok
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part:                                                         0
00000000
emmc switch 0 ok

dmc_version 0001
Check phy result
INFO : End of initialization
INFO : ERROR : Training has failed!
1D training failed
Cfg max: 2, cur: 2. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part:                                                         0

dmc_version 0001
Check phy result
INFO : End of initialization
INFO : ERROR : Training has failed!
1D training failed
All ddr config failed...
Reset...
boot times         0
SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:00000703
L2:00008067
L3:15000020
S1:00000000
B2:20282000
B1:a0f83180

TE: 65705

BL2 Built : 20:29:41, Jun 18 2019. g12a ga659aac - luan.yuan@droid15-sz

Board ID = 1
Set cpu clk to 24M
Set clk81 to 24M
Use GP1_pll as DSU clk.
DSU clk: 1200 Mhz
CPU clk: 1200 MHz
Set clk81 to 166.6M
eMMC boot @ 0
sw8 s
DDR driver_vesion: LPDDR4_PHY_V_0_1_15 build time: Jun 18 2019 20:29:37
board id: 1
Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from eMMC, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
00000000
emmc switch 1 ok
00000000
emmc switch 2 ok
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
00000000
emmc switch 0 ok

dmc_version 0001
Check phy result
INFO : End of initialization
INFO : ERROR : Training has failed!
1D training failed
Cfg max: 2, cur: 2. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0001
Check phy result
INFO : End of initialization
INFO : ERROR : Training has failed!
1D training failed
All ddr config failed...
Reset...
boot times 1
.................

boot times 0 up to boot times 600 … did not try longer

I believe the given variant2 of “how to erase eMMC” ( dd ) bricked it! Android flash tool does not help … never get an (BPI) device connected !

any hint ? how to force SD-boot or TFTP-boot ?

Fred

tried both . push with SW4 ( also with SW1)

Disconnect the USB first. Then push SW4 and connect the USB to the Windows PC. Only release SW4 once you see the notification that they are connected.

I believe the given variant2 of “how to erase eMMC” ( dd ) bricked it! Android flash tool does not help … never get an (BPI) device connected !

Do you mean you use dd to flash the image to eMMC? You don’t have to. You can use armbian-config.

any hint ? how to force SD-boot or TFTP-boot ?

Can’t do much if eMMC is not empty. It has the priority to boot over SD and USB. You need to erase the bootloader from eMMC first.

You need to find out why you can’t use the USB flash tool. It could be due to unavailable windows driver. Or it could be due to the wrong step taken when you try to connect them (e.g. when you mention you push SW1 which is not necessary).

Hello, if push SW4 nothing happens on USB-C port

Win10 - drivers … hmm …how i can do test for correct work ? ( smartphone connects)

( armbian-config does not work on Ubuntu image ! )

hmm thougt there is perhaps a possibility to get SD card access (hardware modification?) I will not believe that makers planned to “brick by design” !

hmm have here a BPI M2Ultra running too … can I use it for testing connections to flash-tool ?

Fred

Win10 - drivers … hmm …how i can do test for correct work ? ( smartphone connects)

May be you can use the usb driver provided down below this link.

( armbian-config does not work on Ubuntu image ! )

It works. Ubuntu image is officially supported. Flash -> boot from eMCC: System at eMCC. If it is not there, like you use the minimal version, you can download it using apt install armbian-config. It will reduce the headache of wrongly flashing the image.

hmm thougt there is perhaps a possibility to get SD card access (hardware modification?) I will not believe that makers planned to “brick by design” !

I don’t have the knowledge. Can’t advice.

hmm have here a BPI M2Ultra running too … can I use it for testing connections to flash-tool ?

You can’t. That’s Allwinner processor. You want Amlogic.

Regards.

Hello,

first: success ! still not sure why, but

  1. firt installed driver seperate . 2 installed Amlogic_USB_Burning_Tool_v3.2.0 - does not support android9 3 installed USB_Burning_Tool_v2.4.x - missing dll’s
  2. installed USB_Burning_Tool_v2.2.3.3 - works ! in first attempts I let install the driver from tool ( should be an error)
  3. flasshed up to 7% - diconnected after formatting
  4. it is booting from SD !

seems that it is nessesarx to install driver before tool ( toll itself seems not do it correct)

so thanks for help!

Fred

Good to hear that. REMEMBER: It highly recommended to use armbian-config when you want to flash to eMCC. Armbian has different boot orders and partitions than stock Banana PI Ubuntu, so can’t treat these two different distros the same.

Best Regards.

Hello, but armbian has a big problem (still not found documentation) It stops/hangs up after a random time of hours! and it has a problem with powering/detecting USB-ports.

Armbian ( ALL versions from armbian-site) does not run stable - planned for nextcloud with usb-data-HDD … longest run since some weeks was abt 23 hours!

Ubuntu hung up after 5 days (HDD lost USB-power) Thats why I am searching for alternative systems … now testing raspian ! downloaded bpi-m5 website and again … if it runs stabele … hoe to bring it to eMMC ? (armbian-config ? )

until today did not find boot-orders in armbian for use a USB-HDD mounted by fstab … May be I have to change to an Odroid C4 board for productive ?

Fred

Do you mean it hang when you connected to USB hard disk? It has been patched. Try download the most recent image.

If you still got problem, there is a u-boot.bin posted by username ‘boyi’. Follow the instruction to download and flash it. Try it if it work.

Refer to this link.

BTW, you need a good power supply, 5V 4A to use external usb drive. 3A might work.

Regards.

I’ve reread you post. So, your board can boot USB hard disk but it hangs after several hours, right? That could be not enough power. You don’t have to download the new image then. Try to use good power supply. You can get a good 5V 4A power supply from Aliexpress.

downloaded bpi-m5 website and again … if it runs stabele … hoe to bring it to eMMC ? (armbian-config ? )

They don’t have armbian-config. For the one at bpi-m5 website, you need to follow their instruction by using dd.

hekko @boyi use 5V/4A power supply hier ( 1 USB HDD … runs stable on a BPI m2U board with 5v/2.5A supply) Anyway to use newest armbian-bookworm and USB-power off at boot-time no longer exist. It was here always a (visible) reboot problem . so Iam hopeful looking forward.

Fred

I have tried to erase Armbian from the EMMC of my M5 using the method proposed by the wiki for Linux installations. Regretfully I have to do this because while Armbian itself is a beautiful OS I need my SBC to perform different tasks than those I do using a standard Notebook.

The method requires you to connect the 3 serial pins at the back of the 40 pin connector to Minicom on another computer using a USB to serial adapter.

Booting to u-boot by pressing the ESC key at startup worked well and typing help comes up with list of u-boot commands which can be used.

however, when I did: mmc erase 0 1000

the system returned with:

Card did not respond to voltage select

Running mmcinfo produced the same error message.

However, running mmcinfo after inserting an Sdcard did come up with meaningful data which leads me to conclude that the mmc commands in u-boot default to Sdcard operations. Therefore, as is, this method cannot be used to erase EMMC.

What is the alternative please?

What can’t you do with Armbian?

Thank you for your speedy reply?

I believe my message above was clear enough but, just in case, allow me to repeat:

  1. Why is the mmc command not working for me? What have I missed? This is probably a BPI issue not Armbian.
  2. More important, I buy SBC’s to carry out hardware projects based on the 40 pin connector. This was always the intent of the original RPI project. I have Armbian running well on an Amlogic based cheap TV box and since these do not have GPIO pins the need to enable the functions of the GPIO does not arise. It is however necessary on an SBC, that the (H)ardware options as presented when one runs armbian-config are explained somewhere and actually work. The information I was able to scour up from the internet about the options presented therein is sketchy and those who have found some success appeared not convinced long term. Maybe I have missed something and if so I apologize.

So far the best os I have found which met my requirements is Ubuntu Mate 20.04. Information is not great but with a little patience and some digging one can get there.

Probably you didn’t select right mmc device? There are two physical and perhaps more logical. Try to ask in Armbian forums if someone knows more.

Armbian takes control on hardware after power is applied. We don’t need chip or board vendor assistance to understand, but we cooperate with some. Time / resources to fix “everything” is a problem. Some vendors uses Armbian or its fork as its still maintained and assembled better. But this is open source software - legally it is your issue, just Linux commercialisation in past years twisted this perception.

Armbian makes substantial loss by developing and providing software you run - under any brand name. We don’t have a budget to write instructions, such support is peer based. You help someone, someone helps you … We only have cosmetic level of public support, while Rpi foundation on the other hand, have few millions to burn and a lot less complexity to deal with.

Improving instructions is something you can help and use this opportunity and be even rewarded much better then open source maintainers you are asking for support …

It is always a trade - old unmaintained OS with this functionality working OOB or new, where some additional work is needed. We don’t know how exactly, but certainly less work then fixing everything that is missing in “Ubuntu Mate 20.04”,