Closed joerg-krause closed 7 years ago
The kernel needs to be built with CONFIG_SYSVIPC
to enable shm routines. Not sure about uclibc-ng, since I've never used it, but if that too can be configured it too needs to enable shmat()
and shmget()
functions: https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/tree/libc/misc/sysvipc/shm.c
This is an old, somewhat undocumented, requirement that stems from initctl
(and previous plugin implementation in Finit 1) having a way to connect to the internals of Finit svc.h
. I should probably refactor this ...
The reason you get a kernel panic, above, is that finit calls abort()
if shmat()
or shmget()
fails.
Trying to implement a workaround now, so at least finit (PID 1) can continue if this error is found at runtime. The initctl show
and initctl cond show
commands will however not work, that requires a more extensive refactor.
I hope the fix I pushed in 3d4e3c9 is sufficient for now.
Thanks! Enabling CONFIG_SYSVIPC
in the Linux kernel fixes the issue. As the board is build using the default sunxi
defconfig it is indeed a good idea to have that workaround.
I can confirm that the workaround fixes the issue if the Linux kernel option CONFIG_SYSVIPC
is not set.
/usr/sbin/finit: Kernel does support SYSV shmat() IPC, error 38: Function not implemented
/usr/sbin/finit: Implementing PID 1 workaround, initctl tool will not work ...: Function not implemented
finit[1]: conf_reload_dynamic():Skipping /etc/finit.d, no files found ...
Jan 1 00:00:11 finit[1]: conf_reload_dynamic():Skipping /etc/finit.d, no files found ...
finit[1]: sm_step():Stopping services services not allowed in new runlevel ...
Jan 1 00:00:11 finit[1]: sm_step():Stopping services services not allowed in new runlevel ...
/usr/sbin/finit: Kernel does support SYSV shmat() IPC, error 38: Function not implemented
/usr/sbin/finit: Implementing PID 1 workaround, initctl tool will not work ...: Function not implemented
Please press Enter to activate this console.
Great, thanks for checking! Just pushed a follow-up to silence further error messages.
I am trying finit on a Banana Pro board using Buildroot (Linux 4.13.4). Using latest finit commit 9d9dc747681df865d13567c39d928aa819d72b9e. Running Linux system on a SD-card.