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#