Can Boot From One uSD But Not Another

Have a PNY 32GB microSDHC and a SanDisk 16GB microSDHC, both being flashed with etcher, both using Armbian_22.08.0-trunk_Radxa-zero_focal_current_5.10.119_xfce_desktop.img.xz. The PNY loads just fine, but the SanDisk will not despite multiple attempts. Also attempted to flash the image with Rufus with the flag for checking bad blocks on and the SanDisk passed.

Debug for reference:

G12A:BL:0253b8:61aa2d;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.0
                                        l2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0001 - pwm id 0x00
bl2_stage_init 0xc0
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:00008067
L3:04000000
S1:00000000
B2:00002000
B1:e0f83180

TE: 254391

BL2 Built : 15:21:48, Aug 28 2019. g12a g1bf2b53 - luan.yuan@droid15-sz

Board ID = 2
Set cpu clk to 24M
Set clk81 to 24M
CPU clk: 1200 MHz
Set clk81 to 166.6M
DDR driver_vesion: LPDDR4_PHY_V_0_1_18 build time: Aug 28 2019 15:21:45
board id: 2
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
fastboot data verify
verify result: 266
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
LPDDR4 probe
ddr clk to 792MHz
Load ddrfw from SD, src: 0x0003c200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0000
Check phy result
INFO : ERROR : Training has failed!
1D training failed
Cfg max: 2, cur: 2. Board id: 255. Force loop cfg
LPDDR4 probe
ddr clk to 792MHz
Load ddrfw from SD, src: 0x0003c200, des: 0xfffd0000, size: 0x0000c000, part: 0

dmc_version 0000
Check phy result
INFO : End of CA training
INFO : End of initialization
INFO : Training has run successfully!
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of Write leveling coarse delay
INFO : Training has run successfully!
Check phy result
INFO : End of initialization
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00048200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

channel==0
RxClkDly_Margin_A0==256 ps 13
TxDqDly_Margin_A0==256 ps 13
RxClkDly_Margin_A1==0 ps 0
TxDqDly_Margin_A1==0 ps 0
TrainedVREFDQ_A0==74
TrainedVREFDQ_A1==0
VrefDac_Margin_A0==31
DeviceVref_Margin_A0==40
VrefDac_Margin_A1==0
DeviceVref_Margin_A1==0


channel==1
RxClkDly_Margin_A0==236 ps 12
TxDqDly_Margin_A0==256 ps 13
RxClkDly_Margin_A1==0 ps 0
TxDqDly_Margin_A1==0 ps 0
TrainedVREFDQ_A0==74
TrainedVREFDQ_A1==0
VrefDac_Margin_A0==32
DeviceVref_Margin_A0==40
VrefDac_Margin_A1==0
DeviceVref_Margin_A1==0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0004

soc_vref_reg_value 0x 00000019 00000018 0000001b 0000001a 0000001b 0000001a 00000019 0000001c 0000001a 00000018 0000001a 0000001a 00000019 0000001b 00000019 0000001b 0000001c 00000019 0000001d 0000001b 0000001c 0000001b 0000001b 0000001a 00000018 0000001a 0000001b 00000018 00000017 00000017 00000016 00000017 dram_vref_reg_value 0x 00000061
2D training succeed
aml_ddr_fw_vesion: LPDDR4_PHY_V_0_1_18 build time: Aug 28 2019 13:53:31
auto size-- 65535DDR cs0 size: 1024MB
DDR cs1 size: 0MB
DMC_DDR_CTRL: 00c0002bDDR size: 1024MB
cs0 DataBus test pass
cs0 AddrBus test pass

100bdlr_step_size ps== 481
result report
boot times 0Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SD, src: 0x0006c200, des: 0x0175c000, size: 0x00098000, part: 0
bl2z: ptr: 05129330, size: 00001e40
0.0;M3 CHK:0;cm4_sp_mode 0
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12a_v1.1.3390-6ac5299 2019-09-26 14:09:46 luan.yuan@droid15-sz]
OPS=0x30
ring efuse init
28 0c 30 00 01 02 23 00 00 19 35 36 32 43 46 50
[0.017149 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):4fc40b1
NOTICE:  BL31: Built : 15:57:33, May 22 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2022.01-armbian (Jun 02 2022 - 02:57:04 +0000) radxa-zero

Model: Radxa Zero
SoC:   Amlogic Meson G12A (S905Y2) Revision 28:c (30:2)
DRAM:  1 GiB
MMC:   sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
8025 bytes read in 3 ms (2.6 MiB/s)
## Executing script at 08000000
U-boot default fdtfile: amlogic/meson-g12a-radxa-zero.dtb
Current variant:
126 bytes read in 1 ms (123 KiB/s)
Current fdtfile after armbianEnv: amlogic/meson-g12a-radxa-zero.dtb
Mainline bootargs: root=UUID=066eff29-ee04-40cc-8504-64a7b298c01d rootwait rootfstype=ext4 bootsplash.bootfile=bootsplash.armbian console=ttyAML0,115200 console=tty1 consoleblank=0 coherent_pool=2M loglevel=1 ubootpart=ba50b4a9-01 libata.force=noncq usb-storage.quirks=    cgroup_enable=memory swapaccount=1
 ** fs_devread read error - block
Failed to load '/boot/uInitrd'
 ** fs_devread read error - block
Failed to mount ext2 filesystem...
Can't set block device
 ** fs_devread read error - block
Failed to mount ext2 filesystem...
Can't set block device
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
 ** fs_devread read error - block
Failed to mount ext2 filesystem...
Can't set block device
 ** fs_devread read error - block
Failed to mount ext2 filesystem...
Bad Linux ARM64 Image magic!
SCRIPT FAILED: continuing...
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
Scanning disk sd@ffe03000.blk...
Disk sd@ffe03000.blk not ready
Scanning disk sd@ffe05000.blk...
 ** fs_devread read error - block
Failed to mount ext2 filesystem...
Card did not respond to voltage select! : -110
Scanning disk mmc@ffe07000.blk...
Disk mmc@ffe07000.blk not ready
Found 1 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
** No partition table - mmc 1 **
Couldn't find partition mmc 1:1
Card did not respond to voltage select! : -110
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
No ethernet found.
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
Retrieving file: pxelinux.cfg/000000
No ethernet found.
Retrieving file: pxelinux.cfg/00000
No ethernet found.
Retrieving file: pxelinux.cfg/0000
No ethernet found.
Retrieving file: pxelinux.cfg/000
No ethernet found.
Retrieving file: pxelinux.cfg/00
No ethernet found.
Retrieving file: pxelinux.cfg/0
No ethernet found.
Retrieving file: pxelinux.cfg/default-arm-meson-u200
No ethernet found.
Retrieving file: pxelinux.cfg/default-arm-meson
No ethernet found.
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
No ethernet found.
=>

Please give this test build of U-Boot a try and see if that solves your issue: Trying to figure out whats wrong with my radxa zero

Once we get more feedback on the effectiveness of this fix we will looking to have it as part of our image.

1 Like

Thanks for the reply Yuntian, when I get some time I’ll test it out and mark your reply as the solution if it works.

Finally had time to test this. Took me a bit to realize I shouldn’t be trying to follow the other post exactly, as it is specific to boards with the eMMC. Just had to pull the uSD, pop it into a USB uSD reader, then into my Ubuntu test machine, and run the dd commands against the /dev disk. After that the SanDisk 16GB microSDHC works great! Thanks Yuntian!