[BPI-R3] buggy sd-card written in ubuntu

I have my own build root for openwrt snapshot.

It works :slight_smile:

Some strange behavior

normally I burn the image using this script to sd-card directly in ubuntu

gunzip bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz

sudo dd if=bin/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img of=/dev/sdd

but these card will not boot in my R3 v1.1

ERROR:   MSDC: CRC error occured while reading data with cmd=17, arg=0x680000

ERROR:   MSDC: Command has timed out with cmd=17, arg=0x680000

ERROR:   BL2: Failed to load image id 3 (-5)

Regarding the reported crc-error in bootlog, the dd command only says

909701828 bytes (91 MB, 87 MiB) copied, 19.6752 s, 4,6 MB/s (no error)

If I use win32imager in Win11 with the same image to write the sdcard, all is fine. Edit: just found, the image is also not usable in Windows. Wondering, just yesterday that was the solution.

So I must have the bug in my buildroot. I changed the root partition size to 512 MB and added several packages. During make process I can´t see any errors. Do I have wrong build options?


Have you run sync after dd finished? I guess image was not completely written (dd exits after data is written to cache)

1 Like

As I know (more than 30 year ago) the sync command works only on filesystems, not on block devices used by dd. I found this thread I will check, if I got time (the house is full in he next days :-))

Looks like the card itself (rather than the content) is not compatible with the R3. Try with another card and see if that helps.

tested it, dd was finished, but sync hangs after it and i see I/O on the card, so there is still a cache from dd which was not written to the card

1 Like

Sandisk 8 GB: above error (was written in 3,1 MB/s) similar Sandisk 8 GB: works (was written in 2,4 MBs) Noname 2 GB: above error (was written in 3,2 MB/s) Lync 8GB works Sandisk Ultra 16Gb other error

Failed to mount ext2 filesystem...
*** ERROR: Can't read GPT Entries ***
find_valid_gpt: *** ERROR: Invalid GPT ***
*** ERROR: Can't read GPT header ***
find_valid_gpt: *** ERROR: Invalid Backup GPT ***
*** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

It’s a good idea, to have more than one card at hand… In the future I’m using luci for updates, therefore the sdcard problem is a rare condition. Only wondering, I didn’t have such trouble during my R2 builds. Maybe since then I have new pc, new card writer.

JTFR Gotthard

Have you tried running “sync” after writing to the non-working cards?

Also dont use A2 class cards. Stay with A1

If you are running Linux, try the following that I found in Openwrt forum.

#wipe SD card include magic string, # is the actual letter of your SD card in /dev list.
sudo wipefs -a /dev/sd#

Ah, thats new for me. Will give it a try at next opportunity

thx for hint

Yeah, that did the trick. Many thanks Go

Maybe problem is gpt backup at the end of the disk which is not writen by image. Then you have main gpt at disk beginning which does not match the old gpt at the end.

Maybe it can be fixed with sgdisk/parted too: [BPI-R3] Debian Bullseye Image

If there is a question,which gpt to use take main one