Hello!
I want to try NixOS on my Omnia, but since I saw references to EFI in U-Boot, wanted to see if I can get it to boot using systemd-boot, since that’s what I’m using everywhere else as well. I’ve gotten to the point where it looks like U-Boot is loading the EFI executable but after that it panics and resets.
Right now I have this on a USB stick with an EFI partition which has systemd-boot and the dtb file (armada-385-turris-omnia.dtb) on it, which was necessary to get this far. Now I’m kinda stuck though.
How would I get this to work/can it even load EFI executables at all? Not entirely sure how it works on non-x86 computers.
Here’s the console output of what I’m doing. The last error is weird since it’s a FS read error, but it could clearly already find the EFI executable before.
U-Boot SPL 2015.10-rc2 (Oct 06 2020 - 03:14:44)
High speed PHY - Version: 2.0
SERDES0 card detect: PEX
Initialize Turris board topology
Detected Device ID 6820
board SerDes lanes topology details:
| Lane # | Speed | Type |
--------------------------------
| 0 | 5 | PCIe0 |
| 1 | 5 | USB3 HOST0 |
| 2 | 5 | PCIe1 |
| 3 | 5 | USB3 HOST1 |
| 4 | 5 | PCIe2 |
| 5 | 0 | SGMII2 |
--------------------------------
:** Link is Gen1, check the EP capability
PCIe, Idx 0: remains Gen1
:** Link is Gen1, check the EP capability
PCIe, Idx 1: Link upgraded to Gen2 based on client cpabilities
PCIe, Idx 2: detected no link
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.29.0
Memory config in EEPROM: 0x02
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully
U-Boot 2019.07 (Oct 05 2020 - 23:50:39 +0000), Build: jenkins-turris-os-packages-dragons-omnia-1753
SoC: MV88F6820-A0 at 1600 MHz
DRAM: 2 GiB (800 MHz, 32-bit, 2T, ECC not enabled)
Disabling MCU watchdog... disabled
WDT: Started with servicing (60s timeout)
MMC: mv_sdh: 0
Loading Environment from SPI Flash... SF: Detected s25fl164k with page size 256 Bytes, erase size 4 KiB, total 8 MiB
OK
Model: Turris Omnia
Turris Omnia:
RAM size: 2048 MiB
Serial Number: 0000000E700166D5
Regdomain set to **
Net: eth0: ethernet@70000, eth1: ethernet@30000, eth2: ethernet@34000
Hit any key to stop autoboot: 0
=> printenv
arch=arm
baudrate=115200
board=turris_omnia
board_name=turris_omnia
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 scsi0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; run boot_net_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; run boot_net_pci_enum; dhcp; if pxe get; then pxe boot; fi
bootcmd_scsi0=devnum=0; run scsi_boot
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=3
console=ttyS0,115200
cpu=armv7
distro_bootcmd=scsi_need_init=; for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=d8:58:d7:01:d9:e3
eth2addr=d8:58:d7:01:d9:e4
ethact=ethernet@34000
ethaddr=d8:58:d7:01:d9:e5
fdt_addr_r=0x2000000
fdt_high=0x10000000
fdtcontroladdr=7fb44a68
fdtfile=armada-385-turris-omnia.dtb
initrd_high=0x10000000
kernel_addr_r=0x1000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
omnia_reset=0
pxefile_addr_r=0x1900000
ramdisk_addr_r=0x2200000
regdomain=**
sata_boot=if sata dev ${devnum}; then devtype=sata; run scan_dev_for_boot_part; fi
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x1800000
scsi_boot=run scsi_init; if scsi dev ${devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then scsi_need_init=false; scsi scan; fi
soc=mvebu
stderr=serial@12000
stdin=serial@12000
stdout=serial@12000
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=CZ.NIC
Environment size: 4356/65532 bytes
=> devnum=0
=> devtype=usb
=> usb start
starting USB...
Bus usb@58000: USB EHCI 1.00
Bus usb3@f0000: MVEBU XHCI INIT controller @ 0xf10f4000
Register 2000120 NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb3@f8000: MVEBU XHCI INIT controller @ 0xf10fc000
Register 2000120 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@58000 for devices... 1 USB Device(s) found
scanning bus usb3@f0000 for devices... 2 USB Device(s) found
scanning bus usb3@f8000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
=> run scan_dev_for_efi
27911 bytes read in 34 ms (800.8 KiB/s)
Found EFI removable media binary efi/boot/bootarm.efi
Scanning disk sdhci@d8000.blk...
Scanning disk usb_mass_storage.lun0...
Found 5 disks
BootOrder not defined
EFI boot manager: Cannot load any image
99029 bytes read in 41 ms (2.3 MiB/s)
** fs_devread read error - block
** Unrecognized filesystem type **
prefetch abort
pc : [<feaaaeb0>] lr : [<7eb2cf28>]
reloc pc : [<7f350eb0>] lr : [<ff3d2f28>]
sp : 7fb442c0 ip : 7ffe05b8 fp : 7fb4446c
r10: 00000000 r9 : 00000004 r8 : 7fb443b0
r7 : 7eb33398 r6 : 7fb443a0 r5 : 00000000 r4 : 7eb333f0
r3 : 00000000 r2 : 7fbfb788 r1 : 00000023 r0 : 7fbfb788
Flags: nzCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<7ff5bc40>] lr : [<7ff5bc2c>]
reloc pc : [<00801c40>] lr : [<00801c2c>]
sp : 7fb441d0 ip : 00000002 fp : 7fb4446c
r10: 00000000 r9 : 7fb49ec8 r8 : 7fb443b0
r7 : 7ffd6334 r6 : 7ffd633c r5 : feaaaeb0 r4 : fffffffc
r3 : 00000000 r2 : 00000020 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32
Code: e59f706c e59f606c e3c55003 e3540000 (e7952104)
UEFI image [0x7eb1d000:0x7eb33f5f]