[U-Boot] U-Boot SPL 2016.09-rc1 on NTC C.H.I.P.

Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
Thanks, Marcus

Hi Marcus,
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
I do not have any idea. What I can only recommend - please use last working release (2015.10) and perform git bisect.
Thanks, Marcus
Best regards, Lukasz Majewski

On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
You're not talking about mainline when you say v2015.10, are you? IIRC the current state of CHIP support in mainline is that we don't have NAND support so it's not useful just yet.

On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
You're not talking about mainline when you say v2015.10, are you? IIRC the current state of CHIP support in mainline is that we don't have NAND support so it's not useful just yet.
You sure? When I read to commit history correctly SPL NAND support for sunxi has been introduced 2015-08:
2015-08-08 Piotr Zierhoffer sunxi: nand: Add basic sunxi NAND driver for SPL with...
I'm booting the C.H.I.P. with mainline SPL 2015.10 and let it load U-Boot 2016.09-rc1:
U-Boot SPL 2015.10 (Dec 22 2015 - 20:46:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2016.09-rc1 (Jul 31 2016 - 16:37:00 +0200) Allwinner Technology
CPU: Allwinner A13 (SUN5I) Model: NextThing C.H.I.P. I2C: ready DRAM: 512 MiB NAND: 8192 MiB Using default environment
My question still is if somebody knows why SPL 2016.09-rc1 fails? Maybe I should revert the changes step by step and see which one broke it.

Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
You're not talking about mainline when you say v2015.10, are you? IIRC the current state of CHIP support in mainline is that we don't have NAND support so it's not useful just yet.
You sure?
Yes, for one mainline u-boot configs/CHIP_defconfig does not select SPL nand support...
We have some code in mainline u-boot but the nand code is not complete so it never got enabled. Boris Brezillon is working on this and he is making good progress.
Boris what is the status on this ?
Regards,
Hans

Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
You're not talking about mainline when you say v2015.10, are you? IIRC the current state of CHIP support in mainline is that we don't have NAND support so it's not useful just yet.
That's not the case anymore (the sunxi_nand driver has been merged recently and is part of 2016.09-rc1). Or at least, you should now be able to boot uboot from NAND (SPL + uboot loaded from NAND). For the rest (loading a kernel from NAND within u-boot), it's another story. It should work, but as you might already know, MLC NANDs are unreliable. We're working on UBI to make those NANDs usable in a reliable way, but those bits haven't been mainlined in Linux yet (actually it's not even ready for submission). This is why I want to keep NAND support disabled on all setup embedding an MLC NAND. AFAIK, there's not sunxi board with MLC NANDs, so this means disabling NAND on all sunxi configs.
You sure?
The SPL driver was present in 2015.10, but I still doubt you were using a mainline version of u-boot. It's probably flashed with [1].
Yes, for one mainline u-boot configs/CHIP_defconfig does not select SPL nand support...
That's what I was talking about. Not sure I want to enable booting from NAND by default until the whole chain (SPL -> UBOOT -> Linux) is really reliable.
We have some code in mainline u-boot but the nand code is not complete so it never got enabled. Boris Brezillon is working on this and he is making good progress.
Boris what is the status on this ?
Well, the NAND part is ready (the sunxi_nand driver is there and has been tested, and the SPL driver has been recently improved to auto-detect the ECC config). The real problem is MLC support in general, and this is not only impacting sunxi platforms, but all platforms booting from and MLC NAND. We're working on this aspect with Richard, and will hopefully have something to share/submit by the end of the year.
Regards,
Boris
[1]https://github.com/NextThingCo/CHIP-u-boot/tree/nextthing/2015.10/next

+Glaucio who is facing the same problem but on a cubieboard2.
On Sun, 21 Aug 2016 16:14:39 +0200 Boris Brezillon boris.brezillon@free-electrons.com wrote:
Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
Just tried to boot a mainline uboot on my CHIP and it boots fine [1]. Here is my .config [2], can you compare yours with this one?
Can you also detail how you flash the images?
Thanks,
Boris
[1]http://code.bulix.org/xr8n68-105114 [2]http://code.bulix.org/hft09x-105116

Hi all,
so, the difference between the 2 .config as it follows[1] and the .config as is[2].
And the procedures:
# dd if=u-boot-dtb.bin of=/root/u-boot-dtb.bin bs=2M conv=sync # sunxi-nand-image-builder -p 8192 -o 640 -e 0x200000 -s -b -u 4096 -c 64/1024 spl/sunxi-spl.bin /root/sunxi-spl.bin (BUILDING IMAGE FOR HYNIX H27UBG8T2BTR-BC, VALUES FROM DATASHEET)
# for a in $(echo {0..3}); do flash_erase /dev/mtd${a} 0 0; done Erasing 2048 Kibyte @ 0 -- 100 % complete Erasing 2048 Kibyte @ 0 -- 100 % complete Erasing 2048 Kibyte @ 0 -- 100 % complete Erasing 2048 Kibyte @ 0 -- 100 % complete
# nandwrite -o -n /dev/mtd0 sunxi-spl.bin Writing data to block 0 at offset 0x0 # nandwrite -o -n /dev/mtd1 sunxi-spl.bin Writing data to block 0 at offset 0x0 # nandwrite /dev/mtd2 u-boot-dtb.bin Writing data to block 0 at offset 0x0 # nandwrite /dev/mtd3 u-boot-dtb.bin Writing data to block 0 at offset 0x0
U-Boot SPL 2016.09-rc1-14223-gfcada3b-dirty (Aug 22 2016 - 23:45:03) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
I also added these lines to include/configs/sunxi_common.h[3]
With the u-boot-sunxi-with-spl.bin on a SD Card, NAND gets detected fine and I can even boot from it.
If I add some traces in the middle of the code telling me the possible ECC configs the SPL will try, it will print only one and then gets the error. The stranger thing is that it will go no further in device detection to boot, no MMC, SATA or LAN.
It produces spl/drivers/mtd/nand/sunxi_nand_spl.o, which I can see in compilation process, later on that directory.
Hope this can help out!
Thanks in advance!
[1]http://pastebin.com/yVNV66x4 [2]http://pastebin.com/rzCDXvDt [3]http://pastebin.com/zTC3Y1hS
2016-08-22 4:55 GMT-03:00 Boris Brezillon < boris.brezillon@free-electrons.com>:
+Glaucio who is facing the same problem but on a cubieboard2.
On Sun, 21 Aug 2016 16:14:39 +0200 Boris Brezillon boris.brezillon@free-electrons.com wrote:
Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board
I
face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200) U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking
after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
Just tried to boot a mainline uboot on my CHIP and it boots fine [1]. Here is my .config [2], can you compare yours with this one?
Can you also detail how you flash the images?
Thanks,
Boris
[1]http://code.bulix.org/xr8n68-105114 [2]http://code.bulix.org/hft09x-105116

On Mon, Aug 22, 2016 at 09:55:01AM +0200, Boris Brezillon wrote:
+Glaucio who is facing the same problem but on a cubieboard2.
On Sun, 21 Aug 2016 16:14:39 +0200 Boris Brezillon boris.brezillon@free-electrons.com wrote:
Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote:
Hello,
While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I face following issue with U-Boot SPL 2016.09-rc1 on it:
bash-4.3# cu -l /dev/cuaU0 -s 115200 Connected to /dev/cuaU0 (speed 115200)
U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) DRAM: 512 MiB CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from NAND ### ERROR ### Please RESET the board ###
Any ideas what change did cause this or where to start looking after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
Just tried to boot a mainline uboot on my CHIP and it boots fine [1]. Here is my .config [2], can you compare yours with this one?
Can you also detail how you flash the images?
Thanks for sharing your configuration! Based on that I was able to narrow down the configuration parameter which makes SPL 2016.09-rc1 now work on my allwinner,sun5i-r8 board as well:
+CONFIG_USE_PRIVATE_LIBGCC=n
When I don't set it explicitly I get 'CONFIG_USE_PRIVATE_LIBGCC=y' in my .config. Could it be that it was set to 'n' by default in previous releases?
Thanks, Marcus

