[OpenWrt-Devel] [PATCH] Unable to get any OpenWrt version working on Asus WL-300g
Ondrej Zary
linux at rainbow-software.org
Wed Dec 7 09:10:34 EST 2016
(I cannot post or register on OpenWrt Trac - captcha seems to be broken).
Found another bug: /sbin/init eats 100% CPU. Looks like an infinite loop:
root@(none):~# /tmp/strace -p 1
/tmp/strace: Process 1 attached
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 255641161}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 266508613}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 277430055}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 287997090}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 299143549}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 310360183}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 323103356}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 334053084}) = 0
write(3, "X", 1) = 1
clock_gettime(CLOCK_MONOTONIC, {88, 344951850}) = 0
write(3, "X", 1) = 1
...repeats forever
The BCM4702 SoC used in WL-300g does not have an UART so there's no ttyS0
device. The kernel parameters specify console=ttyS0,115200 so the console
does not work:
dmesg sys: Warning: unable to open an initial console.
# cat /dev/console
cat: can't open '/dev/console': No such device
Seems that procd does something wrong in this special case.
I modified initd/early.c to use /dev/kmsg (remembering to create it in
early_dev()) instead of /dev/console (& recompiled procd & put /sbin/init in
the image). That helped: no more 100% CPU usage (although it's not a fix)
--
Ondrej Zary
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list