ZyXEL P-2812HNU-F1 and OpenWrt v21.02.0

Hi all,

Several years already I've building & running OpenWrt on ZyXEL P-2812HNU-F1, with help of several others.
When I updated my first device to (own build) v21.02.0 it got bricked, it wouldn't load the kernel image?
With TTL-serial I found out that the box was still running on 2MB reserved memory, although v21.02.0 kernel is 2,4MB big :wink:

The only thing then to do is: change the nboot parameter to 3MB (with TTL-serial) as describred in wiki and reboot.
(Step 8 on https://openwrt.org/toh/zyxel/p-2812hnu-f1#replacement_of_factory_u-boot)

Basically I've some questions about OpenWrt v21.02.0 and the wiki (Mafketel / Mijzelf / ScaPi ?):

  • The wiki also write about mtd changes? I've fixed all my issues without those, why are the mtd changes there? (future?)

  • Why is PCI-scan not done anymore during boot (all earlier version do a pci-rescan), and now it has to be done manually in rc.local to get wifi working?
    old log (new logs does NOT show this anymore?):

[    0.136000] pci 0000:00:0e.0: [1814:3062] type 00 class 0x028000
[    0.136000] pci 0000:00:0e.0: reg 0x10: [mem 0xffff0000-0xffffffff]
[    0.136000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.136000] pci 0000:00:0e.0: BAR 0: assigned [mem 0x18000000-0x1800ffff]
[    0.140000] Switched to clocksource MIPS

Have these questions to do with the transition from swconfig to Distributed Switch Architecture, DSA?

After this I made special upgrade manual to v21.02.0 (without TTL-serial) for this box and mention it also on the wiki page:
http://dolfgeerdink.nl/phpbb/viewtopic.php?p=341#p341
Although preferred to have TTL-serial ready, it can be done without, with the right precautions.

Keep up the good work!

DG.

Which mtd changes are you talking about?

BTW, I patched u-boot, so that the strange in-between step with Mafketels sysupgrade can be skipped, and installing 21.02 can be done the 'normal' way, using an initramfs image. This doesn't add much when you are upgrading from an older version. But 21.02 is maybe the last version which can be installed with the unpatched u-boot. Master doesn't load. It's kernel is decompressed >8MiB.

Hello Mijzelf, ( how funny in Dutch : )

Within wiki (https://openwrt.org/toh/zyxel/p-2812hnu-f1) is written at step 8 of Replacement of factory U-Boot (https://openwrt.org/toh/zyxel/p-2812hnu-f1#replacement_of_factory_u-boot):

mtdparts add nand0 256k uboot
mtdparts add nand0 128k uboot-env
mtdparts add nand0 3m kernel
mtdparts add nand0 - ubi
setenv ethaddr XX:XX:XX:XX:XX:XX
setenv nboot 'nand read 0x80800000 0x60000 0x300000; bootm 0x80800000'
setenv bootcmd 'run nboot'
saveenv

I also added some remarks in the wiki about these mtd adjustments, as only nboot adjustment is needed / working.

And I was still using the old (tpl) u-boot version, even with v19.07.7, kernel packed still below 2MB.
v21.02.0 is 2,4MB and crashes, but with TTL-serial only adjust nboot to 3MB it will work fine.

I will soon try your 16MB version and check, btw!

And Mijzelf, no problems with wifi and v21.02.0 on your P-2812HNU-F1 device(s)?

Regards, DG.

That mtdparts is unnecessary, yet harmless. U-boot has it's own partition table in environment, and has 2 ways to pass that to the kernel. Through commandline, or by patching the Flattened Device Tree blob. (I don't know if this ancient u-boot supports the last one, and OpenWrt doesn't have a separate blob to be loaded by u-boot, so it won't work anyway) With this environment the mtdparts isn't provided by commandline either (and OpenWrt ignores the command line)
But maybe there are some u-boot commands to use the partitions directly. In normal use (just booting) that doesn't matter, of course.
Ethaddr is needed to get the eth port up, which is needed for tftpboot.
(https://www.denx.de/wiki/view/DULG/EthernetDoesNotWork)

Yes. I have to rescan the PCI bus from rc.local. I filed a bug about that, but it didn't yet draw attention of a developer.

Mijzelf,

Thanks for your reply. I thought also the mtd commands do nothing for normal use :slight_smile:
Next to ethaddr, ipaddr and serverip are needed for tftpboot, I know.
The question about pci-rescan, was to see if you got it fixed.
I found your bug report when my first update attempt to v21.02.0 did not had wifi, after fixing the nboot issue.

What i've seen between v19 and v21, there are some patches removed and added within v21:
( target/linux/lantiq/patches-4.14/ vs target/linux/lantiq/patches-5.4/ )

Removed:

0002-gpio-stp-xway-Implement-get-callback.patch
0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
0027-01-net-phy-intel-xway-add-VR9-version-number.patch
0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch

Added:

0026-MIPS-lantiq-Add-GPHY-Firmware-loader.patch

Differences:

v19: 0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch
     0025-NET-MIPS-lantiq-adds-xrx200-net.patch
v21: 0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
     0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch

I'm not so aware of what all these patches do, I've seen some of them are merged into new ones, but not all.
I will test to update my build-environment from v19 to v21 to see if the (old) patches stay alive and if rescan of pci is still needed.
Untill now i used a full new build-environment for v21.

Hopefully this will be checked and fixed.

Regards, DG.