
On Tue, 14 Mar 2017 20:06:42 +0530 Anand Moon linux.amoon@gmail.com wrote:
On 14 March 2017 at 15:24, Siarhei Siamashka siarhei.siamashka@gmail.com wrote:
You can just clone my git branch:
git clone -b 20170306-unbreak-odroid https://github.com/ssvb/u-boot.git
Then compile it and try to boot on your ODROID-U3 board. Check if it boots and if the Ethernet is working properly. And finally report the results. If it works, then I will send cleaned up versions of these patches to the U-Boot mailing list.
[snip]
I dont feel the hack works perfectly.
Thanks for trying it.
Yes, these patches were not supposed to be perfect yet. But at least it's good that the ODROID-U3 board model gets detected successfully and the Ethernet gets initialized successfully at least on the first run.
I compiled your u-boot tree and could not load the kernel.
Well, at least it is not a regression introduced by my patches, right?
[0] git clone -b 20170306-unbreak-odroid https://github.com/ssvb/u-boot.git
U-Boot 2017.03-rc3-00006-g3dd6fdb (Mar 14 2017 - 13:54:08 +0000)
CPU: Exynos4412 @ 1 GHz Model: Odroid based on Exynos4412 Board: Odroid based on Exynos4412 Type: u3 DRAM: 2 GiB LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling MMC: SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1 *** Warning - bad CRC, using default environment
Net: No ethernet found. Hit any key to stop autoboot: 0 reading boot.scr 3174 bytes read in 49 ms (62.5 KiB/s) ## Executing script at 42000000 Found kernel image: zImage reading exynos4412-odroidu3.dtb 54561 bytes read in 23 ms (2.3 MiB/s) Found ramdisk image. reading uInitrd 9873974 bytes read in 679 ms (13.9 MiB/s) reading zImage 6552912 bytes read in 460 ms (13.6 MiB/s) Kernel image @ 0x40007fc0 [ 0x000000 - 0x63fd50 ] ## Loading init Ramdisk from Legacy Image at 42000000 ... Image Name: uInitrdu3 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9873910 Bytes = 9.4 MiB Load Address: 42000000 Entry Point: 42000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 40800000 Booting using the fdt blob at 0x40800000 Loading Ramdisk to ba4d6000, end bae409f6 ... OK Loading Device Tree to ba4c5000, end ba4d5520 ... OK
Starting kernel ...
After that I had to remove my zImage and exynos4412-odroidu3.dtb to enter into u-boot prompt to manually test.
Have you just dropped the dtb file and zImage on the first partition of the SD card?
Yes, I can confirm that without having a boot script there and using scripts from the default U-Boot environment it does get stuck in exactly this way.
You can create something like the following "boot.cmd" file (it's just a chopped up version of something ODROID related found on the Internet):
######################## setenv zimg_addr "0x40008000" setenv fdt_addr "0x41f00000" setenv fdt_high "0xffffffff"
setenv zimg_file "zImage" setenv uloadcmd "load mmc 0:1 ${zimg_addr} ${zimg_file}; fatload mmc 0:1 ${fdt_addr} ${fdtfile}" setenv bootcmd "run uloadcmd; fdt addr ${fdt_addr}; fdt resize; bootz ${zimg_addr} - ${fdt_addr}" boot ########################
Then create a boot script from this file using the following command: "mkimage -C none -A arm -T script -d boot.cmd boot.scr"
Then the "boot.scr" file should be copied to the SD card. The linux kernel should at least start booting. But you will also need to provide a kernel cmdline with the location of your rootfs.
I think that we should review the default boot scripts in the U-Boot environment for Exynos based ODROID bords. As you can see, the current behaviour is very hostile to the users.
U-Boot 2017.03-rc3-00006-g3dd6fdb (Mar 14 2017 - 13:54:08 +0000)
CPU: Exynos4412 @ 1 GHz Model: Odroid based on Exynos4412 Board: Odroid based on Exynos4412 Type: u3 DRAM: 2 GiB LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling MMC: SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1 *** Warning - bad CRC, using default environment
Net: No ethernet found. Hit any key to stop autoboot: 0 reading boot.scr 3174 bytes read in 26 ms (119.1 KiB/s) ## Executing script at 42000000 Odroid # Odroid # Odroid # ▒
U-Boot 2017.03-rc3-00006-g3dd6fdb (Mar 14 2017 - 13:54:08 +0000)
CPU: Exynos4412 @ 1 GHz Model: Odroid based on Exynos4412 Board: Odroid based on Exynos4412 Type: u3 DRAM: 2 GiB LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling MMC: SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1 *** Warning - bad CRC, using default environment
Net: No ethernet found. Hit any key to stop autoboot: 0 reading boot.scr 3174 bytes read in 49 ms (62.5 KiB/s) ## Executing script at 42000000 Odroid # setenv usbethaddr 02:DE:AD:BE:EF:FF Odroid # usb start starting USB... USB0: ERROR: Regulator BUCK8 value setting error: -22 at board/samsung/odroid/odroid.c:508/board_usb_init() USB EHCI 1.00 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... 1 Ethernet Device(s) found Odroid # Odroid # Odroid # reset resetting ...
U-Boot 2017.03-rc3-00006-g3dd6fdb (Mar 14 2017 - 13:54:08 +0000)
CPU: Exynos4412 @ 1 GHz Model: Odroid based on Exynos4412 Board: Odroid based on Exynos4412 Type: u3 DRAM: 2 GiB LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling MMC: SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1 *** Warning - bad CRC, using default environment
Net: No ethernet found. Hit any key to stop autoboot: 0 reading boot.scr 3174 bytes read in 27 ms (114.3 KiB/s) ## Executing script at 42000000 Odroid # Odroid # Odroid # setenv usbethaddr 02:DE:AD:BE:EF:FF Odroid # usb start starting USB... USB0: ERROR: Regulator BUCK8 value setting error: -22 at board/samsung/odroid/odroid.c:508/board_usb_init() USB EHCI 1.00 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 Odroid #
Note: on cold boot it seem to detect ethernet but not on warm reset
Possible solution is reset of HUB via gpio pins, just like the kernel example.
[1] https://lkml.org/lkml/2017/1/7/32
Looking into some other solution for this approach.
Thanks. I'll try to debug the Ethernet initialization after warm reset.