Telenor Zyxel EX5700 fails on third reboot

Successfully flashed the router with the latest snapshot, but it is failing on me on the third reboot (issuing reboot commands from console)

Noticing this in the commit message:

Notable changes to U-Boot include
 [...]
- dual partition scheme with "nomimal" or "rescue" systems, falling
  back to "rescue" unless the OS signals success in 3 attempts

Does that mean it was fixed or not fixed?

Possible to get a regular uboot onto this device?

dump from pre-uboot:

Jump to BL

NOTICE:  BL2: v2.6(release):v2.6-234-ge6fff8ecc
NOTICE:  BL2: Built : 11:02:39, Sep 29 2022
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7986 (2000MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 1024MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  SPI_NAND parses attributes from parameter page.
NOTICE:  SPI_NAND Detected ID 0x75
NOTICE:  Page size 4096, Block size 262144, size 536870912
NOTICE:  Initializing NMBM ...
NOTICE:  Signature found at block 2047 [0x1ffc0000]
NOTICE:  First info table with writecount 0 found in block 1920
NOTICE:  Second info table with writecount 0 found in block 1923
NOTICE:  NMBM has been successfully attached in read-only mode
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.6(release):v2.6-234-ge6fff8ecc
NOTICE:  BL31: Built : 11:02:41, Sep 29 2022


U-Boot 2022.04-00001-g750deab192 (Sep 29 2022 - 10:09:33 +0000)

casually tagging @bmork

Ouch. Looks like that's my fault. Don't know how I managed to both make this error and miss it, but the problem is that /etc/init.d/bootcount has wrong mode. You can fix your installed image by doing

chmod 755 /etc/init.d/bootcount

You can verify the fix by looking at this after boot:

root@OpenWrt:/# fw_printenv uboot_bootcount
uboot_bootcount=0

It should always be 0.

The bug is in the initial commit:

diff --git a/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount b/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount
new file mode 100644
index 000000000000..c52d004c639c
--- /dev/null
+++ b/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount

Will fix that.

1 Like

There is a PR already: https://github.com/openwrt/openwrt/pull/14081

1 Like

Great!

Then I can just drop the one I was preparing. But it showed me how the bug happend:

bjorn@canardo:/usr/local/src/openwrt$ scripts/checkpatch.pl /tmp/0001-mediatek-filogic-make-bootcount-script-executable.patch
ERROR: do not set execute permissions for source files
#20: FILE: target/linux/mediatek/filogic/base-files/etc/init.d/bootcount

total: 1 errors, 0 warnings, 0 lines checked

I guess I saw that and stupidly believed what checkpatch told me. So I "fixed" the mode during my final cleanup before submitting.

Somebody should fix checkpatch too. I'll just mention it here in the hope that there will be a PR in a couple of hours :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.