On Tue, 23 Aug 2016 20:05:59 +0200 Marcus Glocker marcus@nazgul.ch wrote:
On Mon, Aug 22, 2016 at 09:55:01AM +0200, Boris Brezillon wrote:
+Glaucio who is facing the same problem but on a cubieboard2.
On Sun, 21 Aug 2016 16:14:39 +0200 Boris Brezillon boris.brezillon@free-electrons.com wrote:
Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote: > Hello, > > While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I > face following issue with U-Boot SPL 2016.09-rc1 on it: > > bash-4.3# cu -l /dev/cuaU0 -s 115200 > Connected to /dev/cuaU0 (speed 115200) > > U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) > DRAM: 512 MiB > CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from NAND > ### ERROR ### Please RESET the board ### > > Any ideas what change did cause this or where to start looking after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
Just tried to boot a mainline uboot on my CHIP and it boots fine [1]. Here is my .config [2], can you compare yours with this one?
Can you also detail how you flash the images?
Thanks for sharing your configuration! Based on that I was able to narrow down the configuration parameter which makes SPL 2016.09-rc1 now work on my allwinner,sun5i-r8 board as well:
+CONFIG_USE_PRIVATE_LIBGCC=n
When I don't set it explicitly I get 'CONFIG_USE_PRIVATE_LIBGCC=y' in my .config. Could it be that it was set to 'n' by default in previous releases?
Yep. This is enabled by default on ARM platforms since 2016.07 (see commit 91b86e21564d ("lib: Enable private libgcc by default")). Now, this does not explain why the SPL code does not work correctly with the internal libgcc implem.
Thanks, Marcus

