Custom WRT54GL image stuck at first reboot (4/16 device)

Hi,
I am trying to get a WRT54GL to work as an AP.
Since the router is 4/16 MB I am building my own very stripped down image. (No ppp, firewall, opkg, ipv6, LUCI, ...)

I got it down to around 3.4 MB and after flashing it with tftp most things seemed to work alright.

Problem

When I reboot it however, it gets stuck in the bootloader.
All ports are down and it answered to pings with a response TTL=100.
I am able to recover by flashing a new image with tftp, but everytime I reboot, the same problem occurs.

How can it be, that it boots the first time after flashing, but not a second time?
Could this be a CRC issue? Something with the firmware header?
Could you maybe give me a hint, where I might have screwed up or how I can get more information about this kind of problem?
Any help is appreciated.

Below are my config options and some interesting logs I found.

Build config

Those are the board/subtarget/profile options I selected:

CONFIG_TARGET_BOARD="brcm47xx"
CONFIG_TARGET_SUBTARGET="legacy"
CONFIG_TARGET_PROFILE="DEVICE_linksys-wrt54g"

Note the profile is wrt54g since there is no option for wrt54gl
Most packages I removed where just networking stuff, so I doubt they are the problem.
I did however also find this, which I don't really recall changing:

# CONFIG_PACKAGE_mtd is not set

But this seems more like a userspace util, right? Might try with it included later.

Logs

This looked interesting:

Thu Feb 27 21:26:18 2020 kern.warn kernel: [   33.319335] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
Thu Feb 27 21:26:18 2020 kern.warn kernel: [   33.379986] jffs2_build_filesystem(): unlocking the mtd device...
Thu Feb 27 21:26:18 2020 kern.warn kernel: [   33.380025] done.
Thu Feb 27 21:26:24 2020 kern.warn kernel: [   33.388324] jffs2_build_filesystem(): erasing all blocks after the end marker...
Thu Feb 27 21:26:24 2020 kern.warn kernel: [   39.614868] done.
Thu Feb 27 21:26:24 2020 kern.notice kernel: [   39.624791] jffs2: notice: (685) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
Thu Feb 27 21:26:26 2020 kern.warn kernel: [   41.179118] overlayfs: upper fs does not support tmpfile.
Thu Feb 27 21:26:26 2020 daemon.info mount_root: performing overlay whiteout
Thu Feb 27 21:26:26 2020 daemon.info mount_root: syncronizing overlay
Thu Feb 27 21:26:27 2020 daemon.err mount_root: failed to sync jffs2 overlay

