Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3418 - Latest build for TL-WR1043ND v2 (ath79) does not boot - missing libs needed by /sbin/init #8290

Open
openwrt-bot opened this issue Oct 31, 2020 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

risa2000:

Device: TL-WR1043ND v2
Software versions: Linux version 5.4.72 (risa@gentoo-vb) (gcc version 9.3.0 (OpenWrt GCC 9.3.0 r14820-5cdc65f6d1)) #0 Sat Oct 31 20:27:47 2020

I am building a the latest snapshot into a custom image by using ImageBuilder, the latest build of r14820-5cdc65f6d1 does not boot, because the /sbin/init process misses some libraries. Following is the output from serial console during the failed boot:

U-Boot 1.1.4 (Jun 18 2013 - 15:51:52)

ap135 - Scorpion 1.0DRAM:
sri
Scorpion 1.0
ath_ddr_initial_config(178): (16bit) ddr2 init
tap = 0x00000003
Tap (low, high) = (0x0, 0x1e)
Tap values = (0xf, 0xf, 0xf, 0xf)
64 MB
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x17
flash size 8MB, sector count = 128
Flash: 8 MB
Using default environment

*** Warning *** : PCIe WLAN Module not found !!!
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
athrs_sgmii_res_cal: cal value = 0xe
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Scorpion ----> S17 PHY *
athrs17_reg_init: complete
: cfg1 0x80000000 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
eth0 up
athrs17_reg_init_wan done
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x800c0000 cfg2 0x7214
eth1: ba:be:fa:ce:08:41
eth1 up
eth0, eth1
Setting 0x18116290 to 0x50a1a14f
Autobooting in 1 seconds

Booting image at 9f020000 ...

Uncompressing Kernel Image ... OK

Starting kernel ...

[ 0.000000] Linux version 5.4.72 (risa@gentoo-vb) (gcc version 9.3.0 (OpenWrt GCC 9.3.0 r14820-5cdc65f6d1)) #0 Sat Oct 31 20:27:47 2020
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[ 0.000000] MIPS: machine is TP-Link TL-WR1043ND v2
[ 0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 57408K/65536K available (4753K kernel code, 183K rwdata, 1100K rodata, 1188K init, 196K bss, 8128K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[ 0.000000] CPU clock: 720.000 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[ 0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[ 0.008304] Calibrating delay loop... 359.42 BogoMIPS (lpj=718848)
[ 0.042895] pid_max: default: 32768 minimum: 301
[ 0.047939] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.055731] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.068023] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.078401] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.085760] pinctrl core: initialized pinctrl subsystem
[ 0.092269] NET: Registered protocol family 16
[ 0.125112] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[ 0.138512] clocksource: Switched to clocksource MIPS
[ 0.145000] NET: Registered protocol family 2
[ 0.150412] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.159383] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.167556] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.175076] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.181978] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.188984] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.196689] NET: Registered protocol family 1
[ 0.201403] PCI: CLS 0 bytes, default 32
[ 0.209179] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.222121] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.228370] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.253702] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[ 0.260356] gpio-export gpio-export: 1 gpio(s) exported
[ 0.266791] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.274237] printk: console [ttyS0] disabled
[ 0.278880] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[ 0.288078] printk: console [ttyS0] enabled
[ 0.288078] printk: console [ttyS0] enabled
[ 0.296983] printk: bootconsole [early0] disabled
[ 0.296983] printk: bootconsole [early0] disabled
[ 0.326653] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[ 0.331659] 3 fixed-partitions partitions found on MTD device spi0.0
[ 0.338114] Creating 3 MTD partitions on "spi0.0":
[ 0.342997] 0x000000000000-0x000000020000 : "u-boot"
[ 0.348955] 0x000000020000-0x0000007f0000 : "firmware"
[ 0.356886] 2 tplink-fw partitions found on MTD device firmware
[ 0.362955] Creating 2 MTD partitions on "firmware":
[ 0.368020] 0x000000000000-0x0000001e7881 : "kernel"
[ 0.373908] 0x0000001e7884-0x0000007d0000 : "rootfs"
[ 0.379757] mtd: device 3 (rootfs) set to be root filesystem
[ 0.387289] 1 squashfs-split partitions found on MTD device rootfs
[ 0.393628] 0x0000004b0000-0x0000007d0000 : "rootfs_data"
[ 0.399977] 0x0000007f0000-0x000000800000 : "art"
[ 0.407475] libphy: Fixed MDIO Bus: probed
[ 0.744356] libphy: ag71xx_mdio: probed
[ 0.751255] switch0: Atheros AR8327 rev. 4 switch registered on mdio.0
[ 1.138505] random: fast init done
[ 1.335866] ag71xx 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[ 1.346964] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[ 1.668297] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[ 1.678016] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: sgmii
[ 1.684519] i2c /dev entries driver
[ 1.690083] NET: Registered protocol family 10
[ 1.699644] Segment Routing with IPv6
[ 1.703525] NET: Registered protocol family 17
[ 1.708120] 8021q: 802.1Q VLAN Support v1.8
[ 1.718966] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 1.732581] Freeing unused kernel memory: 1188K
[ 1.737201] This architecture does not have kernel memory protection.
[ 1.743742] Run /sbin/init as init process
Error loading shared library libubox.so: No such file or directory (needed by /sbin/init)
Error loading shared library libubus.so: No such file or directory (needed by /sbin/init)
Error loading shared library libjson-c.so.5: No such file or directory (needed by /sbin/init)
Error loading shared library libblobmsg_json.so: No such file or directory (needed by /sbin/init)
Error loading shared library libjson_script.so: No such file or directory (needed by /sbin/init)
Error relocating[ 2.195702] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[ 2.204495] Rebooting in 1 seconds..

