summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-10-29 07:51:09 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2016-10-29 07:51:39 +0200
commit443fb793aab5aa894bcd5fde604bd143c1d88fcc (patch)
treec9103b58442025d53cae8477d16909b0eff146d1 /package
parent096d864673cabe27bd88fe29e9040374c9f407f6 (diff)
sysvinit: add experimental support for non busybox init
Diffstat (limited to 'package')
-rw-r--r--package/base-files/Makefile5
-rw-r--r--package/base-files/files/inittab.sysv4
-rw-r--r--package/sysvinit/Makefile30
-rw-r--r--package/sysvinit/patches/patch-src_Makefile13
-rw-r--r--package/util-linux/Makefile12
5 files changed, 62 insertions, 2 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index bc8efca2f..9d932ac26 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -83,6 +83,7 @@ endif
rm -rf $(IDIR_BASE_FILES)/var
ln -sf tmp $(IDIR_BASE_FILES)/var
ln -sf var/run $(IDIR_BASE_FILES)/run
+ifeq ($(ADK_RUNTIME_INIT_SYSV),y)
test -z $(ADK_RUNTIME_SHELL) || \
cat ./files/inittab.shell >> $(IDIR_BASE_FILES)/etc/inittab
ifeq ($(ADK_TARGET_WITH_VGA),y)
@@ -95,6 +96,10 @@ endif
cat ./files/inittab.serial >> $(IDIR_BASE_FILES)/etc/inittab
$(SED) 's#@DEVICE@#$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)#g' $(IDIR_BASE_FILES)/etc/inittab
$(SED) 's#@SPEED@#$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)#' $(IDIR_BASE_FILES)/etc/inittab
+endif
+ifeq ($(ADK_RUNTIME_INIT_SYSVINIT),y)
+ cp ./files/inittab.sysv $(IDIR_BASE_FILES)/etc/inittab
+endif
test -z $(ADK_RUNTIME_HOSTNAME) || \
echo $(ADK_RUNTIME_HOSTNAME) > $(IDIR_BASE_FILES)/etc/hostname; \
echo "127.0.0.1 localhost" > $(IDIR_BASE_FILES)/etc/hosts
diff --git a/package/base-files/files/inittab.sysv b/package/base-files/files/inittab.sysv
new file mode 100644
index 000000000..edfe9dc94
--- /dev/null
+++ b/package/base-files/files/inittab.sysv
@@ -0,0 +1,4 @@
+id:2:initdefault:
+si::sysinit:/etc/init.d/rcS
+1:234:respawn:/sbin/agetty 115200 tty1
+AMA0:3:respawn:/sbin/agetty -L 9600 ttyAMA0 vt320
diff --git a/package/sysvinit/Makefile b/package/sysvinit/Makefile
new file mode 100644
index 000000000..08303ab41
--- /dev/null
+++ b/package/sysvinit/Makefile
@@ -0,0 +1,30 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= sysvinit
+PKG_VERSION:= 2.88dsf
+PKG_RELEASE:= 1
+PKG_HASH:= 60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519
+PKG_DESCR:= systemV init
+PKG_SECTION:= base/apps
+PKG_URL:= http://savannah.nongnu.org/projects/sysvinit
+PKG_SITES:= http://download.savannah.gnu.org/releases/sysvinit/
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,SYSVINIT,sysvinit,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+CONFIG_STYLE:= manual
+XAKE_FLAGS+= GCC_HONOUR_COPTS=s
+FAKE_FLAGS+= ROOT='$(WRKINST)'
+
+sysvinit-install:
+ $(INSTALL_DIR) $(IDIR_SYSVINIT)/sbin
+ $(INSTALL_BIN) $(WRKINST)/sbin/init \
+ $(IDIR_SYSVINIT)/sbin
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/sysvinit/patches/patch-src_Makefile b/package/sysvinit/patches/patch-src_Makefile
new file mode 100644
index 000000000..ed5c51757
--- /dev/null
+++ b/package/sysvinit/patches/patch-src_Makefile
@@ -0,0 +1,13 @@
+--- sysvinit-2.88dsf.orig/src/Makefile 2010-04-11 11:30:27.000000000 +0200
++++ sysvinit-2.88dsf/src/Makefile 2016-10-28 18:59:43.000000000 +0200
+@@ -8,8 +8,9 @@
+ # Version: @(#)Makefile 2.85-13 23-Mar-2004 miquels@cistron.nl
+ #
+
+-CPPFLAGS =
++CPPFLAGS ?=
+ CFLAGS ?= -ansi -O2 -fomit-frame-pointer
++LDFLAGS ?=
+ override CFLAGS += -W -Wall -D_GNU_SOURCE
+ STATIC =
+
diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile
index b9ba78197..08a430018 100644
--- a/package/util-linux/Makefile
+++ b/package/util-linux/Makefile
@@ -15,7 +15,7 @@ PKG_NEEDS:= threads
PKG_SITES:= http://www.kernel.org/pub/linux/utils/util-linux/v2.28/
PKG_OPTS:= dev
-PKG_SUBPKGS:= FDISK SFDISK SWAP_UTILS LOSETUP MCOOKIE MOUNT
+PKG_SUBPKGS:= FDISK AGETTY SFDISK SWAP_UTILS LOSETUP MCOOKIE MOUNT
PKG_SUBPKGS+= LIBFDISK LIBUUID LIBBLKID LIBMOUNT CFDISK MKFS
PKGSD_LIBUUID:= uuid library
PKGSC_LIBUUID:= libs/misc
@@ -28,6 +28,9 @@ PKGSC_LIBMOUNT:= libs/misc
PKGSD_FDISK:= partition table manipulation utility
PKGSC_FDISK:= sys/fs
PKGSS_FDISK:= libfdisk
+PKGSD_AGETTY:= getty utility
+PKGSC_AGETTY:= base/apps
+PKGSS_AGETTY:= libncurses
PKGSD_SFDISK:= scriptable partition table manipulation utility
PKGSC_SFDISK:= sys/fs
PKGSS_SFDISK:= libfdisk
@@ -51,6 +54,7 @@ include $(ADK_TOPDIR)/mk/host.mk
include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call HOST_template,UTIL_LINUX,util-linux,$(PKG_VERSION)-$(PKG_RELEASE)))
+$(eval $(call PKG_template,AGETTY,agetty,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_AGETTY),$(PKGSC_AGETTY)))
$(eval $(call PKG_template,FDISK,fdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FDISK),$(PKGSC_FDISK)))
$(eval $(call PKG_template,CFDISK,cfdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_CFDISK),$(PKGSC_CFDISK)))
$(eval $(call PKG_template,SFDISK,sfdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_SFDISK),$(PKGSC_SFDISK)))
@@ -91,7 +95,7 @@ CONFIGURE_ARGS+= --disable-use-tty-group \
--enable-libblkid \
--enable-libmount
-ifeq ($(ADK_PACKAGE_FDISK)$(ADK_PACKAGE_SFDISK)$(ADK_PACKAGE_CFDISK)$(ADK_PACKAGE_MKFS)$(ADK_PACKAGE_MOUNT)$(ADK_PACKAGE_SWAP_UTILS)$(ADK_PACKAGE_MCOOKIE),)
+ifeq ($(ADK_PACKAGE_FDISK)$(ADK_PACKAGE_AGETTY)$(ADK_PACKAGE_SFDISK)$(ADK_PACKAGE_CFDISK)$(ADK_PACKAGE_MKFS)$(ADK_PACKAGE_MOUNT)$(ADK_PACKAGE_SWAP_UTILS)$(ADK_PACKAGE_MCOOKIE),)
CONFIGURE_ARGS+= --disable-all-programs
endif
@@ -104,6 +108,10 @@ fdisk-install:
$(INSTALL_DIR) $(IDIR_FDISK)/usr/sbin
$(CP) $(WRKINST)/usr/sbin/fdisk $(IDIR_FDISK)/usr/sbin
+agetty-install:
+ $(INSTALL_DIR) $(IDIR_AGETTY)/sbin
+ $(CP) $(WRKINST)/sbin/agetty $(IDIR_AGETTY)/sbin
+
cfdisk-install:
$(INSTALL_DIR) $(IDIR_CFDISK)/usr/sbin
$(CP) $(WRKINST)/usr/sbin/cfdisk $(IDIR_FDISK)/usr/sbin