mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
Restructure start by calling the plugin loader earlier. This makes it
possible to run hooks even earlier. This also adds a new hook:
HOOK_ROOTFS_UP which runs as soon as the system root (/) is available.
Another very notable change is the slow refactor of helpers.c into a finit
helper library called libite.so (-lite). This is a light-weight
Also, lots of misc. fixes all over the place. Signal handling still really
needs to be looked into once more!
Makefile:
Add dependency handling for parallell build
Add libite library
ChangeLog:
Update with new 1.4 release. There is a lot of fixes!
libite/:
Collection of utility functions and C library extensions for
finit & its plugins
reboot.c:
New reboot tool. Simply sends SIGINT to PID 1
finit.h:
Cleanup old LISTEN_INITCTL define, code is in an optional plugin now
finit.c:
Let mdev/udev run *after* cls()
Add useful debug statement for /proc/cmdline
Earlier plugin load => new early hook point
Show OK/FAIL for total plugin load, not for each plugin => speedup
helpers.h:
Rename syslog macros to prevent common name clashes (DEBUG/ERROR)
Add __FILE__ to _e(), _d() and _pe() macros
helpers.c:
In ifconfig() the addr and mask arguments are now optional
The copyfile() has been moved to libite.so
Temporarily remove const directive from some functions to build
Use DFLSIG() macro in run_getty() to simplify code
plugin.h:
Add new HOOK_ROOTFS_UP hook
plugin.c:
Fix init_plugins() to actually register the plugin's I/O fd
Skip verbose listing of all plugins in plugin_load_all()
svc.c:
svc_start(): Dito
plugins/Makefile:
Inherit CFLAGS and LDFLAGS, but make sure to filter out -rdynamic
from LDFLAGS, it's used by the daemon, only
plugins/initctl.c:
New includes after helpers.h refactor
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
26 lines
941 B
Makefile
26 lines
941 B
Makefile
# Some junk files we always want to be removed when doing a make clean.
|
|
JUNK = *~ *.bak *.aux *.dvi *.idx *.ind *.log *.ps *.map .*.d DEADJOE semantic.cache *.gdb *.elf core core.*
|
|
MAKE := @$(MAKE)
|
|
MAKEFLAGS = --no-print-directory --silent
|
|
INSTALL := install --backup=off
|
|
STRIPINST := $(INSTALL) -s --strip-program=$(CROSS)strip -m 0755
|
|
|
|
# Smart autodependecy generation via GCC -M.
|
|
.%.d: %.c
|
|
@$(SHELL) -ec "$(CC) -MM $(CFLAGS) $(CPPFLAGS) $< \
|
|
| sed 's,.*: ,$*.o $@ : ,g' > $@; \
|
|
[ -s $@ ] || rm -f $@"
|
|
|
|
# Override default implicit rules
|
|
%.o: %.c
|
|
@printf " CC $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
|
|
@$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
%: %.o
|
|
@printf " LINK $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
|
|
@$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$@.map -o $@ $^ $(LDLIBS$(LDLIBS-$(@)))
|
|
|
|
%.so: %.o
|
|
@printf " PLUGIN $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
|
|
@$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|