U-Boot 1.1.4 (Jun 18 2013 - 15:51:52)

The libs are built correctly:

risa@gentoo-vb ~/openwrt/openwrt $ ldd staging_dir/host/bin/ucert
linux-vdso.so.1 (0x00007ffcd6db2000)
libubox.so => /home/risa/openwrt/openwrt/staging_dir/host/lib/libubox.so (0x00007f914f60e000)
libblobmsg_json.so => /home/risa/openwrt/openwrt/staging_dir/host/lib/libblobmsg_json.so (0x00007f914f609000)
libjson-c.so.5 => /home/risa/openwrt/openwrt/staging_dir/host/lib/libjson-c.so.5 (0x00007f914f5f6000)
libc.so.6 => /lib64/libc.so.6 (0x00007f914f433000)
/lib64/ld-linux-x86-64.so.2 (0x00007f914f626000)
risa@gentoo-vb ~/openwrt/openwrt $ ls -la /home/risa/openwrt/openwrt/staging_dir/host/lib/libubox.so
-rwxr-xr-x 1 risa risa 417040 Oct 31 23:25 /home/risa/openwrt/openwrt/staging_dir/host/lib/libubox.so
risa@gentoo-vb ~/openwrt/openwrt $ ls -la /home/risa/openwrt/openwrt/staging_dir/host/lib/libblobmsg_json.so
-rwxr-xr-x 1 risa risa 115704 Oct 31 23:25 /home/risa/openwrt/openwrt/staging_dir/host/lib/libblobmsg_json.so
risa@gentoo-vb ~/openwrt/openwrt $ ls -la /home/risa/openwrt/openwrt/staging_dir/host/lib/libjson-c.so.5
lrwxrwxrwx 1 risa risa 18 Oct 31 23:24 /home/risa/openwrt/openwrt/staging_dir/host/lib/libjson-c.so.5 -> libjson-c.so.5.1.0
risa@gentoo-vb ~/openwrt/openwrt $ ls -la ./staging_dir/target-mips_24kc_musl/usr/lib/libubus.so
-rwxr-xr-x 1 risa risa 146900 Oct 31 23:27 ./staging_dir/target-mips_24kc_musl/usr/lib/libubus.so

but for some reason are not present in the final image built from ImageBuilder.

The image built using the same configuration from the older revision (7190fb2) has the size:

-rw-r--r-- 1 risa risa 6684973 Sep 20 15:46 openwrt-ath79-generic-tplink_tl-wr1043nd-v2-squashfs-sysupgrade.bin

while the new one built now is much smaller. It looks like some parts are not correctly stored in the image:

-rw-r--r-- 1 risa risa 4915501 Oct 31 23:46 openwrt-ath79-generic-tplink_tl-wr1043nd-v2-squashfs-sysupgrade.bin

@openwrt-bot
Copy link
Author

risa2000:

Another find: When comparing the build logs from the two builds (old=7190fb2da4, new=5cdc65f6d1), I can see that quite a lot of packages are not installed when the squashfs image is built.

@openwrt-bot
Copy link
Author

risa2000:

After some more investigation of ImageBuilder files, by comparing the build, which is OK (old=7190fb2da4) and the one which is not (new=3440c75986affe02b26d7479071f2b9e1d55366e) I found out that there is a difference in the file openwrt-imagebuilder-ath79-generic.Linux-x86_64/bin/targets/ath79/generic/openwrt-ath79-generic-tplink_tl-wr1043nd-v2.manifest.

I do not know, if this file is generated during ImageBuilder build, or is part of the repo, but it seems the lot of libs and modules are missing from the new one. I am attaching the diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant