U-boot sd boot from radxa github

Ubuntu 20.04

sudo apt install bc nano mc build-essential autoconf libtool cmake pkg-config git python-dev swig3.0 libpcre3-dev libnode-dev gawk wget diffstat bison flex device-tree-compiler libncurses5-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binfmt-support

git clone https://github.com/radxa/u-boot.git
git checkout radxa-zero-v2021.01
cd u-boot
export ARCH=arm
export CROSS_COMPILE=aarch64-linux-gnu-
make radxa-zero_defconfig
make
export UBOOTDIR=$PWD
cd ..
git clone https://github.com/radxa/fip.git
cd fip/radxa-zero
cp $UBOOTDIR/u-boot.bin bl33.bin
make
df #Find usb boot partition /dev name /dev/sdc1 in this instance
sudo dd if=u-boot.bin.sd.bin of=/dev/sdc1 bs=512 seek=1 #?
sync

I am doing this wrong as write to eMMC/SD offset 0x200 to boot.
So x200 = d512 so the seek is the 1st block or should I have done seek=2 as its not 0 based?

sudo dd if=u-boot.bin.sd.bin of=/dev/sdc1 bs=512 seek=1 #?

This should be

sudo dd if=u-boot.bin.sd.binof=/dev/sdc conv=fsync,notrunc bs=1 count=444
sudo dd if=u-boot.bin.sd.bin of=/dev/sdc conv=fsync,notrunc bs=512 skip=1 seek=1

Just to skip the MBR partition table in the SD card.

2 Likes

For eMMC, the offset is 0x200, 2nd sector.

sudo dd if=u-boot.bin of=/dev/sdc bs=512 seek=1
2 Likes

Trying to boot armbian on the board unsuccesfully, maybe you can help me
https://armbian.lane-fu.com/linx/ygo1z4sd.txt

Thought this might be useful @jack

=> mmc list
sd@ffe03000: 0
sd@ffe05000: 1
mmc@ffe07000: 2
=> mmcinfo
Card did not respond to voltage select! : -110
=> mmc rescan
Card did not respond to voltage select! : -110
=> mmc dev 0 1
Card did not respond to voltage select! : -110
=> mmc dev 1 1
switch to partitions #1, ERROR
=> mmc dev 2 1
Card did not respond to voltage select! : -110

1 Like

@sven have you got it working already?

Yes I did, following the steps from radxa zero introduction thread

Without doing the dd u-boot.bin.sd.bin I get

~Û¿çŸÃîî°þþ°÷üŸÿìl»ß›¼¿¿îü|7ÿ;~þ¿;¼÷ãÃûÛÃÃÃÿÿçÛü¿¸ÿþÿ¿¼¸¸ÿïxÏ¿¼îßæûÃÿÿSD:400;USB:8;LOOP:1;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:2;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:3;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:4;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:5;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:6;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:7;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:8;EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:9;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:A;EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:B;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:C;EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:D;EMMC:800;NAND:81;SD?:0;SD:400;USB:8;LOOP:E;EMMC:800;NAND:81;SD?:0;SD:400;USB:8;

With DD u-boot.bin.sd.bin just a repetition also

~▒▒Fixed PLL lock failed
BL:0253b8:61aa2d;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;▒xϿ▒▒▒▒?▒▒▒SD:800;USB:8;LOOP:1;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:2;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:3;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:4;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:5;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;

Its usually me so what am I doing wrong :slight_smile:

@jack

If people would prefer to use mainline u-boot (2021.07) this is u-boot.bin.sd.bin:

https://chewitt.libreelec.tv/testing/u-boot/u-boot.bin.sd.bin-radxa-zero

4 Likes

Sources are here: https://github.com/chewitt/u-boot/commits/amlogic-2021.07 (see last two commits) which are based on the initial device-tree I’ve submitted to the kernel and a Linux oriented defconfig similar to other G12 devices. The FIP sources used here are: https://github.com/LibreELEC/amlogic-boot-fip/tree/master/radxa-zero

3 Likes

are the datasheet of s905d3 and the datasheet of s905y3 same ?

s905y3 is a subset of s905d3, but as far as i know s905y3 is cancelled. It seems the power consumption can not meet power from HDMI port requirements, so amlogic jumps to s905y4, which quad a35, less powerful but more power efficient.