Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Currently the port supports: - 1) Serial 2) eMMC (although only basic read testing) 3) USB (ASIX usb networking works, no mass storage) 4) GPIO
So you have ATF -> u-boot -> kernel / your_own_rtos
The main "useful" thing I suppose is the ability to quickly tftp kernels etc into DDR over the network. Obviously the ability to toggle the LEDs in u-boot is also something to amuse yourself with.
Pre-built binaries can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/ NB: These are built with the latest PSCI enabled ATF, so you also need to use the corresponding PSCI enabled kernel to get all 8 cores.
The readme on how to replicate everything from source can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot... .
Any patches please send them along to me, one obvious missing feature is sdhci support. That doesn't look very hard to get going, as long as we can get the IP clocked and out of reset (and would be significantly easier if the published datasheet documented the registers...).
Have Fun!
regards,
Peter.
p.s. serial trace below
debug EMMC boot: print init OK debug EMMC boot: send RST_N . debug EMMC boot: start eMMC boot...... load fastboot1!
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):9a97502 NOTICE: BL1: Built : 08:13:36, Mar 10 2015 NOTICE: succeed to init lpddr3 rank0 dram phy INFO: lpddr3_freq_init, set ddrc 533mhz INFO: init ddr3 rank0 in 533MHz INFO: ddr3 rank1 init pass in 533MHz INFO: Elpida DDR NOTICE: BL1: Booting BL2 NOTICE: BL2: v1.1(debug):9a97502 NOTICE: BL2: Built : 10:22:35, Mar 17 2015 INFO: BL2: Loading BL3-1 INFO: Using FIP INFO: Loading file 'bl31.bin' at address 0xf9858000 INFO: File 'bl31.bin' loaded: 0xf9858000 - 0xf985f010 INFO: BL2: Loading BL3-3 INFO: Using FIP INFO: Loading file 'bl33.bin' at address 0x37000000 INFO: File 'bl33.bin' loaded: 0x37000000 - 0x3703db38 NOTICE: BL1: Booting BL3-1 NOTICE: BL3-1: v1.1(debug):9a97502 NOTICE: BL3-1: Built : 10:22:38, Mar 17 2015 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address = 0x37000000 INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2015.04-rc1-00010-g49ec0dd (Mar 17 2015 - 10:11:00) hikey_aemv8a
DRAM: 1 GiB MMC: HiKey DWMMC: 0 Using default environment
In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0
HiKey64# usb start starting USB... USB0: Core Release: 3.00a scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... Warning: asx0 using MAC address from net device 1 Ethernet Device(s) found HiKey64# HiKey64# setenv ipaddr 192.168.0.200 HiKey64# HiKey64# setenv serverip 192.168.0.10 HiKey64# HiKey64# tftpboot 0x10000000 Image Using asx0 device TFTP from server 192.168.0.10; our IP address is 192.168.0.200 Filename 'Image'. Load address: 0x10000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ######################################################T ########### ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################## 238.3 KiB/s done Bytes transferred = 12214232 (ba5fd8 hex) HiKey64# tftpboot 0x13000000 hi6220-hikey.dtb Using asx0 device TFTP from server 192.168.0.10; our IP address is 192.168.0.200 Filename 'hi6220-hikey.dtb'. Load address: 0x13000000 Loading: ################# 237.3 KiB/s done Bytes transferred = 85319 (14d47 hex) HiKey64# �ooti 0x10000000 - 0x13000000 Unknown command '�ooti' - try 'help' HiKey64# Unknown command '�ooti' - try 'help' HiKey64# booti 0x10000000 - 0x13000000 ## Flattened Device Tree blob at 13000000 Booting using the fdt blob at 0x13000000 Using Device Tree in place at 0000000013000000, end 0000000013017d46
Starting kernel ...
[ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.18.0+ (griffinp@griffinp-ThinkPad-X1-Carbon-2nd) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #5 SMP PREEMPT Tue Mar 17 08:21:27 GMT 2015 [ 0.000000] CPU: AArch64 Processor [410fd033] revision 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 16 MiB at 0x000000003f000000 [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] DMA zone: 3584 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 262144 pages, LIFO batch:31 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] PERCPU: Embedded 14 pages/cpu @ffffffc03eefc000 s18688 r8192 d30464 u57344 [ 0.000000] pcpu-alloc: s18688 r8192 d30464 u57344 alloc=14*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 258560 [ 0.000000] Kernel command line: console=ttyAMA0,115200n8 root=/dev/sda1 rw earlyprintk=pl011,0x7ff80000 debug user_debug=31 loglevel=9 [ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes [ 0.000000] log_buf_len total cpu_extra contributions: 28672 bytes [ 0.000000] log_buf_len min size: 16384 bytes [ 0.000000] log_buf_len: 65536 bytes [ 0.000000] early log buf free: 14752(90%) [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Memory: 994464K/1048576K available (7777K kernel code, 651K rwdata, 3116K rodata, 376K init, 492K bss, 54112K reserved) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vmalloc : 0xffffff8000000000 - 0xffffffbdffff0000 ( 247 GB) [ 0.000000] vmemmap : 0xffffffbe00000000 - 0xffffffbfc0000000 ( 7 GB maximum) [ 0.000000] 0xffffffbe00000000 - 0xffffffbe00e00000 ( 14 MB actual) [ 0.000000] PCI I/O : 0xffffffbffa000000 - 0xffffffbffb000000 ( 16 MB) [ 0.000000] fixed : 0xffffffbffbdfe000 - 0xffffffbffbdff000 ( 4 KB) [ 0.000000] modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB) [ 0.000000] memory : 0xffffffc000000000 - 0xffffffc040000000 ( 1024 MB) [ 0.000000] .init : 0xffffffc000b25000 - 0xffffffc000b83000 ( 376 KB) [ 0.000000] .text : 0xffffffc000080000 - 0xffffffc000b24564 ( 10898 KB) [ 0.000000] .data : 0xffffffc000b83000 - 0xffffffc000c25fd8 ( 652 KB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8 [ 0.000000] NR_IRQS:64 nr_irqs:64 16 [ 0.000000] hisi_clk_register_stub: base=0xffffff8000002af4, comm_base=0xffffff8000008000 [ 0.000000] hisi_clk_init: base ffffff800000a000 [ 0.000000] hisi_clk_init: base ffffff800000c000 [ 0.000000] hisi_clk_init: base ffffff800000e000 [ 0.000000] hisi_clk_init: base ffffff8000010000 [ 0.000000] Architected cp15 timer(s) running at 1.20MHz (phys). [ 0.000005] sched_clock: 56 bits at 1200kHz, resolution 833ns, wraps every 3579139414016ns [ 0.000422] Console: colour dummy device 80x25 [ 0.001558] allocated 4194304 bytes of page_cgroup [ 0.001562] please try 'cgroup_disable=memory' option if you don't want memory cgroups [ 0.001575] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.40 BogoMIPS (lpj=12000) [ 0.001584] pid_max: default: 32768 minimum: 301 [ 0.001694] Security Framework initialized [ 0.001710] SELinux: Initializing. [ 0.001737] SELinux: Starting in permissive mode [ 0.001787] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.001794] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.002309] Initializing cgroup subsys memory [ 0.002333] Initializing cgroup subsys freezer [ 0.002343] Initializing cgroup subsys hugetlb [ 0.002352] Initializing cgroup subsys debug [ 0.004190] /cpus/cpu@0: Missing clock-frequency property [ 0.004230] /cpus/cpu@1: Missing clock-frequency property [ 0.004269] /cpus/cpu@2: Missing clock-frequency property [ 0.004309] /cpus/cpu@3: Missing clock-frequency property [ 0.004350] /cpus/cpu@4: Missing clock-frequency property [ 0.004393] /cpus/cpu@5: Missing clock-frequency property [ 0.004437] /cpus/cpu@6: Missing clock-frequency property [ 0.004481] /cpus/cpu@7: Missing clock-frequency property [ 0.004517] hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available [ 0.004545] EFI services will not be available. [ 0.079936] CPU1: Booted secondary processor [ 0.079944] Detected VIPT I-cache on CPU1 [ 0.099879] CPU2: Booted secondary processor [ 0.099882] Detected VIPT I-cache on CPU2 [ 0.119886] CPU3: Booted secondary processor [ 0.119889] Detected VIPT I-cache on CPU3 [ 0.139922] CPU4: Booted secondary processor [ 0.139929] Detected VIPT I-cache on CPU4 [ 0.159920] CPU5: Booted secondary processor [ 0.159924] Detected VIPT I-cache on CPU5 [ 0.179929] CPU6: Booted secondary processor [ 0.179932] Detected VIPT I-cache on CPU6 [ 0.199941] CPU7: Booted secondary processor [ 0.199944] Detected VIPT I-cache on CPU7 [ 0.200014] Brought up 8 CPUs [ 0.200049] SMP: Total of 8 processors activated. [ 0.200626] devtmpfs: initialized [ 0.204994] xor: measuring software checksum speed [ 0.299605] 8regs : 2381.600 MB/sec [ 0.399639] 8regs_prefetch: 2176.000 MB/sec [ 0.499674] 32regs : 2639.200 MB/sec [ 0.599708] 32regs_prefetch: 2321.600 MB/sec [ 0.599714] xor: using function: 32regs (2639.200 MB/sec)
<snip>
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Nice! Now we have 2 96boards with u-boot support. ;)
This doesn't appear to need the Juno work FWICT. What is the dependency?
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Or for external folks:
http://git.linaro.org/people/peter.griffin/u-boot.git
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
Do we have a recommended USB ethernet adapter that works with UEFI, u-boot and the kernel?
Rob
- GPIO
So you have ATF -> u-boot -> kernel / your_own_rtos
The main "useful" thing I suppose is the ability to quickly tftp kernels etc into DDR over the network. Obviously the ability to toggle the LEDs in u-boot is also something to amuse yourself with.
Pre-built binaries can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/ NB: These are built with the latest PSCI enabled ATF, so you also need to use the corresponding PSCI enabled kernel to get all 8 cores.
The readme on how to replicate everything from source can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot....
Any patches please send them along to me, one obvious missing feature is sdhci support. That doesn't look very hard to get going, as long as we can get the IP clocked and out of reset (and would be significantly easier if the published datasheet documented the registers...).
Have Fun!
regards,
Peter.
p.s. serial trace below
debug EMMC boot: print init OK debug EMMC boot: send RST_N . debug EMMC boot: start eMMC boot...... load fastboot1!
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):9a97502 NOTICE: BL1: Built : 08:13:36, Mar 10 2015 NOTICE: succeed to init lpddr3 rank0 dram phy INFO: lpddr3_freq_init, set ddrc 533mhz INFO: init ddr3 rank0 in 533MHz INFO: ddr3 rank1 init pass in 533MHz INFO: Elpida DDR NOTICE: BL1: Booting BL2 NOTICE: BL2: v1.1(debug):9a97502 NOTICE: BL2: Built : 10:22:35, Mar 17 2015 INFO: BL2: Loading BL3-1 INFO: Using FIP INFO: Loading file 'bl31.bin' at address 0xf9858000 INFO: File 'bl31.bin' loaded: 0xf9858000 - 0xf985f010 INFO: BL2: Loading BL3-3 INFO: Using FIP INFO: Loading file 'bl33.bin' at address 0x37000000 INFO: File 'bl33.bin' loaded: 0x37000000 - 0x3703db38 NOTICE: BL1: Booting BL3-1 NOTICE: BL3-1: v1.1(debug):9a97502 NOTICE: BL3-1: Built : 10:22:38, Mar 17 2015 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address = 0x37000000 INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2015.04-rc1-00010-g49ec0dd (Mar 17 2015 - 10:11:00) hikey_aemv8a
DRAM: 1 GiB MMC: HiKey DWMMC: 0 Using default environment
In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0
HiKey64# usb start starting USB... USB0: Core Release: 3.00a scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... Warning: asx0 using MAC address from net device 1 Ethernet Device(s) found HiKey64# HiKey64# setenv ipaddr 192.168.0.200 HiKey64# HiKey64# setenv serverip 192.168.0.10 HiKey64# HiKey64# tftpboot 0x10000000 Image Using asx0 device TFTP from server 192.168.0.10; our IP address is 192.168.0.200 Filename 'Image'. Load address: 0x10000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ######################################################T ########### ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################## 238.3 KiB/s done Bytes transferred = 12214232 (ba5fd8 hex) HiKey64# tftpboot 0x13000000 hi6220-hikey.dtb Using asx0 device TFTP from server 192.168.0.10; our IP address is 192.168.0.200 Filename 'hi6220-hikey.dtb'. Load address: 0x13000000 Loading: ################# 237.3 KiB/s done Bytes transferred = 85319 (14d47 hex) HiKey64# �ooti 0x10000000 - 0x13000000 Unknown command '�ooti' - try 'help' HiKey64# Unknown command '�ooti' - try 'help' HiKey64# booti 0x10000000 - 0x13000000 ## Flattened Device Tree blob at 13000000 Booting using the fdt blob at 0x13000000 Using Device Tree in place at 0000000013000000, end 0000000013017d46
Starting kernel ...
[ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.18.0+ (griffinp@griffinp-ThinkPad-X1-Carbon-2nd) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #5 SMP PREEMPT Tue Mar 17 08:21:27 GMT 2015 [ 0.000000] CPU: AArch64 Processor [410fd033] revision 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 16 MiB at 0x000000003f000000 [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] DMA zone: 3584 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 262144 pages, LIFO batch:31 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] PERCPU: Embedded 14 pages/cpu @ffffffc03eefc000 s18688 r8192 d30464 u57344 [ 0.000000] pcpu-alloc: s18688 r8192 d30464 u57344 alloc=14*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 258560 [ 0.000000] Kernel command line: console=ttyAMA0,115200n8 root=/dev/sda1 rw earlyprintk=pl011,0x7ff80000 debug user_debug=31 loglevel=9 [ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes [ 0.000000] log_buf_len total cpu_extra contributions: 28672 bytes [ 0.000000] log_buf_len min size: 16384 bytes [ 0.000000] log_buf_len: 65536 bytes [ 0.000000] early log buf free: 14752(90%) [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Memory: 994464K/1048576K available (7777K kernel code, 651K rwdata, 3116K rodata, 376K init, 492K bss, 54112K reserved) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vmalloc : 0xffffff8000000000 - 0xffffffbdffff0000 ( 247 GB) [ 0.000000] vmemmap : 0xffffffbe00000000 - 0xffffffbfc0000000 ( 7 GB maximum) [ 0.000000] 0xffffffbe00000000 - 0xffffffbe00e00000 ( 14 MB actual) [ 0.000000] PCI I/O : 0xffffffbffa000000 - 0xffffffbffb000000 ( 16 MB) [ 0.000000] fixed : 0xffffffbffbdfe000 - 0xffffffbffbdff000 ( 4 KB) [ 0.000000] modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB) [ 0.000000] memory : 0xffffffc000000000 - 0xffffffc040000000 ( 1024 MB) [ 0.000000] .init : 0xffffffc000b25000 - 0xffffffc000b83000 ( 376 KB) [ 0.000000] .text : 0xffffffc000080000 - 0xffffffc000b24564 ( 10898 KB) [ 0.000000] .data : 0xffffffc000b83000 - 0xffffffc000c25fd8 ( 652 KB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8 [ 0.000000] NR_IRQS:64 nr_irqs:64 16 [ 0.000000] hisi_clk_register_stub: base=0xffffff8000002af4, comm_base=0xffffff8000008000 [ 0.000000] hisi_clk_init: base ffffff800000a000 [ 0.000000] hisi_clk_init: base ffffff800000c000 [ 0.000000] hisi_clk_init: base ffffff800000e000 [ 0.000000] hisi_clk_init: base ffffff8000010000 [ 0.000000] Architected cp15 timer(s) running at 1.20MHz (phys). [ 0.000005] sched_clock: 56 bits at 1200kHz, resolution 833ns, wraps every 3579139414016ns [ 0.000422] Console: colour dummy device 80x25 [ 0.001558] allocated 4194304 bytes of page_cgroup [ 0.001562] please try 'cgroup_disable=memory' option if you don't want memory cgroups [ 0.001575] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.40 BogoMIPS (lpj=12000) [ 0.001584] pid_max: default: 32768 minimum: 301 [ 0.001694] Security Framework initialized [ 0.001710] SELinux: Initializing. [ 0.001737] SELinux: Starting in permissive mode [ 0.001787] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.001794] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.002309] Initializing cgroup subsys memory [ 0.002333] Initializing cgroup subsys freezer [ 0.002343] Initializing cgroup subsys hugetlb [ 0.002352] Initializing cgroup subsys debug [ 0.004190] /cpus/cpu@0: Missing clock-frequency property [ 0.004230] /cpus/cpu@1: Missing clock-frequency property [ 0.004269] /cpus/cpu@2: Missing clock-frequency property [ 0.004309] /cpus/cpu@3: Missing clock-frequency property [ 0.004350] /cpus/cpu@4: Missing clock-frequency property [ 0.004393] /cpus/cpu@5: Missing clock-frequency property [ 0.004437] /cpus/cpu@6: Missing clock-frequency property [ 0.004481] /cpus/cpu@7: Missing clock-frequency property [ 0.004517] hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available [ 0.004545] EFI services will not be available. [ 0.079936] CPU1: Booted secondary processor [ 0.079944] Detected VIPT I-cache on CPU1 [ 0.099879] CPU2: Booted secondary processor [ 0.099882] Detected VIPT I-cache on CPU2 [ 0.119886] CPU3: Booted secondary processor [ 0.119889] Detected VIPT I-cache on CPU3 [ 0.139922] CPU4: Booted secondary processor [ 0.139929] Detected VIPT I-cache on CPU4 [ 0.159920] CPU5: Booted secondary processor [ 0.159924] Detected VIPT I-cache on CPU5 [ 0.179929] CPU6: Booted secondary processor [ 0.179932] Detected VIPT I-cache on CPU6 [ 0.199941] CPU7: Booted secondary processor [ 0.199944] Detected VIPT I-cache on CPU7 [ 0.200014] Brought up 8 CPUs [ 0.200049] SMP: Total of 8 processors activated. [ 0.200626] devtmpfs: initialized [ 0.204994] xor: measuring software checksum speed [ 0.299605] 8regs : 2381.600 MB/sec [ 0.399639] 8regs_prefetch: 2176.000 MB/sec [ 0.499674] 32regs : 2639.200 MB/sec [ 0.599708] 32regs_prefetch: 2321.600 MB/sec [ 0.599714] xor: using function: 32regs (2639.200 MB/sec)
<snip>
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin <peter.griffin@linaro.org mailto:peter.griffin@linaro.org> wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Nice! Now we have 2 96boards with u-boot support. ;)
This doesn't appear to need the Juno work FWICT. What is the dependency?
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot ssh://git@git.linaro.org/people/peter.griffin/u-boot
Or for external folks:
http://git.linaro.org/people/peter.griffin/u-boot.git http://git.linaro.org/people/peter.griffin/u-boot.git
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
Do we have a recommended USB ethernet adapter that works with UEFI, u-boot and the kernel?
The Apple one works for the kernel …. George
Rob
- GPIO
So you have ATF -> u-boot -> kernel / your_own_rtos
The main "useful" thing I suppose is the ability to quickly tftp kernels etc into DDR over the network. Obviously the ability to toggle the LEDs in u-boot is also something to amuse yourself with.
Pre-built binaries can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/ NB: These are built with the latest PSCI enabled ATF, so you also need to use the corresponding PSCI enabled kernel to get all 8 cores.
The readme on how to replicate everything from source can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot....
Any patches please send them along to me, one obvious missing feature is sdhci support. That doesn't look very hard to get going, as long as we can get the IP clocked and out of reset (and would be significantly easier if the published datasheet documented the registers...).
Have Fun!
regards,
Peter.
p.s. serial trace below
debug EMMC boot: print init OK debug EMMC boot: send RST_N . debug EMMC boot: start eMMC boot...... load fastboot1!
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):9a97502 NOTICE: BL1: Built : 08:13:36, Mar 10 2015 NOTICE: succeed to init lpddr3 rank0 dram phy INFO: lpddr3_freq_init, set ddrc 533mhz INFO: init ddr3 rank0 in 533MHz INFO: ddr3 rank1 init pass in 533MHz INFO: Elpida DDR NOTICE: BL1: Booting BL2 NOTICE: BL2: v1.1(debug):9a97502 NOTICE: BL2: Built : 10:22:35, Mar 17 2015 INFO: BL2: Loading BL3-1 INFO: Using FIP INFO: Loading file 'bl31.bin' at address 0xf9858000 INFO: File 'bl31.bin' loaded: 0xf9858000 - 0xf985f010 INFO: BL2: Loading BL3-3 INFO: Using FIP INFO: Loading file 'bl33.bin' at address 0x37000000 INFO: File 'bl33.bin' loaded: 0x37000000 - 0x3703db38 NOTICE: BL1: Booting BL3-1 NOTICE: BL3-1: v1.1(debug):9a97502 NOTICE: BL3-1: Built : 10:22:38, Mar 17 2015 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address = 0x37000000 INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2015.04-rc1-00010-g49ec0dd (Mar 17 2015 - 10:11:00) hikey_aemv8a
DRAM: 1 GiB MMC: HiKey DWMMC: 0 Using default environment
In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0
HiKey64# usb start starting USB... USB0: Core Release: 3.00a scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... Warning: asx0 using MAC address from net device 1 Ethernet Device(s) found HiKey64# HiKey64# setenv ipaddr 192.168.0.200 HiKey64# HiKey64# setenv serverip 192.168.0.10 HiKey64# HiKey64# tftpboot 0x10000000 Image Using asx0 device TFTP from server 192.168.0.10; our IP address is 192.168.0.200 Filename 'Image'. Load address: 0x10000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ######################################################T ########### ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################## 238.3 KiB/s done Bytes transferred = 12214232 (ba5fd8 hex) HiKey64# tftpboot 0x13000000 hi6220-hikey.dtb Using asx0 device TFTP from server 192.168.0.10; our IP address is 192.168.0.200 Filename 'hi6220-hikey.dtb'. Load address: 0x13000000 Loading: ################# 237.3 KiB/s done Bytes transferred = 85319 (14d47 hex) HiKey64# �ooti 0x10000000 - 0x13000000 Unknown command '�ooti' - try 'help' HiKey64# Unknown command '�ooti' - try 'help' HiKey64# booti 0x10000000 - 0x13000000 ## Flattened Device Tree blob at 13000000 Booting using the fdt blob at 0x13000000 Using Device Tree in place at 0000000013000000, end 0000000013017d46
Starting kernel ...
[ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.18.0+ (griffinp@griffinp-ThinkPad-X1-Carbon-2nd) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #5 SMP PREEMPT Tue Mar 17 08:21:27 GMT 2015 [ 0.000000] CPU: AArch64 Processor [410fd033] revision 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 16 MiB at 0x000000003f000000 [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] DMA zone: 3584 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 262144 pages, LIFO batch:31 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] PERCPU: Embedded 14 pages/cpu @ffffffc03eefc000 s18688 r8192 d30464 u57344 [ 0.000000] pcpu-alloc: s18688 r8192 d30464 u57344 alloc=14*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 258560 [ 0.000000] Kernel command line: console=ttyAMA0,115200n8 root=/dev/sda1 rw earlyprintk=pl011,0x7ff80000 debug user_debug=31 loglevel=9 [ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes [ 0.000000] log_buf_len total cpu_extra contributions: 28672 bytes [ 0.000000] log_buf_len min size: 16384 bytes [ 0.000000] log_buf_len: 65536 bytes [ 0.000000] early log buf free: 14752(90%) [ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Memory: 994464K/1048576K available (7777K kernel code, 651K rwdata, 3116K rodata, 376K init, 492K bss, 54112K reserved) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vmalloc : 0xffffff8000000000 - 0xffffffbdffff0000 ( 247 GB) [ 0.000000] vmemmap : 0xffffffbe00000000 - 0xffffffbfc0000000 ( 7 GB maximum) [ 0.000000] 0xffffffbe00000000 - 0xffffffbe00e00000 ( 14 MB actual) [ 0.000000] PCI I/O : 0xffffffbffa000000 - 0xffffffbffb000000 ( 16 MB) [ 0.000000] fixed : 0xffffffbffbdfe000 - 0xffffffbffbdff000 ( 4 KB) [ 0.000000] modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB) [ 0.000000] memory : 0xffffffc000000000 - 0xffffffc040000000 ( 1024 MB) [ 0.000000] .init : 0xffffffc000b25000 - 0xffffffc000b83000 ( 376 KB) [ 0.000000] .text : 0xffffffc000080000 - 0xffffffc000b24564 ( 10898 KB) [ 0.000000] .data : 0xffffffc000b83000 - 0xffffffc000c25fd8 ( 652 KB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8 [ 0.000000] NR_IRQS:64 nr_irqs:64 16 [ 0.000000] hisi_clk_register_stub: base=0xffffff8000002af4, comm_base=0xffffff8000008000 [ 0.000000] hisi_clk_init: base ffffff800000a000 [ 0.000000] hisi_clk_init: base ffffff800000c000 [ 0.000000] hisi_clk_init: base ffffff800000e000 [ 0.000000] hisi_clk_init: base ffffff8000010000 [ 0.000000] Architected cp15 timer(s) running at 1.20MHz (phys). [ 0.000005] sched_clock: 56 bits at 1200kHz, resolution 833ns, wraps every 3579139414016ns [ 0.000422] Console: colour dummy device 80x25 [ 0.001558] allocated 4194304 bytes of page_cgroup [ 0.001562] please try 'cgroup_disable=memory' option if you don't want memory cgroups [ 0.001575] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.40 BogoMIPS (lpj=12000) [ 0.001584] pid_max: default: 32768 minimum: 301 [ 0.001694] Security Framework initialized [ 0.001710] SELinux: Initializing. [ 0.001737] SELinux: Starting in permissive mode [ 0.001787] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.001794] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.002309] Initializing cgroup subsys memory [ 0.002333] Initializing cgroup subsys freezer [ 0.002343] Initializing cgroup subsys hugetlb [ 0.002352] Initializing cgroup subsys debug [ 0.004190] /cpus/cpu@0: Missing clock-frequency property [ 0.004230] /cpus/cpu@1: Missing clock-frequency property [ 0.004269] /cpus/cpu@2: Missing clock-frequency property [ 0.004309] /cpus/cpu@3: Missing clock-frequency property [ 0.004350] /cpus/cpu@4: Missing clock-frequency property [ 0.004393] /cpus/cpu@5: Missing clock-frequency property [ 0.004437] /cpus/cpu@6: Missing clock-frequency property [ 0.004481] /cpus/cpu@7: Missing clock-frequency property [ 0.004517] hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available [ 0.004545] EFI services will not be available. [ 0.079936] CPU1: Booted secondary processor [ 0.079944] Detected VIPT I-cache on CPU1 [ 0.099879] CPU2: Booted secondary processor [ 0.099882] Detected VIPT I-cache on CPU2 [ 0.119886] CPU3: Booted secondary processor [ 0.119889] Detected VIPT I-cache on CPU3 [ 0.139922] CPU4: Booted secondary processor [ 0.139929] Detected VIPT I-cache on CPU4 [ 0.159920] CPU5: Booted secondary processor [ 0.159924] Detected VIPT I-cache on CPU5 [ 0.179929] CPU6: Booted secondary processor [ 0.179932] Detected VIPT I-cache on CPU6 [ 0.199941] CPU7: Booted secondary processor [ 0.199944] Detected VIPT I-cache on CPU7 [ 0.200014] Brought up 8 CPUs [ 0.200049] SMP: Total of 8 processors activated. [ 0.200626] devtmpfs: initialized [ 0.204994] xor: measuring software checksum speed [ 0.299605] 8regs : 2381.600 MB/sec [ 0.399639] 8regs_prefetch: 2176.000 MB/sec [ 0.499674] 32regs : 2639.200 MB/sec [ 0.599708] 32regs_prefetch: 2321.600 MB/sec [ 0.599714] xor: using function: 32regs (2639.200 MB/sec)
<snip>
Dev mailing list Dev@lists.96boards.org mailto:Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev https://lists.96boards.org/mailman/listinfo/dev
On 03/17/2015 01:22 PM, George Grey wrote:
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin <peter.griffin@linaro.org mailto:peter.griffin@linaro.org> wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Peter, is it ok with you if I mirror your u-boot port in the 96boards github repo?
all development would be happening in your tree (unless you wish to transition to github). discussions could of course be had on the 96 mailing list - like the patch the Tyler just sent.
On 03/17/2015 03:13 PM, Jorge Ramirez-Ortiz wrote:
On 03/17/2015 01:22 PM, George Grey wrote:
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin <peter.griffin@linaro.org mailto:peter.griffin@linaro.org> wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Peter, is it ok with you if I mirror your u-boot port in the 96boards github repo?
all development would be happening in your tree (unless you wish to transition to github). discussions could of course be had on the 96 mailing list - like the patch the Tyler just sent.
well ignore this. it looks like someone just did!
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On Tue, Mar 17, 2015 at 2:13 PM, Jorge Ramirez-Ortiz jorge.ramirez-ortiz@linaro.org wrote:
On 03/17/2015 01:22 PM, George Grey wrote:
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin <peter.griffin@linaro.org mailto:peter.griffin@linaro.org> wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Peter, is it ok with you if I mirror your u-boot port in the 96boards github repo?
all development would be happening in your tree (unless you wish to transition to github). discussions could of course be had on the 96 mailing list - like the patch the Tyler just sent.
Given that this appears to be 2 patches to enable and there is no other backlog of vendor stuff, we should get this upstream and avoid any "vendor" tree. I few comments on the patches, but they don't look too far off from upstreaming.
Rob
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On Tue, Mar 17, 2015 at 12:20 PM, George Grey george.grey@linaro.org wrote:
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Nice! Now we have 2 96boards with u-boot support. ;)
This doesn't appear to need the Juno work FWICT. What is the dependency?
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Or for external folks:
http://git.linaro.org/people/peter.griffin/u-boot.git
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
Do we have a recommended USB ethernet adapter that works with UEFI, u-boot and the kernel?
The Apple one works for the kernel ….
What do the non-Apple fanboys use?
Is this the official 96boards recommended adapter everyone should get and should be used for testing. (Just for us greybeards stuck on 20th century ethernet).
Rob
On 17 March 2015 at 20:31, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 12:20 PM, George Grey george.grey@linaro.org wrote:
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Nice! Now we have 2 96boards with u-boot support. ;)
This doesn't appear to need the Juno work FWICT. What is the dependency?
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Or for external folks:
http://git.linaro.org/people/peter.griffin/u-boot.git
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
Do we have a recommended USB ethernet adapter that works with UEFI, u-boot and the kernel?
The Apple one works for the kernel ….
What do the non-Apple fanboys use?
I have an old (7+ years) linksys USB200M one and a no-brand combined usb-hub/ethernet one . The apple and linksys one use an ASIX chipset, the combined one an SMSC (same as on beagle/panda). FWIW, the apple one is the smallest and easiest to buy but lacks the blinky RX/TX LEDs.
On Mar 17, 2015, at 7:31 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 12:20 PM, George Grey george.grey@linaro.org wrote:
On Mar 17, 2015, at 5:11 PM, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Nice! Now we have 2 96boards with u-boot support. ;)
This doesn't appear to need the Juno work FWICT. What is the dependency?
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Or for external folks:
http://git.linaro.org/people/peter.griffin/u-boot.git
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
Do we have a recommended USB ethernet adapter that works with UEFI, u-boot and the kernel?
The Apple one works for the kernel ….
What do the non-Apple fanboys use?
I have promised Ara will be my first Android phone - I’m just waiting for you to deliver it :) Now stop interrupting my browsing of the Apple watch site to work out which configuration I need to order ….
Is this the official 96boards recommended adapter everyone should get and should be used for testing. (Just for us greybeards stuck on 20th century ethernet).
Rob
On 03/17/2015 01:11 PM, Rob Herring wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
- GPIO
So you have ATF -> u-boot -> kernel / your_own_rtos
The main "useful" thing I suppose is the ability to quickly tftp kernels etc into DDR over the network. Obviously the ability to toggle the LEDs in u-boot is also something to amuse yourself with.
Pre-built binaries can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/ NB: These are built with the latest PSCI enabled ATF, so you also need to use the corresponding PSCI enabled kernel to get all 8 cores.
you could use the 96boards kikey-psci branch instead of Leo's private repo (it contains additional functionality rebased on the hikey branch - 3mbps bluetooth support for example) https://github.com/96boards/linux/tree/hikey-psci
The readme on how to replicate everything from source can be found here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot....
could the readme be amended to make it point to the tree in the 96board repo please? just to keep things centralized.
Hi Jorge,
The readme on how to replicate everything from source can be found
here: -
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot... .
could the readme be amended to make it point to the tree in the 96board repo please? just to keep things centralized.
I've updated the readme to point to the central repo as requested. Also I've fixed a couple of other typos which people have told me about.
regards,
Peter.
On Wed, Mar 18, 2015 at 04:40:17PM +0000, Peter Griffin wrote:
>> The readme on how to replicate everything from source can be found here: - >> >> http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/ u-boot-readme.txt. could the readme be amended to make it point to the tree in the 96board repo please? just to keep things centralized.
I've updated the readme to point to the central repo as requested. Also I've fixed a couple of other typos which people have told me about.
Hi Peter,
You should probably remove bl30-hikey.bin from build-tf.mak [1] to avoid confusion, as I'm not sure there is a BL3-0 image for Hikey. Or did I miss anything there?
Shawn
[1] http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/build-...
On Tue, Mar 17, 2015 at 6:10 PM, Rob Herring rob.herring@linaro.org wrote:
This doesn't appear to need the Juno work FWICT. What is the dependency?
Suspect this: https://git.linaro.org/people/linus.walleij/u-boot.git/commit/23b5877c64562a...
Which is already upstream.
Yours, Linus Walleij
Hi Rob,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
Nice! Now we have 2 96boards with u-boot support. ;)
This doesn't appear to need the Juno work FWICT. What is the dependency?
Your correct there isn't one. I only based it on top of Linus work as a known good starting point for a armv8 board. Now I know it works (and Linus confirmed all other patches are already upstream) I'll re-base it on u-boot master.
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Or for external folks:
http://git.linaro.org/people/peter.griffin/u-boot.git
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
Do we have a recommended USB ethernet adapter that works with UEFI, u-boot and the kernel?
Anything with a ASIX AX88772 chipset in it I think would be a good choice. It is what I'm using with u-boot (and works), and it has a driver in the kernel.
Also looking in the edk2 tree there also appears to be a driver for it at edk2/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772.
The one I have is a D-Link DUB-E100. I just had a quick google and it looks like you can still buy them.
regards,
Peter.
On 18 March 2015 at 11:03, Peter Griffin peter.griffin@linaro.org wrote:
Anything with a ASIX AX88772 chipset in it I think would be a good choice. It is what I'm using with u-boot (and works), and it has a driver in the kernel.
Also looking in the edk2 tree there also appears to be a driver for it at edk2/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772.
The one I have is a D-Link DUB-E100. I just had a quick google and it looks like you can still buy them.
This is what I use as well. However it's rather slow for me on Linux side.
https://github.com/96boards/bugs/issues/26
How's the performance/stability been in linux side for you?
Riku
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
- GPIO
I've not seen any activity on this. Do you plan to send this upstream for review?
Rob
Hi Rob,
On 12 May 2015 at 01:44, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
- GPIO
I've not seen any activity on this. Do you plan to send this upstream for review?
Yes I have been meaning to send the patches for a while. Thanks for the reminder / prod.
I just rebased and sent the patches to the ML. However currently they are waiting moderator approval on the list before you can view them.
The series is called "Add support for hi6220 SoC and HiKey 96boards CE"
In addition it now also supports booting kernel / dtb from SD card, and the u-boot env is also saved to SD card by default.
regards,
Peter.
On Tue, May 12, 2015 at 6:48 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi Rob,
On 12 May 2015 at 01:44, Rob Herring rob.herring@linaro.org wrote:
On Tue, Mar 17, 2015 at 6:20 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi folks,
For fun I've done a minimal U-Boot port for the HiKey board, I thought I'd post it here in case anyone else is interested. This work is based on top of Linus Walleij Juno port.
The code can be found here: -
ssh://git@git.linaro.org:/people/peter.griffin/u-boot
Currently the port supports: -
- Serial
- eMMC (although only basic read testing)
- USB (ASIX usb networking works, no mass storage)
- GPIO
I've not seen any activity on this. Do you plan to send this upstream for review?
Yes I have been meaning to send the patches for a while. Thanks for the reminder / prod.
I just tried the pre-built binaries from here: http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot...
It boots into u-boot, but the 'usb start' isn't working to detect my asix adapter (full log below). Any idea what's going on?
Kevin
debug EMMC boot: print init OK debug EMMC boot: send RST_N . debug EMMC boot: start eMMC boot...... load fastboot1!
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):b6cfb3ed2eb4 NOTICE: BL1: Built : 13:53:12, May 11 2015 NOTICE: succeed to init lpddr3 rank0 dram phy INFO: lpddr3_freq_init, set ddrc 533mhz INFO: init ddr3 rank0 INFO: ddr3 rank1 init pass INFO: lpddr3_freq_init, set ddrc 800mhz INFO: init ddr3 rank0 INFO: ddr3 rank1 init pass INFO: Elpida DDR NOTICE: BL1: Booting BL2 NOTICE: BL2: v1.1(debug):9a97502 NOTICE: BL2: Built : 10:22:35, Mar 17 2015 INFO: BL2: Loading BL3-1 INFO: Using FIP INFO: Loading file 'bl31.bin' at address 0xf9858000 INFO: File 'bl31.bin' loaded: 0xf9858000 - 0xf985f010 INFO: BL2: Loading BL3-3 INFO: Using FIP INFO: Loading file 'bl33.bin' at address 0x37000000 INFO: File 'bl33.bin' loaded: 0x37000000 - 0x3703db38 NOTICE: BL1: Booting BL3-1 NOTICE: BL3-1: v1.1(debug):9a97502 NOTICE: BL3-1: Built : 10:22:38, Mar 17 2015 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address = 0x37000000 INFO: BL3-1: Next image spsr = 0x3c9 U-Boot 2015.04-rc1-00010-g49ec0dd (Mar 17 2015 - 10:11:00) hikey_aemv8a
DRAM: 1 GiB MMC: HiKey DWMMC: 0 Using default environment
In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 Bad Linux ARM64 Image magic! HiKey64# usb start starting USB... USB0: Core Release: 3.00a dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout!
Hi Kevin,
<snip>
Yes I have been meaning to send the patches for a while. Thanks for the reminder / prod.
I just tried the pre-built binaries from here:
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot...
It boots into u-boot, but the 'usb start' isn't working to detect my asix adapter (full log below). Any idea what's going on?
What ASIX adapter were you using? Can you share the chipset in it?
Mine is a d-link Dub -e100 which has a ASIX AX88772 USB 2.0.
It is strange that you see a timeout. Could you try issuing a "usb start" without anything plugged into the USB. You should still enumerate the hubs and see something like this: -
HiKey64# usb start starting USB... USB0: Core Release: 3.00a scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found HiKey64#
And to confirm you can issue the "usb tree" which should output something like: -
HiKey64# usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | U-Boot Root Hub | +-2 Hub (480 Mb/s, 2mA)
HiKey64# USB device tree: 1 Hub (480 Mb/s, 0mA) | U-Boot Root Hub | +-2 Hub (480 Mb/s, 2mA)
It has been a while since I flashed a u-boot into eMMC, as I keep tftp'ing a newer one straight into DDR for development purposes. I will try and flash the image on my home page just to confirm that they definitely work for me.
regards,
Peter.
On Thu, May 14, 2015 at 11:37 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi Kevin,
<snip>
Yes I have been meaning to send the patches for a while. Thanks for the reminder / prod.
I just tried the pre-built binaries from here:
http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot...
It boots into u-boot, but the 'usb start' isn't working to detect my asix adapter (full log below). Any idea what's going on?
What ASIX adapter were you using? Can you share the chipset in it?
Mine is a d-link Dub -e100 which has a ASIX AX88772 USB 2.0.
On my host, lsusb reports: Bus 001 Device 011: ID 0b95:7720 ASIX Electronics Corp. AX88772
and I know it's one that's supported in mainline u-boot because I have a bunch of the same adapters that I use for u-boot on various boards that don't have built-in networking.
It is strange that you see a timeout. Could you try issuing a "usb start" without anything plugged into the USB. You should still enumerate the hubs and see something like this: -
With nothing plugged in, I get the same timeouts.
And to confirm you can issue the "usb tree" which should output something like: -
After the timeouts, usb tree at least reports the hub:
HiKey64# usb start starting USB... USB0: Core Release: 3.00a dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found HiKey64# usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) U-Boot Root Hub
It has been a while since I flashed a u-boot into eMMC, as I keep tftp'ing a newer one straight into DDR for development purposes. I will try and flash the image on my home page just to confirm that they definitely work for me.
Thanks, I'd appreciate the right combination of known good images (including other firmware images too)
Thanks,
Kevin
Hi Kevin,
What ASIX adapter were you using? Can you share the chipset in it?
Mine is a d-link Dub -e100 which has a ASIX AX88772 USB 2.0.
On my host, lsusb reports: Bus 001 Device 011: ID 0b95:7720 ASIX Electronics Corp. AX88772
and I know it's one that's supported in mainline u-boot because I have a bunch of the same adapters that I use for u-boot on various boards that don't have built-in networking.
Yes OK, looks like you have the same ASIX chipset as me, so it should definitely work.
It is strange that you see a timeout. Could you try issuing a "usb start" without anything plugged into the USB. You should still enumerate the hubs and see
something
like this: -
With nothing plugged in, I get the same timeouts.
OK that further confirms that is it just broken for you, and nothing to do with the USB adapter.
And to confirm you can issue the "usb tree" which should output something like: -
After the timeouts, usb tree at least reports the hub:
HiKey64# usb start starting USB... USB0: Core Release: 3.00a dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found HiKey64# usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) U-Boot Root Hub
It has been a while since I flashed a u-boot into eMMC, as I keep
tftp'ing a
newer one straight into DDR for development purposes. I will try and
flash
the image on my home page just to confirm that they definitely work for
me.
Thanks, I'd appreciate the right combination of known good images (including other firmware images too)
I flashed the images under my home directory, and it works OK on my board. I wonder if it is a difference in the l-loader.bin which I didn't provide on the website. Can you send me the one you used when flashing your board?
I will try and flash the images using your l-loader.bin, and see if I can replicate the issue.
regards,
Peter.
Hi Peter,
Sorry for the lag, I just got back to this. (frankly, I'm not motiviated to work on this board as I'm finding it to be one of the most PITA boards to deal with, and that's saying something since I have 50+ other boards in my farm right now)
Anyways...
On Sat, May 16, 2015 at 11:48 AM, Peter Griffin peter.griffin@linaro.org wrote:
Thanks, I'd appreciate the right combination of known good images (including other firmware images too)
I flashed the images under my home directory, and it works OK on my board. I wonder if it is a difference in the l-loader.bin which I didn't provide on the website. Can you send me the one you used when flashing your board?
Attached (gzip'd)
I will try and flash the images using your l-loader.bin, and see if I can replicate the issue.
Likewise, if you send me a known working l-loader.bin, I can try that too.
FWIW, the attached one I built when following the UEFI wiki page for hikey[1]. The one I built following your instructions starts up, but never enters fastboot mode, but does spit some numbers out the UART every second or so.
Kevin
Hi Kevin,
Sorry for the lag, I just got back to this. (frankly, I'm not
motiviated to work on this board as I'm finding it to be one of the most PITA boards to deal with, and that's saying something since I have 50+ other boards in my farm right now)
No problem. I must admit trying to replicate this issue reminded me how much of a pain it is to flash l-loader.bin and have fastboot come up properly.
I'm not sure if I'm the only person suffering from this (your comment would suggest not) but with exactly the same software it seems quite random whether my laptop can enumerate the USB fastboot device or not.
Sometimes if I'm lucky I can get 2 or 3 good runs in a row and make some progress, other times I have to load l-loader 6/7/8 times before I manage to get fastboot and flash the board.
I've tried many things seemingly to no effect. Rebooting my laptop, using a USB hub, power cycling the board every time, only plugging in the usb cable after sending l-loader over the UART (and the opposite). Nothing as far as I can tell has made much difference to the stability. If anyone has any tips for improving this please send them my way :-)
Some of these attempts are also using the latest l-loader.bin from 26th May from here https://builds.96boards.org/snapshots/hikey/uefi/26. So it doesn't seem any more reliable with the latest builds.
Anyways...
Thanks, I'd appreciate the right combination of known good images (including other firmware images too)
I flashed the images under my home directory, and it works OK on my
board. I
wonder if it is a difference in the l-loader.bin which I didn't provide on the website.
Can
you send me the one you used when flashing your board?
Attached (gzip'd)
Thanks
I will try and flash the images using your l-loader.bin, and see if I can replicate the issue.
OK, so to confirm I also suffer the same USB timeouts when using the l-loader.bin which you sent. I should have put the l-loader.bin I was using on my website originally. It does highlight a bug that I'm obviously not setting up something properly for there to be this dependency between ATF and u-boot.
Likewise, if you send me a known working l-loader.bin, I can try that too.
I've uploaded the l-loader.bin I was using to my website now. See here http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/
FWIW, the attached one I built when following the UEFI wiki page for hikey[1]. The one I built following your instructions starts up, but never enters fastboot mode, but does spit some numbers out the UART every second or so.
Yes OK so apologies on that one, I also had two patches applied on top of the ATF SHA mentioned in the readme to get my l-loader.bin compiled from source working. One of those patches added barriers in the mmio routines and the other added the packed attribute to some USB structure, that got around the 1hz numbers bug. I believe both of those changes are merged in upstream ATF now.
Anyway I thought I should try u-boot with the latest ATF code and check it still works. However compiling the latest ATF / l-loader code from source I don't get something that boots :-( so there seems to be new issues there (probably pilot error as the pre-built binaries work OK for me). I've not debugged that any further.
By taking the latest pre-compiled l-loader.bin from here https://builds.96boards.org/snapshots/hikey/uefi/26 and using the latest u-boot (v1 patches sent to u-boot ML). I've had to make some small changes, as the latest ATF now secures the top 16Mb of RAM for trustzone which u-boot was using. Also the bl33 executable now gets linked at 0x35000000 rather than 0x37000000, and I'm back to having a working u-boot again :-)
I've added a new directory here with these pre-compiled binaries if you want to try those instead http://people.linaro.org/~peter.griffin/hikey/hikey-uboot-r2/. The main advantage over the u-boot you compiled from source is that it now also supports the sd card slot (saving env to sd, and also has some more commands compiled in by default). serial_trace.txt is a serial dump of it running on my board.
Hope that helps.
regards,
Peter.
Peter Griffin peter.griffin@linaro.org writes:
Sorry for the lag, I just got back to this. (frankly, I'm not motiviated to work on this board as I'm finding it to be one of the most PITA boards to deal with, and that's saying something since I have 50+ other boards in my farm right now)
No problem. I must admit trying to replicate this issue reminded me how much of a pain it is to flash l-loader.bin and have fastboot come up properly.
Heh, yeah. Hence my PITA comment. ;)
I'm not sure if I'm the only person suffering from this (your comment would suggest not) but with exactly the same software it seems quite random whether my laptop can enumerate the USB fastboot device or not.
Sometimes if I'm lucky I can get 2 or 3 good runs in a row and make some progress, other times I have to load l-loader 6/7/8 times before I manage to get fastboot and flash the board.
Yes, I've noticed both of those problems too.
I've tried many things seemingly to no effect. Rebooting my laptop, using a USB hub, power cycling the board every time, only plugging in the usb cable after sending l-loader over the UART (and the opposite). Nothing as far as I can tell has made much difference to the stability.
My experience as well.
If anyone has any tips for improving this please send them my way :-)
Some of these attempts are also using the latest l-loader.bin from 26th May from here https://builds.96boards.org/snapshots/hikey/uefi/26. So it doesn't seem any more reliable with the latest builds.
Anyways...
[...]
FWIW, the attached one I built when following the UEFI wiki page for hikey[1]. The one I built following your instructions starts up, but never enters fastboot mode, but does spit some numbers out the UART every second or so.
Yes OK so apologies on that one, I also had two patches applied on top of the ATF SHA mentioned in the readme to get my l-loader.bin compiled from source working. One of those patches added barriers in the mmio routines and the other added the packed attribute to some USB structure, that got around the 1hz numbers bug. I believe both of those changes are merged in upstream ATF now.
Anyway I thought I should try u-boot with the latest ATF code and check it still works. However compiling the latest ATF / l-loader code from source I don't get something that boots :-( so there seems to be new issues there (probably pilot error as the pre-built binaries work OK for me). I've not debugged that any further.
By taking the latest pre-compiled l-loader.bin from here https://builds.96boards.org/snapshots/hikey/uefi/26 and using the latest u-boot (v1 patches sent to u-boot ML). I've had to make some small changes, as the latest ATF now secures the top 16Mb of RAM for trustzone which u-boot was using. Also the bl33 executable now gets linked at 0x35000000 rather than 0x37000000, and I'm back to having a working u-boot again :-)
I've added a new directory here with these pre-compiled binaries if you want to try those instead http://people.linaro.org/~peter.griffin/hikey/hikey-uboot-r2/. The main advantage over the u-boot you compiled from source is that it now also supports the sd card slot (saving env to sd, and also has some more commands compiled in by default). serial_trace.txt is a serial dump of it running on my board.
With the l-loader.bin from your _r2 dir, I'm able to get to fastboot now, thanks.
However, flashing your _r2 binaries, I'm still getting USB host timeouts. Full boot log below[1].
I've tried with and without my usb eth adapter plugged in. I've tried it plugged into both ports. Just for kicks, I've tried with and without SD card plugged in too since UEFI firmware hangs if SD card plugged in ;) I've also tried on 2 different hikey boards (one of which I thought was bricked but I was able to reflash using l-loader over the real UART.)
Anyways, not sure what else we have different between our setups, but still no USB host support here, and so no networking.
Thanks for your help and guidance,
Kevin
[1] debug EMMC boot: print init OK debug EMMC boot: send RST_N . debug EMMC boot: start eMMC boot...... load fastboot1!
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):a0c0399 NOTICE: BL1: Built : 13:23:48, May 22 2015 NOTICE: succeed to init lpddr3 rank0 dram phy INFO: lpddr3_freq_init, set ddrc 533mhz INFO: init ddr3 rank0 INFO: ddr3 rank1 init pass INFO: lpddr3_freq_init, set ddrc 800mhz INFO: init ddr3 rank0 INFO: ddr3 rank1 init pass INFO: Elpida DDR NOTICE: BL1: Booting BL2 INFO: [BDID] [fff91c18] midr: 0x410fd033 INFO: [BDID] [fff91c1c] board type: 0 INFO: [BDID] [fff91c20] board id: 0x2b INFO: init_acpu_dvfs: pmic version 17 INFO: init_acpu_dvfs: ACPU_CHIP_MAX_FREQ=0x186a00. INFO: acpu_dvfs_volt_init: success! INFO: acpu_dvfs_set_freq: support freq num is 5 INFO: acpu_dvfs_set_freq: start prof is 0x4 INFO: acpu_dvfs_set_freq: magic is 0x5a5ac5c5 INFO: acpu_dvfs_set_freq: voltage: INFO: - 0: 0x3a INFO: - 1: 0x3a INFO: - 2: 0x4a INFO: - 3: 0x5b INFO: - 4: 0x6b NOTICE: acpu_dvfs_set_freq: set acpu freq success!NOTICE: BL2: v1.1(debug):a0c0399 NOTICE: BL2: Built : 16:57:42, May 27 2015 INFO: BL2: Loading BL3-0 INFO: Using FIP WARNING: Failed to access image 'bl30.bin' (-1) ERROR: Failed to load BL3-0 (-1) ERROR: Please burn mcu image: ERROR: sudo fastboot flash mcuimage mcuimage.bin INFO: BL2: TrustZone: protecting 16777216 bytes of memory at 0x3f000000 INFO: BL2: Loading BL3-1 INFO: Using FIP INFO: Loading file 'bl31.bin' at address 0xf9858000 INFO: File 'bl31.bin' loaded: 0xf9858000 - 0xf9860010 INFO: BL2: Loading BL3-2 INFO: Using FIP WARNING: Failed to access image 'bl32.bin' (-1) WARNING: Failed to load BL3-2 (-1) INFO: BL2: Loading BL3-3 INFO: Using FIP INFO: Loading file 'bl33.bin' at address 0x35000000 INFO: File 'bl33.bin' loaded: 0x35000000 - 0x35042938 NOTICE: BL1: Booting BL3-1 NOTICE: BL3-1: v1.1(debug):a0c0399 NOTICE: BL3-1: Built : 16:57:45, May 27 2015 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address = 0x35000000 INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2015.04-00007-g1b3d379-dirty (May 27 2015 - 10:18:16) hikey_aemv8a
DRAM: 1008 MiB MMC: sd_card_detect: SD card not present HiKey DWMMC: 0, HiKey DWMMC: 1 Card did not respond to voltage select! MMC init failed Using default environment
In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 2 0 HiKey64# usb start starting USB... USB0: Core Release: 3.00a dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! dwc_otg_core_host_init: Timeout! scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found HiKey64# usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) U-Boot Root Hub
HiKey64#
Hi,
Le 27 Mai. 2015 20:19, "Kevin Hilman" khilman@kernel.org a écrit :
Peter Griffin peter.griffin@linaro.org writes:
Sorry for the lag, I just got back to this. (frankly, I'm not motiviated to work on this board as I'm finding it to be one of the most PITA boards to deal with, and that's saying something since I have 50+ other boards in my farm right now)
No problem. I must admit trying to replicate this issue reminded me how much of a pain it is to flash l-loader.bin and have fastboot come up properly.
Heh, yeah. Hence my PITA comment. ;)
I'm not sure if I'm the only person suffering from this (your comment would suggest not) but with exactly the same software it seems quite random whether my laptop can enumerate the USB fastboot device or not.
Sometimes if I'm lucky I can get 2 or 3 good runs in a row and make some progress, other times I have to load l-loader 6/7/8 times before I
manage to
get fastboot and flash the board.
Yes, I've noticed both of those problems too.
I've tried many things seemingly to no effect. Rebooting my laptop, using a USB hub, power cycling the board every time, only plugging in the usb cable after sending l-loader over the UART (and the opposite). Nothing as far as I can tell has made much difference to the stability.
My experience as well.
If anyone has any tips for improving this please send them my way :-)
I'm not sure I can help with your exact situation (I'm not using u-boot) but let me share my experience just in case.
I've been using my HiKey board since HKG15 with almost no issue... well, the 96boards ARM TF repository has occasionally been unstable (exceptions in BL1), but at least I found a stable configuration.
I have created a repository on GitHub with everything I need for my work (OP-TEE development). Check out http://github.com/jforissier/hikey_optee -- that's basically a master Makefile and submodules for l-loader, ARM TF, edk2, Linux, BusyBox for the root fs, flashing tools, etc.
Also, I use a USB/ethernet adapter occasionally. But most often I work on the UART0 console.
HTH,
Hi Kevin,
<snip>
By taking the latest pre-compiled l-loader.bin from here
https://builds.96boards.org/snapshots/hikey/uefi/26 and using the latest u-boot (v1 patches sent to u-boot ML). I've had to make some small changes, as the latest ATF now secures the top 16Mb of RAM for trustzone which u-boot was using. Also the bl33 executable now gets linked at 0x35000000 rather than 0x37000000, and I'm back to having a working u-boot again :-)
I've added a new directory here with these pre-compiled binaries if you want to try those instead http://people.linaro.org/~peter.griffin/hikey/hikey-uboot-r2/. The main advantage over the u-boot you compiled from source is that it now also supports the sd card slot (saving env to sd, and also has some more commands compiled in by default). serial_trace.txt is a serial dump of it running on my board.
With the l-loader.bin from your _r2 dir, I'm able to get to fastboot now, thanks.
However, flashing your _r2 binaries, I'm still getting USB host timeouts. Full boot log below[1].
Eeek! I just double checked the md5sums of what I uploaded and everything looks fine. Also all the date / timestamps in your log and mine are the same, so annoyingly neither of us appear to have made a mistake.
I've tried with and without my usb eth adapter plugged in. I've tried it plugged into both ports. Just for kicks, I've tried with and without SD card plugged in too since UEFI firmware hangs if SD card plugged in ;) I've also tried on 2 different hikey boards (one of which I thought was bricked but I was able to reflash using l-loader over the real UART.)
Do you have anything plugged into the USB OTG port?
I just managed to replicate Timeouts if I have both the USB ASIX adapter connected to a 'USB Host' port, and also a cable plugged into the 'USB OTG' port simultaneously.
I only have one board at home, but I will try and flash the images onto Lees board and see if that works.
Anyways, not sure what else we have different between our setups, but still no USB host support here, and so no networking.
Thanks for your help and guidance,
No problem, I'm just sorry we haven't managed to get it working for you.
regards,
Peter.
On Thu, May 28, 2015 at 1:16 AM, Peter Griffin peter.griffin@linaro.org wrote:
Hi Kevin,
<snip>
By taking the latest pre-compiled l-loader.bin from here https://builds.96boards.org/snapshots/hikey/uefi/26 and using the latest u-boot (v1 patches sent to u-boot ML). I've had to make some small changes, as the latest ATF now secures the top 16Mb of RAM for trustzone which u-boot was using. Also the bl33 executable now gets linked at 0x35000000 rather than 0x37000000, and I'm back to having a working u-boot again :-)
I've added a new directory here with these pre-compiled binaries if you want to try those instead http://people.linaro.org/~peter.griffin/hikey/hikey-uboot-r2/. The main advantage over the u-boot you compiled from source is that it now also supports the sd card slot (saving env to sd, and also has some more commands compiled in by default). serial_trace.txt is a serial dump of it running on my board.
With the l-loader.bin from your _r2 dir, I'm able to get to fastboot now, thanks.
However, flashing your _r2 binaries, I'm still getting USB host timeouts. Full boot log below[1].
Eeek! I just double checked the md5sums of what I uploaded and everything looks fine. Also all the date / timestamps in your log and mine are the same, so annoyingly neither of us appear to have made a mistake.
I've tried with and without my usb eth adapter plugged in. I've tried it plugged into both ports. Just for kicks, I've tried with and without SD card plugged in too since UEFI firmware hangs if SD card plugged in ;) I've also tried on 2 different hikey boards (one of which I thought was bricked but I was able to reflash using l-loader over the real UART.)
Do you have anything plugged into the USB OTG port?
Yes, I still have the cable used to fastboot plugged in.
I just managed to replicate Timeouts if I have both the USB ASIX adapter connected to a 'USB Host' port, and also a cable plugged into the 'USB OTG' port simultaneously.
Doh! I should've realized that because I now remember Tyler mentioning this limitation when he got it working in LAVA. So you basically have to choose between fastboot and USB host support. Nice tradeoff. ;)
If I unplug the OTG cable, then "usb start" detects the ASIX dongle. Cool.
Next problem... it doesn't seem to DHCP. Does DHCP work for you? Using tcpdump on the LAN, I see it's doing the bootp request, but using a MAC addr of all zeros, even though u-boot tells me it's using the MAC from the adapter, and "usb start" has set usbethaddr accordingly.
Setting static IP addresses, I'm able to TFTP, but checking ARP tables on the TFTP server, it reports an incomplete MAC address also.
Anyways, this is getting much better,
Thanks,
Kevin
Hi Kevin,
<snip>
Do you have anything plugged into the USB OTG port?
Yes, I still have the cable used to fastboot plugged in.
I just managed to replicate Timeouts if I have both the USB ASIX adapter connected to a 'USB Host' port, and also a cable plugged into the 'USB
OTG'
port simultaneously.
Doh! I should've realized that because I now remember Tyler mentioning this limitation when he got it working in LAVA. So you basically have to choose between fastboot and USB host support. Nice tradeoff. ;)
If I unplug the OTG cable, then "usb start" detects the ASIX dongle. Cool.
Brilliant :-) that is excellent news
Next problem... it doesn't seem to DHCP. Does DHCP work for you?
I think I tried it initially when I got the port going, it didn't work and I set a static address to progress and so far never went back to debug why.
Using tcpdump on the LAN, I see it's doing the bootp request, but using a MAC addr of all zeros, even though u-boot tells me it's using the MAC from the adapter, and "usb start" has set usbethaddr accordingly.
Setting static IP addresses, I'm able to TFTP, but checking ARP tables on the TFTP server, it reports an incomplete MAC address also.
Ah interesting, you've debugged it more than me I'm afraid. It would certainly be good to get this working properly.
The good news is Iterating with U-Boot versions is now *much* quicker when you can tftp into RAM and don't have to faff with jumpers and fastboot not enumerating as a USB device ;-)
regards,
Peter.
On Thu, May 28, 2015 at 12:07 PM, Peter Griffin peter.griffin@linaro.org wrote:
Hi Kevin,
<snip>
Do you have anything plugged into the USB OTG port?
Yes, I still have the cable used to fastboot plugged in.
I just managed to replicate Timeouts if I have both the USB ASIX adapter connected to a 'USB Host' port, and also a cable plugged into the 'USB OTG' port simultaneously.
Doh! I should've realized that because I now remember Tyler mentioning this limitation when he got it working in LAVA. So you basically have to choose between fastboot and USB host support. Nice tradeoff. ;)
If I unplug the OTG cable, then "usb start" detects the ASIX dongle. Cool.
Brilliant :-) that is excellent news
Next problem... it doesn't seem to DHCP. Does DHCP work for you?
I think I tried it initially when I got the port going, it didn't work and I set a static address to progress and so far never went back to debug why.
Heh, that's my plan as well. I've already spent way to much time getting annoyed at the firmware of this platform.
Using tcpdump on the LAN, I see it's doing the bootp request, but using a MAC addr of all zeros, even though u-boot tells me it's using the MAC from the adapter, and "usb start" has set usbethaddr accordingly.
Setting static IP addresses, I'm able to TFTP, but checking ARP tables on the TFTP server, it reports an incomplete MAC address also.
Ah interesting, you've debugged it more than me I'm afraid. It would certainly be good to get this working properly.
The good news is Iterating with U-Boot versions is now *much* quicker when you can tftp into RAM and don't have to faff with jumpers and fastboot not enumerating as a USB device ;-)
Agreed. Also, for my automation farm, u-boot with netboot is *so* easy to deal with. Now, as soon as hikey it's mainline, it will be included in the kernelci.org results.
Thanks again for all your help, and let me know if you want me to test mainline u-boot versions as they're coming out and fixing issues.
Kevin
On Wed, May 27, 2015 at 05:30:12PM +0100, Peter Griffin wrote:
[...]
Yes OK so apologies on that one, I also had two patches applied on top of the ATF SHA mentioned in the readme to get my l-loader.bin compiled from source working. One of those patches added barriers in the mmio routines and the other added the packed attribute to some USB structure, that got around the 1hz numbers bug. I believe both of those changes are merged in upstream ATF now.
Anyway I thought I should try u-boot with the latest ATF code and check it still works. However compiling the latest ATF / l-loader code from source I don't get something that boots :-( so there seems to be new issues there (probably pilot error as the pre-built binaries work OK for me). I've not debugged that any further.
By taking the latest pre-compiled l-loader.bin from here https://builds.96boards.org/snapshots/hikey/uefi/26 and using the latest u-boot (v1 patches sent to u-boot ML). I've had to make some small changes, as the latest ATF now secures the top 16Mb of RAM for trustzone which u-boot was using. Also the bl33 executable now gets linked at 0x35000000 rather than 0x37000000, and I'm back to having a working u-boot again :-)
Hi Peter,
Do you have any update for using latest ATF + uboot? :)
- I tried two ATF versions, one version is to follow up u-boot-readme.txt to checkout commit log:
git checkout 9a97502e8b3247dee95d4f0b48fc5d7154f40609
Finally i saw ATF will trap into exception, so this very likely with memory barrier issues we found before (Or caused by DDR init).
- Also tried latest ATF + uboot but cannot boot up; do you have some extra patches to fix this issue?
i found the memory node in DTB will be overwritten in uboot, so want to build uboot to debug this issue.
Thanks, Leo Yan
Hi Leo,
On 9 October 2015 at 09:00, Leo Yan leo.yan@linaro.org wrote:
On Wed, May 27, 2015 at 05:30:12PM +0100, Peter Griffin wrote:
[...]
Do you have any update for using latest ATF + uboot? :)
The lastest U-Boot code which incorporates my latest patches is v2015.10-rc4 from upstream U-Boot tree here http://git.denx.de/u-boot.git .
I was running with that patch series OK on top of v2015.10-rc3 (so I've not actually tried -rc4, but -rc4 incorporates my latest series).
I was running that in conjunction with the ATF which switched to UART3 which was commit 9f96699c5b62ff1381d8b8838a66329eff2914ce. That setup was working OK for me.
I tried two ATF versions, one version is to follow up u-boot-readme.txt to checkout commit log:
git checkout 9a97502e8b3247dee95d4f0b48fc5d7154f40609
Finally i saw ATF will trap into exception, so this very likely with memory barrier issues we found before (Or caused by DDR init).
That could be U-Boot relocating itself into the 16Mb TrustZone secured area of RAM. A patch in -rc4 fixes that (05e682d46799de7be0ed3200ae2543d47a35fe7b).
- Also tried latest ATF + uboot but cannot boot up; do you have some extra patches to fix this issue?
Are you using the mainline U-Boot, v2015.10-rc4?
i found the memory node in DTB will be overwritten in uboot, so want to build uboot to debug this issue.
Ok, sounds good :)
regards,
Peter
Hi Peter,
On Fri, Oct 09, 2015 at 09:43:35AM +0100, Peter Griffin wrote:
On 9 October 2015 at 09:00, Leo Yan leo.yan@linaro.org wrote:
On Wed, May 27, 2015 at 05:30:12PM +0100, Peter Griffin wrote:
[...]
Do you have any update for using latest ATF + uboot? :)
The lastest U-Boot code which incorporates my latest patches is v2015.10-rc4 from upstream U-Boot tree here http://git.denx.de/u-boot.git .
I was running with that patch series OK on top of v2015.10-rc3 (so I've not actually tried -rc4, but -rc4 incorporates my latest series).
I was running that in conjunction with the ATF which switched to UART3 which was commit 9f96699c5b62ff1381d8b8838a66329eff2914ce. That setup was working OK for me.
Thanks a lot for help :)
With latest u-boot, it can boot successfully now. Before i used git-hub's code base, looks like it's obsolete.
Thanks, Leo Yan