summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/build.mk2
-rw-r--r--mk/image.mk1
-rw-r--r--mk/package.mk3
-rwxr-xr-xpackage/base-files/src/etc/init.d/fs2
-rw-r--r--package/busybox/Makefile12
-rw-r--r--package/busybox/files/busybox.postinst12
-rwxr-xr-xscripts/update-rcconf20
-rw-r--r--target/collections/xbmcbox5
-rw-r--r--target/config/Config.in.runtime7
9 files changed, 40 insertions, 24 deletions
diff --git a/mk/build.mk b/mk/build.mk
index ee17ee14f..2ec8e3b1d 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -455,7 +455,7 @@ $(ADK_TOPDIR)/adk/tools/pkgrebuild: $(ADK_TOPDIR)/adk/tools/pkgrebuild.c $(ADK_T
$(ADK_TOPDIR)/adk/tools/depmaker: $(ADK_TOPDIR)/adk/tools/depmaker.c
@$(HOST_CC) $(HOST_CFLAGS) -o $@ $(ADK_TOPDIR)/adk/tools/depmaker.c
-menu .menu: $(wildcard package/*/Makefile) $(wildcard target/*/systems) $(wildcard target/*/systems/*) $(ADK_TOPDIR)/adk/tools/pkgmaker $(ADK_TOPDIR)/adk/tools/pkgrebuild
+menu .menu: $(wildcard package/*/Makefile) $(wildcard target/*/systems) $(wildcard target/*/systems/*) $(ADK_TOPDIR)/adk/tools/pkgmaker $(ADK_TOPDIR)/adk/tools/pkgrebuild $(wildcard target/*/collections)
@echo "Generating menu structure ..."
@$(BASH) $(ADK_TOPDIR)/scripts/create-menu
@$(ADK_TOPDIR)/adk/tools/pkgmaker
diff --git a/mk/image.mk b/mk/image.mk
index cfd50f475..c9108ef14 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -41,6 +41,7 @@ extra-install:
@if [ ! -z $(extra) ];then $(CP) $(extra)/* ${TARGET_DIR};fi
image-prepare-post:
+ $(BASH) $(ADK_TOPDIR)/scripts/update-rcconf
rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \
dd if=$$rng bs=512 count=1 >>${TARGET_DIR}/etc/.rnd 2>/dev/null; \
chmod 600 ${TARGET_DIR}/etc/.rnd
diff --git a/mk/package.mk b/mk/package.mk
index 5ee7f7e54..d2952a859 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -176,9 +176,6 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE}
@for file in conffiles preinst postinst prerm postrm; do \
[ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \
done
-ifeq ($(ADK_RUNTIME_START_$(1)),y)
- $(SED) "s#NO#YES#" $$(IDIR_$(1))/CONTROL/postinst
-endif
ifneq ($(ADK_DEBUG),y)
@echo "Package: $$(shell echo $(2) | tr '_' '-')-dbg" > $(WRKDIR)/.$(2)-dbg.control
@echo "Section: debug" >> $(WRKDIR)/.$(2)-dbg.control
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
index cb87e5aeb..581be2a35 100755
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/src/etc/init.d/fs
@@ -27,7 +27,7 @@ for fs in $fstypes; do
grep $fs /proc/filesystems >/dev/null 2>&1
if [ $? -eq 0 ];then
[ -x /usr/sbin/fsck.$fs ] && {
- logger -s -t 'Filesystem' "checking $fs filesystem on $disk"
+ logger -t 'Filesystem' "checking $fs filesystem on $disk"
fsck -p $disk >/dev/null
}
logger -t '' "Mounting local filesystems"
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index fe3d313a5..eabed3ef3 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -47,21 +47,9 @@ do-configure:
do-build:
PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} busybox
-BBDEFS:=(
-define BBDEF
-ifeq ($(ADK_RUNTIME_START_BUSYBOX_$(1)),y)
-BBDEFS+=echo BBDEF_$(1)=YES;
-else
-BBDEFS+=echo BBDEF_$(1)=NO;
-endif
-endef
-$(foreach OPTION,CROND WATCHDOG SYSLOGD INETD NTPD,$(eval $(call BBDEF,$(OPTION))))
-
do-install:
PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} install $(MAKE_TRACE)
$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
- $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc
- ${BBDEFS} :) >$(IDIR_BUSYBOX)/etc/.bb_defaults
ifeq ($(BUSYBOX_IFUPDOWN),y)
$(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d
$(INSTALL_BIN) ./files/network $(IDIR_BUSYBOX)/etc/init.d
diff --git a/package/busybox/files/busybox.postinst b/package/busybox/files/busybox.postinst
index 89c2d7b74..75996525a 100644
--- a/package/busybox/files/busybox.postinst
+++ b/package/busybox/files/busybox.postinst
@@ -1,13 +1,11 @@
#!/bin/sh
-if [ -z $IPKG_INSTROOT ];then chmod u+s /bin/busybox;fi
. $IPKG_INSTROOT/etc/functions.sh
-. $IPKG_INSTROOT/etc/.bb_defaults
add_rcconf network YES
-add_rcconf crond ${BBDEF_CROND}
-add_rcconf watchdog ${BBDEF_WATCHDOG}
+add_rcconf crond NO
+add_rcconf watchdog NO
add_rcconf watchdog_flags '-t 10 -T 20'
-add_rcconf syslogd ${BBDEF_SYSLOGD}
+add_rcconf syslogd NO
add_rcconf syslogd_flags '-C32'
-add_rcconf inetd ${BBDEF_INETD}
-add_rcconf ntpd ${BBDEF_NTPD}
+add_rcconf inetd NO
+add_rcconf ntpd NO
add_rcconf ntpd_flags '-p time.fu-berlin.de'
diff --git a/scripts/update-rcconf b/scripts/update-rcconf
new file mode 100755
index 000000000..bc896d3d1
--- /dev/null
+++ b/scripts/update-rcconf
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
+. $topdir/.config
+
+rcconf=$topdir/root_${ADK_TARGET_SYSTEM}_${ADK_TARGET_LIBC}/etc/rc.conf
+
+for service in $(grep ^ADK_RUNTIME_START_ $topdir/.config |grep -v ADK_RUNTIME_START_SERVICES);do
+ rcname=$(echo $service|sed -e "s#ADK_RUNTIME_START_##")
+ rcname=$(echo $rcname| sed -e "s#=y##")
+ rcname=$(echo $rcname| sed -e "s#^BUSYBOX_##")
+ rcname=$(echo $rcname| tr '[:upper:]' '[:lower:]')
+ if [ $ADK_PKG_XBMCBOX = "y" ];then
+ sed -i -e "s#$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf
+ else
+ sed -i -e "s#$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf
+ fi
+done
diff --git a/target/collections/xbmcbox b/target/collections/xbmcbox
index baf2794e2..33bee606b 100644
--- a/target/collections/xbmcbox
+++ b/target/collections/xbmcbox
@@ -18,6 +18,11 @@ config ADK_PKG_XBMCBOX
select ADK_QUIET_KERNEL
select ADK_RUNTIME_QUIET_INIT
select ADK_TARGET_GPU_MEM_128
+ select ADK_RUNTIME_START_SERVICES
+ select ADK_RUNTIME_START_DROPBEAR
+ select ADK_RUNTIME_START_BUSYBOX_NTPD
+ select ADK_RUNTIME_START_BUSYBOX_SYSLOGD
+ select ADK_RUNTIME_START_XBMC
help
Create a small xbmc box.
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index 22600f9d2..b7bc2462d 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -57,6 +57,7 @@ config ADK_QUIET_KERNEL
choice
prompt "bootup messages from initscripts"
+default ADK_RUNTIME_QUIET_INIT if ADK_PKG_XBMCBOX
default ADK_RUNTIME_VERBOSE_INIT_VGA if ADK_TARGET_WITH_VGA || ADK_TARGET_QEMU_WITH_GRAPHIC || ADK_TARGET_QEMU_WITH_GRAPHIC_ONLY || ADK_TARGET_VBOX
default ADK_RUNTIME_VERBOSE_INIT_SERIAL
@@ -75,6 +76,7 @@ endchoice
choice
prompt "start getty or shell after bootup"
default ADK_RUNTIME_SHELL if ADK_PKG_TEST
+default ADK_RUNTIME_NONE if ADK_PKG_XBMCBOX
default ADK_RUNTIME_GETTY
config ADK_RUNTIME_GETTY
@@ -87,6 +89,11 @@ config ADK_RUNTIME_SHELL
help
Start a shell after bootup
+config ADK_RUNTIME_NONE
+ boolean "start no shell nor getty after bootup"
+ help
+ Do not start a shell or getty after bootup
+
endchoice
config ADK_RUNTIME_GETTY_VGA