Pi Zero format boards that are supported.

i found mbr to be better suited for arm boards. gpt takes the first 16k of the media and sometimes you need to have u-boot there.
 
you choose mbr vs gpt when you gpart create.
but if for your board u-boot does not collide with gpt data it does not matter if gpt or mbr is used
 
Everytime I reinstall the Ubuntu jammy to the sd card,it becomes corrupted :

Code:
marietto# dd if=radxa-zero3_ubuntu_jammy_xfce_b3.img | pv | dd of=/dev/da2

=>     34  8937663  da2  GPT  (238G) [CORRUPT]
       34    32734       - free -  (16M)
    32768    32768    1  ms-basic-data  (16M)
    65536   614400    2  efi  (300M)
   679936  8257761    3  efi  (3.9G)

and I'm not able to go on :

Code:
marietto# gpart delete -i1 /dev/da2                                      
gpart: table 'da2' is corrupt: Operation not permitted
 
Everytime I reinstall the Ubuntu jammy to the sd card,it becomes corrupted :
Its not per say corrupted but this is the problem:
You flash image to disk. Image File is 4GB and disk you flash it to is 8GB.
GPT partition scheme keeps a copy of the Partition Table in both Front of Disk (sectors 0-63) but also at end of disk.
You flash 4GB Image to a 8GB Disk and the partition table is not at end of disk. It was at the end of the Image File.
Simply run gpart recover da2.
That will place GPT Partition Table at end of actual disk.

Everything you need is on the UEFI wiki I posted above. See

Bootable UEFI memory stick or Hard Disk​


Perform the install to the UFS partition, as usual:
When you get to this step I would deviate and use ROCKPRO64 image with mdconfig; mount and copy files from image to da2p2.
There a tons of ways to do this this is just one. You could extract base from file.
 
Well I was going to build a custom u-boot for you but look what I see in the ports tree...
sysutils/u-boot-radxa-zero3

So for u-boot try:
pkg install -y u-boot-radxa-zero3

Then cd /usr/local/share/u-boot/u-boot-radxa-zero3

Then cat README

dd if=idbloader.img of=/dev/daX seek=64 bs=512 conv=sync
dd if=u-boot.itb of=/dev/daX seek=16384 bs=512 conv=sync
 
Worked good for me on Zero 3E with 14.3-STABLE

kenv [snipped]
Code:
smbios.bios.reldate="04/01/2025"
smbios.bios.revision="25.4"
smbios.bios.vendor="U-Boot"
smbios.bios.version="2025.04"
smbios.chassis.type="Unknown"
smbios.planar.maker="radxa"
smbios.planar.product="Radxa ZERO 3E"
smbios.system.maker="radxa"
smbios.system.product="Radxa ZERO 3E"
 
Worked good for me on Zero 3E with 14.3-STABLE

kenv [snipped]
Code:
smbios.bios.reldate="04/01/2025"
smbios.bios.revision="25.4"
smbios.bios.vendor="U-Boot"
smbios.bios.version="2025.04"
smbios.chassis.type="Unknown"
smbios.planar.maker="radxa"
smbios.planar.product="Radxa ZERO 3E"
smbios.system.maker="radxa"
smbios.system.product="Radxa ZERO 3E"

Did u try to set it to 720x720 ? The EDK2 code here: https://github.com/jaredmcneill/quartz64_uefi/releases works good for me,but only on my large 1920 x 1080 resolution monitor. Maybe a little bit under it,but not at 720x720.
 
I'm using 14.2-RELEASE now and it seems to be bugged :

Code:
marietto# make MAKE_JOBS_UNSAFE=yes install clean

