Bricked Radxa Zero? "** Invalid partition 1 **"

So, I was flashing the 13GB large TwisterOS.Armbian.Focal.Radxa-Zero.Beta4.img when it failed in the middle of flashing using Etcher.

Now, when load “rz-udisk-loader.bin” I get the attached failure. I can’t seem to recover from this, erasing the eMMC again has no effect.

I guess my Radxa Zero is bricked?

....
INFO : Training has run successfully!
1D init succeed
DATA transfer complete...
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==236 ps 12
TxDqDly_Margin_A0==236 ps 12
RxClkDly_Margin_A1==236 ps 12
TxDqDly_Margin_A1==216 ps 11
TrainedVREFDQ_A0==74
TrainedVREFDQ_A1==74
VrefDac_Margin_A0==24
DeviceVref_Margin_A0==40
VrefDac_Margin_A1==23
DeviceVref_Margin_A1==40


channel==1
RxClkDly_Margin_A0==216 ps 11
TxDqDly_Margin_A0==236 ps 12
RxClkDly_Margin_A1==236 ps 12
TxDqDly_Margin_A1==236 ps 12
TrainedVREFDQ_A0==74
TrainedVREFDQ_A1==74
VrefDac_Margin_A0==25
DeviceVref_Margin_A0==40
VrefDac_Margin_A1==24
DeviceVref_Margin_A1==40

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

soc_vref_reg_value 0x 00000013 00000016 00000012 00000014 00000015 00000013 00000014 00000014 00000013 00000014 00000014 00000016 00000015 0
2D init succeed
ddr init done, boot next stage
result report
aml_ddr_fw_vesion: LPDDR4_PHY_V_0_1_18 build time: Aug 28 2019 13:53:31
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00e00024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
DATA transfer complete...
DATA transfer complete...
Data req end
DATA transfer complete...
RUN bl2 usb boot
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 0b 30 00 01 16 26 00 00 14 35 39 53 42 56 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!
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2021.01-00042-g1e3a71b1dd (Sep 09 2021 - 20:42:32 +0800) radxazero

Model: Radxa Zero
SoC:   Amlogic Meson G12A (Unknown) Revision 28:b (30:2)
DRAM:  3.8 GiB
MMC:   sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial@3000
Out:   serial@3000
Err:   serial@3000
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
** Invalid partition 1 **
=>

You didn’t need to extract the 3.2GB img.xz TwisterOS Beta4 image, that’s only necessary when you transfer or manually copy extracted 13GB TwisterOS Beta4 image to uSD(MicroSD) or eMMC using dd commands. When using Etcher you use 3.2Gb downloaded TwisterOS Beta4 image for Zero.

How were you exactly flashing a extracted 13GB TwisterOS image to eMMC using Etcher, was it to eMMC right? Can you still boot from uSD(microSD) with a TwisterOS image? What’s the eMMC size?

If you still can boot from uSD, then go into CLI(Command Line) and delete eMMC contents/partition:

sudo dd if=/dev/zero of=/dev/mmcblk2 bs=1M count=100

sudo reboot

1 Like

Yes, I was flashing the to the eMMC, I have a 4/16GB model.

If I insert an uSD right now with TwisterOS installed and without touching anything I end up in the USB boot loader and nothing further happens:

G12A:BL:0253b8:61aa2d;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:0;READ:0;CHK:1F;READ:0;CHK:1F;READ:0;CHK:1F;SD?:0;SD:0;READ:0;CHK:1F;USB:8;

And yes, the SD card is the right side up :slight_smile:, pins point towards the board.

I had the same problem. You have to use the linux fastboot commands to erase the emmc completely. With the windows tool, it looks like erasing is not working correctly (there is no error)

sudo fastboot flashing unlock_critical
sudo fastboot flashing unlock
sudo fastboot erase bootloader
sudo fastboot erase bootloader-boot0
sudo fastboot erase bootloader-boot1
2 Likes

Another thread finally mentioned what the correct command sequence is. I spent hours on this… Frustrating that the documentation is so bad.

Install prerequisites:

sudo apt install python3-pip curl
sudo pip3 install pyamlboot
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)

That bash script above is somewhat broken on some distros and will not correctly add ~/.nexustools to PATH. You might have to do this by hand or use ~/.nexustools/fastboot directly.

Then get these images:

wget https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin
wget https://dl.radxa.com/zero/images/loader/rz-fastboot-loader.bin
wget https://dl.radxa.com/zero/images/loader/factory-loader.img

Replug the Zero with the USB button pressed. Then do this one time only:

sudo boot-g12.py factory-loader.img
sudo fastboot flashing unlock_critical
sudo fastboot flashing unlock

Replug the Zero with the USB button pressed. Then erase the entirety of the eMMC (can be done many times):

sudo boot-g12.py rz-fastboot-loader.bin
sudo fastboot erase bootloader
sudo fastboot erase 0
sudo fastboot erase 1

Replug the Zero with the USB button pressed. After that we can go into usb-disk mode to use Etcher:

sudo boot-g12.py rz-udisk-loader.bin

Of note: It’s really useful to use the UART port for debugging. I don’t see how I would have ever figured it out otherwise. Not very user friendly for sure. But that leads me to a much bigger concern: UART1 is not user accessible anymore. My plan was to investigate if the Radxa Zero could be used as a drop in replacement for a Raspberry Zero for use in a Prusa 3D printer. In the way the UART1 port is used right now that will not work since the Einsy RAMBo expects UART1 to be a normal serial device :-(((

1 Like