Discussion:
[OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3 package dependency
Antti Seppälä
2015-01-25 12:52:48 UTC
Permalink
After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
Fix empty menuconfig bootloader selection by making u-boot depend on
one of the new target profiles.

Signed-off-by: Antti Seppälä <***@gmail.com>
---
package/boot/uboot-lantiq/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile
index d2b868f..d59aac8 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
SOC:=vr9
DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
- DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
+ DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
endef

define uboot/p2812hnufx_nandspl
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
SOC:=vr9
IMAGE:=u-boot.ltq.lzo.nandspl
- DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
+ DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
endef
--
2.0.5
Sylwester Petela
2015-01-25 14:17:28 UTC
Permalink
Post by Antti Seppälä
After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
Fix empty menuconfig bootloader selection by making u-boot depend on
one of the new target profiles.
---
package/boot/uboot-lantiq/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile
index d2b868f..d59aac8 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
SOC:=vr9
DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
endef
define uboot/p2812hnufx_nandspl
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
SOC:=vr9
IMAGE:=u-boot.ltq.lzo.nandspl
endef
That patch will fix target deps but U-Boot for this boards needs fixing.
P-2812HNU-F1 is NAND based, needs NAND_TPL image instead of SPL (needs patches provided by Antonios Vamporakis in branch "stable_fixes_for_daniel_20140109" on Daniel github)
P-2812HNU-F3 is NOR/NAND based (boots from NOR), NOR needs to be added in board definition .

So ATM U-Boot for this boards is broken.
Antti Seppälä
2015-01-25 18:57:15 UTC
Permalink
Post by Sylwester Petela
Post by Antti Seppälä
After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
Fix empty menuconfig bootloader selection by making u-boot depend on
one of the new target profiles.
---
package/boot/uboot-lantiq/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile
index d2b868f..d59aac8 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
SOC:=vr9
DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
endef
define uboot/p2812hnufx_nandspl
TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
SOC:=vr9
IMAGE:=u-boot.ltq.lzo.nandspl
endef
That patch will fix target deps but U-Boot for this boards needs fixing.
P-2812HNU-F1 is NAND based, needs NAND_TPL image instead of SPL (needs patches provided by Antonios Vamporakis in branch "stable_fixes_for_daniel_20140109" on Daniel github)
P-2812HNU-F3 is NOR/NAND based (boots from NOR), NOR needs to be added in board definition .
So ATM U-Boot for this boards is broken.
I tried and it seems the ram version
(openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.

The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
correctly. Is anyone working on fixing it? (Apparently conversion to
TPL is needed)
For F1 board it looks to me that it is just a matter of updating
u-boot version in openwrt repository and adding a few patches on top
of that.

Br,
--
Antti
Ben Mulvihill
2015-01-27 17:41:44 UTC
Permalink
Hi Antti,

(Note that the diffs in this message are for information. They are not
patches submitted for merging - not at this stage anyway.)
Post by Antti Seppälä
I tried and it seems the ram version
(openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.
The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
correctly. Is anyone working on fixing it? (Apparently conversion to
TPL is needed)
I am working on the BT Home Hub 3A at the moment (arx100, nand-based
board), and have also found that asc images build correctly but
nandspl images do not.

There seem to a number of problems. For a start some of the make
targets seem to be missing. The following fixed that for arx100,
and I think that a similar fix is necessary for danube and vrx200
too.

--- a/arch/mips/cpu/mips32/arx100/config.mk 2015-01-27 12:33:32.000000000 +0100
+++ b/arch/mips/cpu/mips32/arx100/config.mk 2015-01-27 18:07:37.000000000 +0100
@@ -27,4 +27,9 @@ ALL-y += $(obj)u-boot.ltq.norspl
ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.norspl
ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.norspl
endif
+ifdef CONFIG_SYS_BOOT_NANDSPL
+ALL-y += $(obj)u-boot.ltq.nandspl
+ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.nandspl
+ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.nandspl
+endif
endif


Then the ebu configuration word needs to be set in the nandspl
image, as it is for norspl. Once again, the following fixed that
for arx100, and I think something similar will be required for danube
and vrx200.

--- a/arch/mips/include/asm/arch-arx100/config.h 2015-01-27 18:12:32.000000000 +0100
+++ b/arch/mips/include/asm/arch-arx100/config.h 2015-01-27 18:13:02.000000000 +0100
@@ -174,6 +174,10 @@
#define CONFIG_XWAY_SWAP_BYTES
#endif

+#if defined(CONFIG_SYS_BOOT_NAND) || defined(CONFIG_SYS_BOOT_NANDSPL)
+#define CONFIG_SYS_XWAY_EBU_BOOTCFG 0x688C688C
+#endif
+
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE

#endif /* __ARX100_CONFIG_H__ */

Finally the ltq-boot-image tool adds a couple of download header to the
final image which I don't think should be there.

Daniel, does all the above make sense?

That said, even after making those changes my nandspl images still
don't work.

Ben
Daniel Schwierzeck
2015-01-29 14:26:40 UTC
Permalink
Post by Ben Mulvihill
Hi Antti,
(Note that the diffs in this message are for information. They are not
patches submitted for merging - not at this stage anyway.)
Post by Antti Seppälä
I tried and it seems the ram version
(openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.
The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
correctly. Is anyone working on fixing it? (Apparently conversion to
TPL is needed)
I am working on the BT Home Hub 3A at the moment (arx100, nand-based
board), and have also found that asc images build correctly but
nandspl images do not.
There seem to a number of problems. For a start some of the make
targets seem to be missing. The following fixed that for arx100,
and I think that a similar fix is necessary for danube and vrx200
too.
the NAND boot does not work yet. I was not able to make it work with a
SPL only because the BootROM only reads the first page. The Lantiq UGW
U-Boot uses a very small pre-loader which loads another pre-loader and
fits in the first page. Thus we need to convert to SPL/TPL support
from mainline U-Boot. But I hadn't enough time yet to work on it.
Post by Ben Mulvihill
--- a/arch/mips/cpu/mips32/arx100/config.mk 2015-01-27 12:33:32.000000000 +0100
+++ b/arch/mips/cpu/mips32/arx100/config.mk 2015-01-27 18:07:37.000000000 +0100
@@ -27,4 +27,9 @@ ALL-y += $(obj)u-boot.ltq.norspl
ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.norspl
ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.norspl
endif
+ifdef CONFIG_SYS_BOOT_NANDSPL
+ALL-y += $(obj)u-boot.ltq.nandspl
+ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.nandspl
+ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.nandspl
+endif
endif
Then the ebu configuration word needs to be set in the nandspl
image, as it is for norspl. Once again, the following fixed that
for arx100, and I think something similar will be required for danube
and vrx200.
actually the BootROM should correctly configure the EBU to be able to
read at least the first page from NAND flash. The XWAY_EBU_BOOTCFG is
only used for parallel NOR to setup various command timings and
delays.
Post by Ben Mulvihill
--- a/arch/mips/include/asm/arch-arx100/config.h 2015-01-27 18:12:32.000000000 +0100
+++ b/arch/mips/include/asm/arch-arx100/config.h 2015-01-27 18:13:02.000000000 +0100
@@ -174,6 +174,10 @@
#define CONFIG_XWAY_SWAP_BYTES
#endif
+#if defined(CONFIG_SYS_BOOT_NAND) || defined(CONFIG_SYS_BOOT_NANDSPL)
+#define CONFIG_SYS_XWAY_EBU_BOOTCFG 0x688C688C
+#endif
+
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
#endif /* __ARX100_CONFIG_H__ */
Finally the ltq-boot-image tool adds a couple of download header to the
final image which I don't think should be there.
Daniel, does all the above make sense?
That said, even after making those changes my nandspl images still
don't work.
Ben
--
- Daniel
Ben Mulvihill
2015-01-30 12:42:36 UTC
Permalink
Post by Daniel Schwierzeck
the NAND boot does not work yet. I was not able to make it work with a
SPL only because the BootROM only reads the first page. The Lantiq UGW
U-Boot uses a very small pre-loader which loads another pre-loader and
fits in the first page. Thus we need to convert to SPL/TPL support
from mainline U-Boot. But I hadn't enough time yet to work on it.
I see. But is that the case with all lantiq nand boards? Do they all
have the same bootrom? By the looks of it they don't all have the same
page size (HH3A has 512 byte, P-2812HNU has 2K).

Having read your explanation, I guess that I was in fact replacing just
the actual uboot part. I left the pre-boot partition intact, and I
suppose that contains the pre-pre-loader and the pre-loader. However
my uboot image was trying to do all the low-level initialisation, which
had already been done. So maybe I could forget about spl, and simply use
the factory preloaders to boot a uboot image which skips the low level
stuff. What do you think?
Post by Daniel Schwierzeck
Post by Ben Mulvihill
Then the ebu configuration word needs to be set in the nandspl
image, as it is for norspl. Once again, the following fixed that
for arx100, and I think something similar will be required for danube
and vrx200.
actually the BootROM should correctly configure the EBU to be able to
read at least the first page from NAND flash. The XWAY_EBU_BOOTCFG is
only used for parallel NOR to setup various command timings and
delays.
I did a hex dump of the factory uboot on the HH3A, and it does have
XWAY_EBU_BOOTCFG at location 0x10. I tried my own builds with this and
without. Without it the board reboots immediately, with it it hangs.

Thanks,

Ben
Daniel Schwierzeck
2015-01-30 13:51:13 UTC
Permalink
Post by Ben Mulvihill
Post by Daniel Schwierzeck
the NAND boot does not work yet. I was not able to make it work with a
SPL only because the BootROM only reads the first page. The Lantiq UGW
U-Boot uses a very small pre-loader which loads another pre-loader and
fits in the first page. Thus we need to convert to SPL/TPL support
from mainline U-Boot. But I hadn't enough time yet to work on it.
I see. But is that the case with all lantiq nand boards? Do they all
have the same bootrom? By the looks of it they don't all have the same
page size (HH3A has 512 byte, P-2812HNU has 2K).
Having read your explanation, I guess that I was in fact replacing just
the actual uboot part. I left the pre-boot partition intact, and I
suppose that contains the pre-pre-loader and the pre-loader. However
my uboot image was trying to do all the low-level initialisation, which
had already been done. So maybe I could forget about spl, and simply use
the factory preloaders to boot a uboot image which skips the low level
stuff. What do you think?
yes, It's the best you can do atm. Some Arcadyan boards also do this.
Just look for the *_brn configs. The relevant U-Boot config option is
CONFIG_SKIP_LOWLEVEL_INIT.
--
- Daniel
Loading...