On Tue, Aug 23, 2016 at 09:41:21PM +0200, Boris Brezillon wrote:
On Tue, 23 Aug 2016 20:05:59 +0200 Marcus Glocker marcus@nazgul.ch wrote:
On Mon, Aug 22, 2016 at 09:55:01AM +0200, Boris Brezillon wrote:
+Glaucio who is facing the same problem but on a cubieboard2.
On Sun, 21 Aug 2016 16:14:39 +0200 Boris Brezillon boris.brezillon@free-electrons.com wrote:
Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
> On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote: >> Hello, >> >> While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I >> face following issue with U-Boot SPL 2016.09-rc1 on it: >> >> bash-4.3# cu -l /dev/cuaU0 -s 115200 >> Connected to /dev/cuaU0 (speed 115200) >> >> U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) >> DRAM: 512 MiB >> CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 >> Trying to boot from NAND >> ### ERROR ### Please RESET the board ### >> >> Any ideas what change did cause this or where to start looking after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
Just tried to boot a mainline uboot on my CHIP and it boots fine [1]. Here is my .config [2], can you compare yours with this one?
Can you also detail how you flash the images?
Thanks for sharing your configuration! Based on that I was able to narrow down the configuration parameter which makes SPL 2016.09-rc1 now work on my allwinner,sun5i-r8 board as well:
+CONFIG_USE_PRIVATE_LIBGCC=n
When I don't set it explicitly I get 'CONFIG_USE_PRIVATE_LIBGCC=y' in my .config. Could it be that it was set to 'n' by default in previous releases?
Yep. This is enabled by default on ARM platforms since 2016.07 (see commit 91b86e21564d ("lib: Enable private libgcc by default")). Now, this does not explain why the SPL code does not work correctly with the internal libgcc implem.
Can you reproduce the issue when compiling on your side using the internal libgcc? Since here I'm using gcc-linaro to cross-compile it.

On Tue, Aug 23, 2016 at 08:05:59PM +0200, Marcus Glocker wrote:
On Mon, Aug 22, 2016 at 09:55:01AM +0200, Boris Brezillon wrote:
+Glaucio who is facing the same problem but on a cubieboard2.
On Sun, 21 Aug 2016 16:14:39 +0200 Boris Brezillon boris.brezillon@free-electrons.com wrote:
Hi,
On Sun, 21 Aug 2016 12:03:19 +0200 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 21-08-16 11:01, Marcus Glocker wrote:
On Sat, Aug 20, 2016 at 03:05:38PM -0400, Tom Rini wrote:
On Sat, Aug 20, 2016 at 07:26:19AM +0200, Marcus Glocker wrote: > Hello, > > While U-Boot SPL 2015.10 works fine on my allwinner,sun5i-r8 board I > face following issue with U-Boot SPL 2016.09-rc1 on it: > > bash-4.3# cu -l /dev/cuaU0 -s 115200 > Connected to /dev/cuaU0 (speed 115200) > > U-Boot SPL 2016.09-rc1 (Jul 31 2016 - 16:37:00) > DRAM: 512 MiB > CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from NAND > ### ERROR ### Please RESET the board ### > > Any ideas what change did cause this or where to start looking after?
Markus, can you share your .config? I tested the different bits while submitting the NAND driver and the SPL NAND driver improvements and it was working fine. I'll try to test 2016.09-rc1 tomorrow.
Just tried to boot a mainline uboot on my CHIP and it boots fine [1]. Here is my .config [2], can you compare yours with this one?
Can you also detail how you flash the images?
Thanks for sharing your configuration! Based on that I was able to narrow down the configuration parameter which makes SPL 2016.09-rc1 now work on my allwinner,sun5i-r8 board as well:
+CONFIG_USE_PRIVATE_LIBGCC=n
When I don't set it explicitly I get 'CONFIG_USE_PRIVATE_LIBGCC=y' in my .config. Could it be that it was set to 'n' by default in previous releases?
What toolchain exactly are you using? Thanks!

Dear Marcus,
In message 20160821090110.GA7497@gollum.nazgul.ch you wrote:
My question still is if somebody knows why SPL 2016.09-rc1 fails? Maybe I should revert the changes step by step and see which one broke it.
This is a job which can be automated using tbot...
Best regards,
Wolfgang Denk
participants (7)
-
Boris Brezillon
-
Glaucio Klipel
-
Hans de Goede
-
Lukasz Majewski
-
Marcus Glocker
-
Tom Rini
-
Wolfgang Denk