(Excuse my previous post was sent draft/incomplete)
Hi, I'm trying to do same thing: "boot orange pi zero from SPI FLASH+USB pendrive without SD card".
I think I followed all steps mention above but boot sequence is failing leading to a reset loop.
This is all I have done:
Soldered W25Q64 (8MB) SPI FLASH on Orange Pi Zero board.
Flashed SD card with Armbian_5.30_Orangepizero_Ubuntu_xenial_default_3.4.113.7z, followed all procedure (update, upgrade, etc)
Booted from SD without any issue.
Plugged 8GB pendrive in USB near ethernet connector
Installed armbian on pendrive (using armbian-config / install to sd nand ... menu)
Reboot, boot OK from pendrive.
dd if=/dev/zero count=4096 bs=1K | tr '\000' '\377' > spi.img
dd if=/usr/lib/linux-u-boot-dev-orangepizero_5.24_armhf/u-boot-sunxi-with-spl.bin of=spi.img bs=1k conv=notrunc
apt-get install flashrom
flashrom -p linux_spi:dev=/dev/spidev0.0 -w spi.img
flashrom error:
Error: Image size (2097152 doesn't match the flash chip's size (8388608 B)!
truncate spi.img -s 8388608
flashrom -p linux_spi:dev=/dev/spidev0.0 -w spi.img
shutdown -h now
Power off, removed sd card, power on
Boot log (failing):
U-Boot SPL 2017.05-armbian (Jun 15 2017 - 03:38:31)
DRAM: 256 MiB
Trying to boot from sunxi SPI
U-Boot 2017.05-armbian (Jun 15 2017 - 03:38:31 +0200) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Zero
DRAM: 256 MiB
MMC: SUNXI SD/MMC: 0
MMC: no card present
mmc_init: -123, time 2
*** Warning - MMC init failed, using default environment
In: serial
Out: serial
Err: serial
Net: phy interface0
eth0: ethernet@1c30000
Hit any key to stop autoboot: 0
MMC: no card present
mmc_init: -123, time 2
MMC: no card present
mmc_init: -123, time 1
** Bad device mmc 0 **
MMC: no card present
mmc_init: -123, time 2
MMC: no card present
mmc_init: -123, time 2
** Bad device mmc 0 **
MMC: no card present
mmc_init: -123, time 2
starting USB...
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
USB device 0:
Device 0: Vendor: Generic- Rev: 1.00 Prod: SD/MMC
Type: Removable Hard Disk
Capacity: 7599.0 MB = 7.4 GB (15562752 x 512)
... is now current device
Scanning usb 0:1...
BOOTP broadcast 1
data abort
pc : [<4ff9a84c>] lr : [<000052c6>]
reloc pc : [<4a03984c>] lr : [<fa0a42c6>]
sp : 4bf3c940 ip : 00000000 fp : 4ffecff8
r10: 4ffecb4c r9 : 4bf40ee8 r8 : 0000000e
r7 : 4ffeee84 r6 : 4ffeee8c r5 : 00000000 r4 : 4ffed04e
r3 : 00060101 r2 : 00000008 r1 : 4ffecffe r0 : 0000000e
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
And keep rebooting and reseting over and over.
What I am doing wrong? MANY THANKS!!!
FOUND SOLUTION AFTER POSTED. NOW FIXED AND WORKING UHuuuuuu
I finally CAN boot from SPI flash+USB pendrive with NO SD card inserted.
Below are steps I did following all above and finally solved:
Copied /boot directory from SD card to PENDRIVE with armbian image (which had an empty /boot directory...).
Booted with both SD and PENDRIVE inserted
edited /boot/boot.cmd, set: "setenv rootdev "/dev/sda1", save.
compiled boot.cmd with: mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
edited /etc/fstab, commented lines for: /media/mmcboot and /boot
shutdown -h now
power off
removed SD
power on, boot
Voila!!! worked: booted from SPI FLASH + PENDRIVE with no SD inserted.
Sorry about my posts going back and forward.
Regards,
Adrian