===>   u-boot-radxa-zero3-2025.04 depends on executable: gsed - found
===>   u-boot-radxa-zero3-2025.04 depends on executable: swig - found
===>   u-boot-radxa-zero3-2025.04 depends on package: dtc>=1.4.1 - found
===>   u-boot-radxa-zero3-2025.04 depends on executable: mkimage - not found
===>  Building for u-boot-tools-2020.07
/usr/local/bin/gmake -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
set -e; mkdir -p include/config/;     echo "2020.07$(sh ./scripts/setlocalversion .)" < include/config/auto.conf > include/config/uboot.release.tmp; if [ -r include/config/uboot.release ] && cmp -s include/config/uboot.release include/config/uboot.release.tmp; then rm -f include/config/uboot.release.tmp; else : '  UPD     include/config/uboot.release'; mv -f include/config/uboot.release.tmp include/config/uboot.release; fi
set -e; mkdir -p include/generated/;     (echo \#define PLAIN_VERSION \"2020.07""\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define CC_VERSION_STRING \"$(LC_ALL=C cc --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : '  UPD     include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
set -e; mkdir -p include/generated/;     (if test -n "${SOURCE_DATE_EPOCH}"; then SOURCE_DATE="@${SOURCE_DATE_EPOCH}"; DATE=""; for date in gdate date.gnu date; do ${date} -u -d "${SOURCE_DATE}" >/dev/null 2>&1 && DATE="${date}"; done; if test -n "${DATE}"; then LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; LC_ALL=C ${DATE} -u -d "${SOURCE_DATE}" +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; else return 42; fi; else LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; LC_ALL=C date +'#define U_BOOT_TIME "%T"'; LC_ALL=C date +'#define U_BOOT_TZ "%z"'; LC_ALL=C date +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; LC_ALL=C date +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; fi) < Makefile > include/generated/timestamp_autogenerated.h.tmp; if [ -r include/generated/timestamp_autogenerated.h ] && cmp -s include/generated/timestamp_autogenerated.h include/generated/timestamp_autogenerated.h.tmp; then rm -f include/generated/timestamp_autogenerated.h.tmp; else : '  UPD     include/generated/timestamp_autogenerated.h'; mv -f include/generated/timestamp_autogenerated.h.tmp include/generated/timestamp_autogenerated.h; fi
/usr/local/bin/gmake -f ./scripts/Makefile.build obj=tools
  echo "#include <../lib/crc8.c>" >tools/lib/crc8.c
tools/Makefile:233: warning: pattern recipe did not update peer target 'tools/env/crc8.c'.
tools/Makefile:233: warning: pattern recipe did not update peer target 'tools/common/crc8.c'.
  cc -Wp,-MD,tools/lib/.crc8.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -I/usr/local/include   -DCONFIG_FIT_SIGNATURE -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 -include ./include/compiler.h -idirafterinclude -idirafter./arch/sandbox/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -std=gnu99 -pedantic -c -o tools/lib/crc8.o tools/lib/crc8.c
  cc  -Wl,-rpath,/usr/local/lib -fstack-protector-strong  -L/usr/local/lib -o tools/gen_ethaddr_crc tools/gen_ethaddr_crc.o tools/lib/crc8.o
  cc -Wp,-MD,tools/.mkenvimage.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -I/usr/local/include   -DCONFIG_FIT_SIGNATURE -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 -include ./include/compiler.h -idirafterinclude -idirafter./arch/sandbox/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -std=gnu99  -c -o tools/mkenvimage.o tools/mkenvimage.c
  cc  -Wl,-rpath,/usr/local/lib -fstack-protector-strong  -L/usr/local/lib -o tools/mkenvimage tools/mkenvimage.o tools/os_support.o tools/lib/crc32.o
  cc -Wp,-MD,tools/.aisimage.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -I/usr/local/include   -DCONFIG_FIT_SIGNATURE -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 -include ./include/compiler.h -idirafterinclude -idirafter./arch/sandbox/include -I./scripts/dtc/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -std=gnu99  -c -o tools/aisimage.o tools/aisimage.c
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/sandbox/include/asm/byteorder.h:20:
In file included from include/linux/byteorder/little_endian.h:13:
/usr/local/include/linux/types.h:9:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs 'unsigned long long')
    9 | typedef uint64_t __u64;
      |                  ^
include/asm-generic/int-ll64.h:29:42: note: previous definition is here
   29 | __extension__ typedef unsigned long long __u64;
      |                                          ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/sandbox/include/asm/byteorder.h:20:
In file included from include/linux/byteorder/little_endian.h:13:
/usr/local/include/linux/types.h:22:17: error: typedef redefinition with different types ('int64_t' (aka 'long') vs 'long long')
   22 | typedef int64_t __s64;
      |                 ^
include/asm-generic/int-ll64.h:28:44: note: previous definition is here
   28 | __extension__ typedef __signed__ long long __s64;
      |                                            ^
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/sandbox/include/asm/byteorder.h:20:
include/linux/byteorder/little_endian.h:45:15: error: unknown type name '__le64'
   45 | static inline __le64 __cpu_to_le64p(const __u64 *p)
      |               ^
include/linux/byteorder/little_endian.h:47:18: error: use of undeclared identifier '__le64'
   47 |         return (__force __le64)*p;
      |                         ^
include/linux/byteorder/little_endian.h:49:42: error: unknown type name '__le64'
   49 | static inline __u64 __le64_to_cpup(const __le64 *p)
      |                                          ^
include/linux/byteorder/little_endian.h:53:15: error: unknown type name '__le32'
   53 | static inline __le32 __cpu_to_le32p(const __u32 *p)
      |               ^
include/linux/byteorder/little_endian.h:55:18: error: use of undeclared identifier '__le32'
   55 |         return (__force __le32)*p;
      |                         ^
include/linux/byteorder/little_endian.h:57:42: error: unknown type name '__le32'
   57 | static inline __u32 __le32_to_cpup(const __le32 *p)
      |                                          ^
