On Tue, Nov 03, 2015 at 08:33:33PM +0000, Dietmar Eggemann wrote:
Hi Leo,
On 30/10/15 03:12, Leo Yan wrote:
Hi Dietmar,
On Thu, Oct 29, 2015 at 04:30:00PM +0000, Dietmar Eggemann wrote:
On 29/10/15 14:36, Dietmar Eggemann wrote:
On 21/10/15 02:56, Leo Yan wrote:
[...]
Please NOTE, now hi6220's code base have changed to use UART3 as default console. If you have not a extenstion board for UART3, you can use UART0 still.
thanks for sharing the build environment! I guess it was because of the UART change (from UART0 to UART3) that I didn't succeed initially following the info provided on https://github.com/96boards/documentation/wiki/HiKeyUEFI .
I was able to build:
l-loader.bin fip.bin ptable-linux.img and AndroidFastbootApp.efi
from the sources and took
grubaa64.efi initrd.img nvme.img grub_AMA0.cfg
from http://people.linaro.org/~leo.yan/hi6220_dev/output ,
flashed it onto my hikey board and got my Debian FS on the sdcard booting.
After a couple of tries the hikey board is not responding any more to fastboot commands after I loaded l-loaded.bin in recovery mode (pin1-pin2 and pin3-pin4 on J15 are set).
$ sudo python hisi-idt.py -d /dev/ttyUSB2 --img1=l-loader.bin +----------------------+ Serial: /dev/ttyUSB2 Image1: l-loader.bin Image2: +----------------------+
Sending l-loader.bin ... Done
$ sudo env "PATH=$PATH" fastboot flash ptable ptable-linux.img < waiting for device >
... waits here forever with User LED 0 on.
Have no questions for the steps of burning images.
After burn image 'l-loader.bin', you can check PC side if dump below info:
leoy@leoy-linaro:~$ sudo dmesg -c [52045.180850] usb 1-1.1.3: USB disconnect, device number 46 [52045.181032] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 [52045.181048] option 1-1.1.3:1.0: device disconnected [52045.393983] usb 1-1.1.3: new high-speed USB device number 47 using ehci-pci [52045.499062] usb 1-1.1.3: New USB device found, idVendor=18d1, idProduct=d00d [52045.499067] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [52045.499069] usb 1-1.1.3: Product: Android 2.0 [52045.499071] usb 1-1.1.3: Manufacturer: Androi [52045.499072] usb 1-1.1.3: SerialNumber: 0123456789ABCDEF
leoy@leoy-linaro:~/Work/hisi/boot/l-loader$ sudo fastboot devices 0123456789ABCDEF fastboot
So that means it has prepared successfully for "fastboot", otherwise we can get to know 'l-loader.bin' has not successfully initialized protocol for "fastboot".
If I boot in 'normal' mode (pin1-pin2 set) I get the following output on UART0:
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):1b9a4b277314 NOTICE: BL1: Built : 13:43:57, Nov 3 2015 NOTICE: syspll frequency:1190494208Hz INFO: rdet ds fail INFO: rdet ds fail INFO: rdet ds fail ...
"INFO: rdet ds fail", it's related with DDR's initialization; below log info is when bl1 has initailized DDR successfully.
Switch to aarch64 mode. CPU0 executes at 0xf9801000! NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(release):ca9f7ed NOTICE: BL1: Built : 11:05:40, Nov 4 2015 NOTICE: syspll frequency:1190494208Hz 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: Enter fastboot mode...
At least below things are deserved to get a quick try:
- Could you directly try below images: http://people.linaro.org/~leo.yan/hi6220_dev/output/l-loader_DDR_533MHz.bin http://people.linaro.org/~leo.yan/hi6220_dev/output/fip_DDR_533MHz.bin
We can use this way to confirm DDR can work well;
- If it's lucky with upper images, can continue to try 800MHz DRR: http://people.linaro.org/~leo.yan/hi6220_dev/output/l-loader_DDR_800MHz.bin http://people.linaro.org/~leo.yan/hi6220_dev/output/fip_DDR_800MHz.bin
- If all of them can work well, then we can check if build enviornment is same b/t both sides. Before we found some toolchain will introduce DDR initialization failed.
leoy@leoy-linaro:~/Work/hisi/boot$ aarch64-linux-gnu-gcc --version aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
leoy@leoy-linaro:~/Work/hisi/boot/l-loader$ arm-linux-gnueabi-gcc --version arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Also Loop in Haojian for DDR initialization, who is best know this. Haojian, could you please review upper log and give suggestion as needed?
If I try to prepare fastboot with hisi-idt.py it fails too (in recovery mode):
$ sudo python hisi-idt.py -d /dev/ttyUSB2 --img1 fastboot1.img --img2 fastboot2.img +----------------------+ Serial: /dev/ttyUSB2 Image1: fastboot1.img Image2: fastboot2.img +----------------------+
Sending fastboot1.img ... Done
Sending fastboot2.img ... failed
I hope that this board isn't bricked? Any help highly appreciated!
From upper log, at least we can know SoC works well (internal SRAM, on chip ROM);
but we need firstly narrow down for DDR. Hope it's only a software issue.
[...]
Thanks, Leo Yan