For completeness I also attached the whole log here:

Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.000000] Linux version 4.14.171 (user@mybox) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7989-82fbd85747)) #0 Thu Feb 27 21:25:59 2020
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] CPU0 revision is: 00029008 (Broadcom BMIPS3300)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] bcm47xx: Using ssb bus
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] ssb: Found chip with id 0x5352, rev 0x00 and package 0x02
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x0E, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x09, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 2 found: MIPS 3302 (cc 0x816, rev 0x06, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 3 found: USB 1.1 Host (cc 0x817, rev 0x02, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 4 found: MEMC SDRAM (cc 0x80F, rev 0x01, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x09, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Core 6 found: Roboswitch (cc 0x81C, rev 0x02, vendor 0x4243)
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: chipcommon status is 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: Initializing MIPS core...
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: set_irq: core 0x0806, irq 4 => 4
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: set_irq: core 0x0816, irq 5 => 2
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: set_irq: core 0x0812, irq 2 => 5
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: after irq reconfiguration
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x0800, irq : 2(S)  3* 4  5  6  D  I
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x0806, irq : 2(S)  3  4* 5  6  D  I
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x0816, irq : 2(S)* 3  4  5  6  D  I
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x0817, irq : 2(S)  3  4  5  6* D  I
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x080f, irq : 2(S)  3  4  5  6  D  I*
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x0812, irq : 2(S)  3  4  5* 6  D  I
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] ssb: core 0x081c, irq : 2(S)  3  4  5  6  D  I*
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] ssb: Sonics Silicon Backplane found at address 0x18000000
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Determined physical RAM map:
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000]  memory: 01000000 @ 00000000 (usable)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Initrd not found or empty - disabling initrd
Thu Feb 27 21:26:08 2020 kern.warn kernel: [    0.000000] Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
Thu Feb 27 21:26:08 2020 kern.warn kernel: [    0.000000] Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 bytes
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Zone ranges:
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000000ffffff]
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Movable zone start for each node
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Early memory node ranges
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000000ffffff]
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000000ffffff]
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] On node 0 totalpages: 4096
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] free_area_init_node: node 0, pgdat 803b4dc0, node_mem_map 80425020
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000]   Normal zone: 32 pages used for memmap
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000]   Normal zone: 0 pages reserved
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000]   Normal zone: 4096 pages, LIFO batch:0
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.000000] random: get_random_bytes called from 0x803b8738 with crng_init=0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.000000] pcpu-alloc: [0] 0
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 4064
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.000000] Kernel command line: noinitrd console=ttyS0,115200
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] Memory: 11940K/16384K available (3263K kernel code, 138K rwdata, 396K rodata, 160K init, 270K bss, 4444K reserved, 0K cma-reserved)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] NR_IRQS: 128
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] MIPS: machine is Linksys WRT54G/GS/GL
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000043] sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 21474836475ns
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.000220] Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.080276] pid_max: default: 32768 minimum: 301
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.081350] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.081514] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.093283] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.093408] futex hash table entries: 256 (order: -1, 3072 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.095869] NET: Registered protocol family 16
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.189773] clocksource: Switched to clocksource MIPS
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.200570] NET: Registered protocol family 2
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.203811] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.204016] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.204183] TCP: Hash tables configured (established 1024 bind 1024)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.205228] UDP hash table entries: 256 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.205424] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.206529] NET: Registered protocol family 1
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.206813] PCI: CLS 0 bytes, default 16
Thu Feb 27 21:26:08 2020 kern.warn kernel: [    0.237742] Crashlog allocated RAM at address 0xf00000
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.249696] workingset: timestamp_bits=30 max_order=12 bucket_order=0
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.278377] squashfs: version 4.0 (2009/01/31) Phillip Lougher
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.278459] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.343448] io scheduler noop registered
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.343529] io scheduler deadline registered (default)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.344242] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.346961] console [ttyS0] disabled
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.367395] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3, base_baud = 1250000) is a U6_16550A
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.701114] console [ttyS0] enabled
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.726359] serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3, base_baud = 1250000) is a U6_16550A
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.739317] physmap platform flash device: 02000001 at 1c000000
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.745807] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756478] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756530] physmap-flash.0: Found an alias at 0x800000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756570] physmap-flash.0: Found an alias at 0xc00000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756608] physmap-flash.0: Found an alias at 0x1000000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756644] physmap-flash.0: Found an alias at 0x1400000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756683] physmap-flash.0: Found an alias at 0x1800000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.debug kernel: [    0.756722] physmap-flash.0: Found an alias at 0x1c00000 for the chip at 0x0
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.756783] Amd/Fujitsu Extended Query Table at 0x0040
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.762230]   Amd/Fujitsu Extended Query version 1.1.
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.767419] number of CFI chips: 1
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.776463] 3 bcm47xxpart partitions found on MTD device physmap-flash.0
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.783505] Creating 3 MTD partitions on "physmap-flash.0":
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.789255] 0x000000000000-0x000000040000 : "boot"
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.813354] 0x000000040000-0x0000003f0000 : "firmware"
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.822787] 3 trx partitions found on MTD device firmware
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.828330] Creating 3 MTD partitions on "firmware":
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.833650] 0x00000000001c-0x000000000948 : "loader"
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.852496] 0x000000000948-0x000000142000 : "linux"
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.867264] 0x000000142000-0x0000003b0000 : "rootfs"
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.876505] mtd: device 4 (rootfs) set to be root filesystem
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.882591] 1 squashfs-split partitions found on MTD device rootfs
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.888960] 0x000000300000-0x0000003b0000 : "rootfs_data"
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    0.908295] 0x0000003f0000-0x000000400000 : "nvram"
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.933013] libphy: Fixed MDIO Bus: probed
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.937792] b44: Broadcom 44xx/47xx 10/100 PCI ethernet driver version 2.0
Thu Feb 27 21:26:08 2020 kern.info kernel: [    0.963850] libphy: b44_eth_mii: probed
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.110516] b53_common: found switch: BCM5325, rev 0
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.115717] Broadcom B53 (1) 1:1e: attached PHY driver [Broadcom B53 (1)] (mii_bus:phy_addr=1:1e, irq=POLL)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.125824] b44 ssb0:0 eth0: Broadcom 44xx/47xx 10/100 PCI ethernet driver c0:c1:c0:12:bb:8d
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.136151] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer)
Thu Feb 27 21:26:08 2020 kern.err kernel: [    1.145975] GPIO_WDT: failed to register misc device
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.152330] NET: Registered protocol family 17
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.157201] 8021q: 802.1Q VLAN Support v1.8
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.186423] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Thu Feb 27 21:26:08 2020 kern.info kernel: [    1.197197] Freeing unused kernel memory: 160K
Thu Feb 27 21:26:08 2020 kern.warn kernel: [    1.201962] This architecture does not have kernel memory protection.
Thu Feb 27 21:26:08 2020 user.info kernel: [    2.463345] init: Console is alive
Thu Feb 27 21:26:08 2020 user.info kernel: [    2.467867] init: - watchdog -
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    2.569871] random: fast init done
Thu Feb 27 21:26:08 2020 user.info kernel: [    3.927703] kmodloader: loading kernel modules from /etc/modules-boot.d/*
Thu Feb 27 21:26:08 2020 user.info kernel: [    4.015382] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
Thu Feb 27 21:26:08 2020 user.info kernel: [    4.034488] init: - preinit -
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    6.577035] random: jshn: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    6.815691] random: jshn: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    7.181116] random: jshn: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    8.152184] b44 ssb0:0 eth0: Link is up at 100 Mbps, half duplex
Thu Feb 27 21:26:08 2020 kern.info kernel: [    8.158374] b44 ssb0:0 eth0: Flow control is off for TX and off for RX
Thu Feb 27 21:26:08 2020 kern.notice kernel: [    8.191044] random: procd: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 kern.info kernel: [    9.209963] b44 ssb0:0 eth0: Link is Up - 100Mbps/Full - flow control off
Thu Feb 27 21:26:08 2020 user.notice kernel: [   11.926810] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
Thu Feb 27 21:26:08 2020 user.warn kernel: [   11.982980] urandom-seed: Seed file not found (/etc/urandom.seed)
Thu Feb 27 21:26:08 2020 kern.info kernel: [   12.156456] b44 ssb0:0 eth0: powering down PHY
Thu Feb 27 21:26:08 2020 user.info kernel: [   12.227382] procd: - early -
Thu Feb 27 21:26:08 2020 user.info kernel: [   12.231061] procd: - watchdog -
Thu Feb 27 21:26:08 2020 kern.info kernel: [   12.369121] b44 ssb0:0 eth0: Link is Down
Thu Feb 27 21:26:08 2020 user.info kernel: [   13.091636] procd: - watchdog -
Thu Feb 27 21:26:08 2020 user.info kernel: [   13.096517] procd: - ubus -
Thu Feb 27 21:26:08 2020 kern.notice kernel: [   13.194701] random: ubusd: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 kern.notice kernel: [   13.203122] random: ubusd: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 kern.notice kernel: [   13.210070] random: ubusd: uninitialized urandom read (4 bytes read)
Thu Feb 27 21:26:08 2020 user.info kernel: [   13.222733] procd: - init -
Thu Feb 27 21:26:08 2020 user.info kernel: [   14.751656] kmodloader: loading kernel modules from /etc/modules.d/*
Thu Feb 27 21:26:08 2020 kern.info kernel: [   14.810020] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
Thu Feb 27 21:26:08 2020 kern.info kernel: [   14.818209] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
Thu Feb 27 21:26:08 2020 kern.info kernel: [   14.847540] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
Thu Feb 27 21:26:08 2020 kern.info kernel: [   15.023563] ip_tables: (C) 2000-2006 Netfilter Core Team
Thu Feb 27 21:26:08 2020 kern.info kernel: [   15.532095] b43-phy0: Broadcom 5352 WLAN found (core revision 9)
Thu Feb 27 21:26:08 2020 kern.info kernel: [   15.564014] b43-phy0: Found PHY: Analog 2, Type 2 (G), Revision 7
Thu Feb 27 21:26:08 2020 kern.info kernel: [   15.570476] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2050, Revision 2, Version 0
Thu Feb 27 21:26:08 2020 kern.info kernel: [   15.604820] Broadcom 43xx driver loaded [ Features: PNL ]
Thu Feb 27 21:26:08 2020 kern.info kernel: [   15.722180] Broadcom 43xx-legacy driver loaded [ Features: PLD ]
Thu Feb 27 21:26:08 2020 user.info kernel: [   15.732916] kmodloader: done loading kernel modules from /etc/modules.d/*
Thu Feb 27 21:26:08 2020 kern.debug kernel: [   15.764994] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: tunnel
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: Network device
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: bridge
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: veth
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: macvlan
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: 8021ad
Thu Feb 27 21:26:13 2020 user.notice : Added device handler type: 8021q
Thu Feb 27 21:26:14 2020 daemon.notice procd: /etc/init.d/network: 'radio0' is disabled
Thu Feb 27 21:26:15 2020 daemon.notice procd: /etc/init.d/network: 'radio0' is disabled
Thu Feb 27 21:26:18 2020 kern.warn kernel: [   33.319335] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
Thu Feb 27 21:26:18 2020 kern.warn kernel: [   33.379986] jffs2_build_filesystem(): unlocking the mtd device...
Thu Feb 27 21:26:18 2020 kern.warn kernel: [   33.380025] done.
Thu Feb 27 21:26:24 2020 kern.warn kernel: [   33.388324] jffs2_build_filesystem(): erasing all blocks after the end marker...
Thu Feb 27 21:26:24 2020 kern.warn kernel: [   39.614868] done.
Thu Feb 27 21:26:24 2020 kern.notice kernel: [   39.624791] jffs2: notice: (685) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
Thu Feb 27 21:26:26 2020 kern.warn kernel: [   41.179118] overlayfs: upper fs does not support tmpfile.
Thu Feb 27 21:26:26 2020 daemon.info mount_root: performing overlay whiteout
Thu Feb 27 21:26:26 2020 daemon.info mount_root: syncronizing overlay
Thu Feb 27 21:26:27 2020 daemon.err mount_root: failed to sync jffs2 overlay
Thu Feb 27 21:26:30 2020 kern.info kernel: [   44.937035] b44 ssb0:0 eth0: Link is up at 100 Mbps, full duplex
Thu Feb 27 21:26:30 2020 kern.info kernel: [   44.943408] b44 ssb0:0 eth0: Flow control is off for TX and off for RX
Thu Feb 27 21:26:30 2020 kern.info kernel: [   45.204117] br-lan: port 1(eth0.1) entered blocking state
Thu Feb 27 21:26:30 2020 kern.info kernel: [   45.209680] br-lan: port 1(eth0.1) entered disabled state
Thu Feb 27 21:26:30 2020 kern.info kernel: [   45.218630] device eth0.1 entered promiscuous mode
Thu Feb 27 21:26:30 2020 kern.info kernel: [   45.223738] device eth0 entered promiscuous mode
Thu Feb 27 21:26:30 2020 kern.info kernel: [   45.294877] br-lan: port 1(eth0.1) entered blocking state
Thu Feb 27 21:26:30 2020 kern.info kernel: [   45.300622] br-lan: port 1(eth0.1) entered forwarding state
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'lan' is enabled
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'lan' is setting up now
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'lan' is now up
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'loopback' is enabled
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'loopback' is setting up now
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'loopback' is now up
Thu Feb 27 21:26:30 2020 daemon.notice netifd: Interface 'wan' is enabled
Thu Feb 27 21:26:31 2020 daemon.notice netifd: bridge 'br-lan' link is up
Thu Feb 27 21:26:31 2020 daemon.notice netifd: Interface 'lan' has link connectivity
Thu Feb 27 21:26:31 2020 daemon.notice netifd: Network device 'eth0' link is up
Thu Feb 27 21:26:31 2020 daemon.notice netifd: VLAN 'eth0.1' link is up
Thu Feb 27 21:26:31 2020 daemon.notice netifd: Network device 'lo' link is up
Thu Feb 27 21:26:31 2020 daemon.notice netifd: Interface 'loopback' has link connectivity
Thu Feb 27 21:26:31 2020 daemon.notice netifd: VLAN 'eth0.2' link is up
Thu Feb 27 21:26:31 2020 daemon.notice netifd: Interface 'wan' has link connectivity
Thu Feb 27 21:26:31 2020 daemon.notice netifd: Interface 'wan' is setting up now
Thu Feb 27 21:26:31 2020 kern.info kernel: [   46.030085] b44 ssb0:0 eth0: Link is Up - 100Mbps/Full - flow control off
Thu Feb 27 21:26:34 2020 daemon.notice netifd: wan (794): udhcpc: started, v1.28.4
Thu Feb 27 21:26:35 2020 daemon.notice netifd: wan (794): udhcpc: sending discover
Thu Feb 27 21:26:36 2020 daemon.info procd: - init complete -
Thu Feb 27 21:26:38 2020 daemon.notice netifd: wan (794): udhcpc: sending discover
Thu Feb 27 21:26:41 2020 daemon.notice netifd: wan (794): udhcpc: sending discover
Thu Feb 27 21:27:57 2020 kern.notice kernel: [  131.660194] random: crng init done
Thu Feb 27 21:27:57 2020 kern.notice kernel: [  131.663734] random: 3 urandom warning(s) missed due to ratelimiting
Thu Feb 27 21:27:57 2020 daemon.info urandom_seed[825]: Seed saved (/etc/urandom.seed)
Thu Feb 27 21:28:30 2020 authpriv.info dropbear[864]: Not backgrounding
Thu Feb 27 21:50:15 2020 authpriv.info dropbear[878]: Child connection from 192.168.1.42:34480
Thu Feb 27 21:50:19 2020 authpriv.notice dropbear[878]: Auth succeeded with blank password for 'root' from 192.168.1.42:34480
Thu Feb 27 21:54:37 2020 authpriv.info dropbear[878]: Exit (root): Disconnect received
Thu Feb 27 21:56:20 2020 authpriv.info dropbear[907]: Child connection from 192.168.1.42:34508
Thu Feb 27 21:56:22 2020 authpriv.notice dropbear[907]: Auth succeeded with blank password for 'root' from 192.168.1.42:34508
Thu Feb 27 22:29:10 2020 authpriv.info dropbear[907]: Exit (root): Disconnect received
Thu Feb 27 23:31:30 2020 authpriv.info dropbear[990]: Child connection from 192.168.1.42:34826
Thu Feb 27 23:31:32 2020 authpriv.notice dropbear[990]: Auth succeeded with blank password for 'root' from 192.168.1.42:34826
Thu Feb 27 23:43:06 2020 authpriv.info dropbear[1004]: Child connection from 192.168.1.42:34828
Thu Feb 27 23:43:08 2020 authpriv.notice dropbear[1004]: Auth succeeded with blank password for 'root' from 192.168.1.42:34828

Forget about using the current OpenWrt on it.
The 4 MB flash is problematic, but the 16 MB RAM is the real killer. You will OOM the router.

Support for 16 MB RAM was dropped in 2013 with the 12.09 release.

Possibly the overlay filesystem consumes a bit more RAM on the second boot as there is some actual overlay content, and kernel runs Out Of Memory before the boot process completes.

Like wiki says, the last supported OpenWrt version for that router is 10.03.1 (from year 2011).
https://openwrt.org/toh/linksys/wrt54g
Linksys WRT54GL 1.0, 1.1 10.03.1

1 Like

I agree it is time for a hardware upgrade.

Yes, this can happen when /etc/uci-defaults/09_fix_crc fails.

After the first boot, try to run

mtd fixtrx firmware

Which OpenWrt version was your image built from?

1 Like

This seems to have been the problem.

There is no 09_fix_crc in /etc/uci-defaults (or anything else for that matter), but from your answer I assume, that mtd gets called in some initial boot scripts, right?
Well, I removed mtd from the image....
I even noticed this in the OP, but didn't think much of it:

Probably because the CONFIG_PACKAGE_mtd help text only mentioned trx images so I thought I only needed it, if I planed on using sysupgrade images.

I've build it from v18.06.8.

Yea, I know. I just have ~10 of those lying around in our basement and I don't want to just throw them out.

Thanks for your help everyone!

Look here instead:

/rom/etc/uci-defaults/09_fix_crc

The scripts in uci-defaults are deleted after the first successful run, see /etc/init.d/boot.
However, I wonder why 09_fix_crc was considered successful.

There is also some developer documentation for uci-defaults.

It probably wasn't. When I said /etc/uci-defaults is empty, it was already on a system that had mtd installed. Had I looked into that folder on my broken image back then, I would have probably seen it.

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