include/linux/byteorder/little_endian.h:61:15: error: unknown type name '__le16'
   61 | static inline __le16 __cpu_to_le16p(const __u16 *p)
      |               ^
include/linux/byteorder/little_endian.h:63:18: error: use of undeclared identifier '__le16'
   63 |         return (__force __le16)*p;
      |                         ^
include/linux/byteorder/little_endian.h:65:42: error: unknown type name '__le16'
   65 | static inline __u16 __le16_to_cpup(const __le16 *p)
      |                                          ^
include/linux/byteorder/little_endian.h:69:15: error: unknown type name '__be64'
   69 | static inline __be64 __cpu_to_be64p(const __u64 *p)
      |               ^
include/linux/byteorder/little_endian.h:71:18: error: use of undeclared identifier '__be64'
   71 |         return (__force __be64)__swab64p(p);
      |                         ^
include/linux/byteorder/little_endian.h:73:42: error: unknown type name '__be64'
   73 | static inline __u64 __be64_to_cpup(const __be64 *p)
      |                                          ^
include/linux/byteorder/little_endian.h:77:15: error: unknown type name '__be32'
   77 | static inline __be32 __cpu_to_be32p(const __u32 *p)
      |               ^
include/linux/byteorder/little_endian.h:79:18: error: use of undeclared identifier '__be32'
   79 |         return (__force __be32)__swab32p(p);
      |                         ^
include/linux/byteorder/little_endian.h:81:42: error: unknown type name '__be32'
   81 | static inline __u32 __be32_to_cpup(const __be32 *p)
      |                                          ^
include/linux/byteorder/little_endian.h:85:15: error: unknown type name '__be16'
   85 | static inline __be16 __cpu_to_be16p(const __u16 *p)
      |               ^
include/linux/byteorder/little_endian.h:87:18: error: use of undeclared identifier '__be16'
   87 |         return (__force __be16)__swab16p(p);
      |                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[1]: *** [scripts/Makefile.host:112: tools/aisimage.o] Error 1
gmake: *** [Makefile:1995: tools-only] Error 2
*** Error code 1

Can you dd your u-boot sectors to a file and send it to me,please ?
 
I've used the latest packages instead of quarterly and I've been able to install the package. So :

Code:
=>     40  2097072  da2  GPT  (119G) [CORRUPT]
       40       24       - free -  (12K)
       64    16320    1  linux-data  (8.0M)
    16384    16384    2  linux-data  (8.0M)
    32768    98304       - free -  (48M)
   131072    65536    3  efi  (32M)
   196608  1900504    4  freebsd-ufs  (928M)

marietto# cd /usr/local/share/u-boot/u-boot-radxa-zero3 

marietto# dd if=idbloader.img of=/dev/da2 seek=64 bs=512 conv=sync

392+0 records in
392+0 records out
200704 bytes transferred in 0.677814 secs (296105 bytes/sec)

marietto# dd if=u-boot.itb of=/dev/da2 seek=16384 bs=512 conv=sync 

2455+0 records in
2455+0 records out
1256960 bytes transferred in 2.747381 secs (457512 bytes/sec)

let's see how it goes.
 
Can you tell me what's the image file that should I use to dd those files ? It is correct to do as below ?

Code:
# dd if=idbloader.img of=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img seek=64 bs=512 conv=sync
# dd if=u-boot.itb of=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img seek=16384 bs=512 conv=sync
 
No that is not correct.
Flash the ROCKPRO image to microSD card and then flash u-boot to the same microSD card.
 
I normally use mdconfig to flash u-boot to a image file. I never considered working on the image file itself. It is similar to how I expand an image file by adding zeros to end of file.
 
No that is not correct. Flash the ROCKPRO image to microSD card and then flash u-boot to the same microSD card.

Code:
marietto# dd if=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img | pv | dd of=/dev/da2

=>      40  10485680  da2  GPT  (119G) [CORRUPT]
40 32728 - free - (16M)
     32768    102400    1  efi  (50M)
    135168  10350464    2  freebsd-ufs  (4.9G)
10485632 88 - free - (44K)

marietto# dd if=idbloader.img of=/dev/da2 seek=64 bs=512 conv=sync 
392+0 records in
392+0 records out
200704 bytes transferred in 0.649936 secs (308806 bytes/sec)

marietto# dd if=u-boot.itb of=/dev/da2 seek=16384 bs=512 conv=sync
2455+0 records in

BLACK SCREEN.
 
Code:
# dd if=idbloader.img of=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img seek=64 bs=512 conv=sync,notrunc
# dd if=u-boot.itb of=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img seek=16384 bs=512 conv=sync,notrunc
# dd if=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img | pv | dd of=/dev/sdh

Black screen.

Have you tried serial console. I have not checked if HDMI works.

