Message ID | 1422380504.19237.20.camel@merveille.lan |
---|---|
State | Superseded |
Headers | show |
2015-01-27 18:41 GMT+01:00 Ben Mulvihill <ben.mulvihill@gmail.com>: > Hi Antti, > > (Note that the diffs in this message are for information. They are not > patches submitted for merging - not at this stage anyway.) > >> 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. > > --- 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. > > --- 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 > > > >
> > 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? > > > > 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
Am 30.01.2015 um 13:42 schrieb Ben Mulvihill: > >> >> 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.
--- 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__ */