trev83 Posted August 13 Posted August 13 I have an orange pi zero3 with 2gb of ram. Ive installed the current 6.18.43 armbian debian build. It booted fine from SD and I then flashed the boot rom to the eeprom so I could boot from USB (sudo flashcp /usr/lib/linux-u-boot-current-orangepizero3/u-boot-sunxi-with-spl.bin /dev/mtd0) I was able to boot from USB0 fine but not from the USB ports USB1 and 2 on the 13 pin header. With the help of google and some ai I found that if I run the following my sd card is recognised when plugged into usb1 fdt addr bbf107b0 fdt set /soc/usb@5310000 status "okay" bind /soc/usb@5310000 ehci_generic usb reset usb storage That produced: Bus usb@5310000: 2 USB Device(s) found 1 Storage Device(s) found Kingston DataTraveler 3.0 57.7 GB The uboot seems to be missing the commands for the other usb ports. fdt addr ${fdtcontroladdr} Working FDT set to bbf107b0 => fdt set /soc/usb@5310000 status okay => fdt print /soc/usb@5310000 usb@5310000 { compatible = "allwinner,sun50i-h616-ehci", "generic-ehci"; reg = <0x05310000 0x00000100>; interrupts = <0x00000000 0x0000001e 0x00000004>; clocks = <0x00000002 0x0000006a 0x00000002 0x0000006e 0x00000002 0x00000064>; resets = <0x00000002 0x0000002c 0x00000002 0x00000030>; phys = <0x0000001e 0x00000002>; phy-names = "usb"; status = "okay"; phandle = <0x00000054>; }; => fdt set /soc/usb@5310400 status okay => fdt set /soc/usb@5311000 status okay => fdt set /soc/usb@5311400 status okay => bind /soc/usb@5310000 ehci_generic => bind /soc/usb@5310400 ohci_generic => bind /soc/usb@5311000 ehci_generic => bind /soc/usb@5311400 ohci_generic => usb reset resetting USB... USB EHCI 1.00 USB OHCI 1.0 USB EHCI 1.00 USB OHCI 1.0 USB EHCI 1.00 USB OHCI 1.0 Bus usb@5200000: 1 USB Device(s) found Bus usb@5200400: 1 USB Device(s) found Bus usb@5310000: 2 USB Device(s) found Bus usb@5310400: 1 USB Device(s) found Bus usb@5311000: 1 USB Device(s) found Bus usb@5311400: 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found => does anyone have any advice on how i can update the image file code to support the additional usb ports. Ive tried looking at how to rebuild the u-boot-sunxi-with-spl.bin but could do with some guidance as ive not done this before. Many thanks Trev 0 Quote
Solution trev83 Posted August 18 Author Solution Posted August 18 Hi all i have an update. Ive managed to get it to work. Ive never done anything like this but hopefully this will help someone else. Im not sure the steps are correct but the change to uboot worked and i can now boot from usb1 not just usb0 so when your making your build and it asks about patch files ""Press ENTER to show a preview of your patch, or type 'stop' to stop patching..."" , in another window i ran. cd build/cache/sources/u-boot-worktree/u-boot/v2026.07 find . -iname "*orangepi-zero3*" grep -rn "ehci2\|ohci2\|ehci3\|ohci3\|usb@531" dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi cat > arch/arm/dts/sun50i-h618-orangepi-zero3-u-boot.dtsi << 'EOF' #include "sunxi-u-boot.dtsi" &ehci2 { status = "okay"; }; &ohci2 { status = "okay"; }; &ehci3 { status = "okay"; }; &ohci3 { status = "okay"; }; EOF then i dropped back and carried on and i got File: /home/armbian/build/output/patch/u-boot-sunxi64-current.patch i then did this. Move the patch into userpatches mkdir -p /home/armbian/build/userpatches/u-boot/v2026.07-sunxi64 cp /home/armbian/build/output/patch/u-boot-sunxi64-current.patch /home/armbian/build/userpatches/u-boot/v2026.07-sunxi64/ check its there ls /home/armbian/build/userpatches/u-boot/v2026.07-sunxi64/ Run the real build export PREFER_DOCKER=no ./compile.sh uboot BOARD=orangepizero3 BRANCH=current RELEASE=trixie BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no ARTIFACT_IGNORE_CACHE=yes when it finished i ran find cache/sources/u-boot-worktree -name "u-boot-sunxi-with-spl.bin" and it returned cache/sources/u-boot-worktree/u-boot/v2026.07/u-boot-sunxi-with-spl.bin i tested it by putting it on an sd card and plugging a bootable usb drive into usb1 (on the 13pin header) and went into uboot and ran usb start usb tree you should see (Please not i hadnt removed the usb from the inital usb0 socket hence the two drives found) => usb start starting USB... USB EHCI 1.00 USB OHCI 1.0 USB EHCI 1.00 USB OHCI 1.0 USB EHCI 1.00 USB OHCI 1.0 Bus usb@5200000: 2 USB Device(s) found Bus usb@5200400: 1 USB Device(s) found Bus usb@5310000: 2 USB Device(s) found Bus usb@5310400: 1 USB Device(s) found Bus usb@5311000: 1 USB Device(s) found Bus usb@5311400: 1 USB Device(s) found scanning usb for storage devices... 2 Storage Device(s) found => usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Mass Storage (480 Mb/s, 100mA) MXTronics MXT USB Device 150101v01 1 Hub (12 Mb/s, 0mA) U-Boot Root Hub 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Mass Storage (480 Mb/s, 100mA) Kingston DataTraveler 3.0 E0D55EA573F01A4119E00696 1 Hub (12 Mb/s, 0mA) U-Boot Root Hub 1 Hub (480 Mb/s, 0mA) u-boot EHCI Host Controller 1 Hub (12 Mb/s, 0mA) U-Boot Root Hub i then tested booting from usb 1 which was fine. so i then wrote the file with. sudo flashcp cache/sources/u-boot-worktree/u-boot/v2026.07/u-boot-sunxi-with-spl.bin /dev/mtd0 Now i need to workout SPI and GPIO control for my home tv control project. Trev 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.