Nope. I don't know how to use the serial console in this scenario. I did it on the Jetson Nano,but this time is different. Do you want to share a short and focused tutorial where I can learn ? (no man pages,thanks).
 
They are different only in ethernet interfaces. That is no big deal for u-boot.

I tried on one HDMI monitor I am considering for mobile use. No Luck. 1360x768 No Signal.

I believe u-boot has to be compiled with HDMI support for this to work. You would need to look at the configuration file.

I will try another monitor later. I had to scrounge to find Mini-HDMI cable. I have only one good HDMI screen. Rest only TV's with HDMI/VGA
 
covacat will get a kick out of this. I made an elaborate series of scripts to flash u-boot to my image after I run poudriere image. I then run a script to burn to media.

HIHO@SILVER:/poudriere/u-boot/rock3e # ./flash-mfs.sh
------------------------
Create Memory Disk of Image
md0
------------------------
Flashing U-Boot bootloader image
392+0 records in
392+0 records out
200704 bytes transferred in 0.049992 secs (4014723 bytes/sec)
------------------------
Flashing U-Boot
2455+0 records in
2455+0 records out
1256960 bytes transferred in 0.281419 secs (4466506 bytes/sec)
------------------------
Mount ESP partition
ls /mnt
EFI
------------------------
Creating DTB Dirctory

rockchip
------------------------
Copy DTB to ESP

rk3566-radxa-zero-3e.dtb

------------------------
UnMount Memory Disk

Detaching Memory Disk
------------------------
Detached

Showing Configured Memory Disks

------------------------
------------------------
Completed Flashing
------------------------
------------------------

Code:
HIHO@SILVER:/poudriere/u-boot/rock3e # cat flash-mfs.sh
#/bin/sh
echo ------------------------
echo Create Memory Disk of Image
mdconfig /poudriere/data/images/rock3e-mfs.img
echo ------------------------
echo Flashing U-Boot bootloader image
dd if=idbloader.img of=/dev/md0 bs=512 seek=64 conv=sync
echo ------------------------
echo Flashing U-Boot
dd if=u-boot.itb of=/dev/md0 bs=512 seek=16384 conv=sync
echo ------------------------
echo Mount ESP partition
mount -t msdos /dev/md0p1 /mnt
echo ls /mnt
ls /mnt
echo ------------------------
echo Creating DTB Dirctory
mkdir -p /mnt/dtb/rockchip
echo
ls /mnt/dtb
echo ------------------------
echo Copy DTB to ESP
cp rk3566-radxa-zero-3e.dtb /mnt/dtb/rockchip
echo
ls /mnt/dtb/rockchip
echo
echo ------------------------
echo UnMount Memory Disk
umount /mnt
echo

echo  Detaching Memory Disk
echo ------------------------
mdconfig -d -u md0
echo Detached
echo
echo Showing Configured Memory Disks
mdconfig -l
echo
echo ------------------------
echo ------------------------
echo Completed Flashing
echo ------------------------
echo ------------------------
 
You know what ?

Code:
# dd if=FreeBSD-14.2-RELEASE-arm64-aarch64-ROCKPRO64.img | pv | dd of=/dev/sdh

= black screen.

it does not want that image file.
 
covacat will get a kick out of this. I made an elaborate series of scripts to flash u-boot to my image after I run poudriere image. I then run a script to burn to media.



Code:
HIHO@SILVER:/poudriere/u-boot/rock3e # cat flash-mfs.sh
#/bin/sh
echo ------------------------
echo Create Memory Disk of Image
mdconfig /poudriere/data/images/rock3e-mfs.img
echo ------------------------
echo Flashing U-Boot bootloader image
dd if=idbloader.img of=/dev/md0 bs=512 seek=64 conv=sync
echo ------------------------
echo Flashing U-Boot
dd if=u-boot.itb of=/dev/md0 bs=512 seek=16384 conv=sync
echo ------------------------
echo Mount ESP partition
mount -t msdos /dev/md0p1 /mnt
echo ls /mnt
ls /mnt
echo ------------------------
echo Creating DTB Dirctory
mkdir -p /mnt/dtb/rockchip
echo
ls /mnt/dtb
echo ------------------------
echo Copy DTB to ESP
cp rk3566-radxa-zero-3e.dtb /mnt/dtb/rockchip
echo
ls /mnt/dtb/rockchip
echo
echo ------------------------
echo UnMount Memory Disk
umount /mnt
echo

echo  Detaching Memory Disk
echo ------------------------
mdconfig -d -u md0
echo Detached
echo
echo Showing Configured Memory Disks
mdconfig -l
echo
echo ------------------------
echo ------------------------
echo Completed Flashing
echo ------------------------
echo ------------------------

I didn't understand if doing all this will result in a HDMI working or not.
 
Back
Top
OSZAR »