Permalink
Browse files

Support building systemd based system

Signed-off-by: Wataru Ishida <ishida@nel-america.com>
  • Loading branch information...
ishidawataru committed Jun 1, 2018
1 parent 56bf7f1 commit a681cf6c8144552cb513555dc293021979840954
@@ -4,7 +4,6 @@
#
############################################################
- base-files
- sysvinit-core
- locales
- python
- apt
@@ -11,6 +11,7 @@ variables:
!include $ONL/make/versions/version-onl.yml
Packages: &Packages
- !script $ONL/tools/onl-init-pkgs.py ${INIT}
- !include $ONL/builds/any/rootfs/$ONL_DEBIAN_SUITE/common/all-base-packages.yml
- !include $ONL/builds/any/rootfs/$ONL_DEBIAN_SUITE/common/${ARCH}-base-packages.yml
- !include $ONL/builds/any/rootfs/$ONL_DEBIAN_SUITE/common/${ARCH}-onl-packages.yml
@@ -4,7 +4,6 @@
#
############################################################
- base-files
- sysvinit-core
- locales
- python
- apt
@@ -11,6 +11,7 @@ variables:
!include $ONL/make/versions/version-onl.yml
Packages: &Packages
- !script $ONL/tools/onl-init-pkgs.py ${INIT}
- !include $ONL/builds/any/rootfs/$ONL_DEBIAN_SUITE/common/all-base-packages.yml
- !include $ONL/builds/any/rootfs/$ONL_DEBIAN_SUITE/common/${ARCH}-base-packages.yml
- !include $ONL/builds/any/rootfs/$ONL_DEBIAN_SUITE/common/${ARCH}-onl-packages.yml
View
@@ -26,6 +26,10 @@ export ONL_DEBIAN_SUITE_$(ONL_DEBIAN_SUITE)=1
export BUILD_DIR_BASE=BUILD/$(ONL_DEBIAN_SUITE)
# init system options sysvinit, systemd. default is sysvinit
ifndef INIT
export INIT := sysvinit
endif
# Use the new module database tool to resolve dependencies dynamically.
ifndef BUILDER_MODULE_DATABASE
@@ -62,6 +62,8 @@ mount --move /dev /newroot/dev
# Switch to /newroot if possible, else re-execute /init
if [ -x /newroot/sbin/init ]; then
exec switch_root -c /dev/console /newroot /sbin/init
elif [ -x /newroot/lib/systemd/systemd ]; then
exec switch_root -c /dev/console /newroot /lib/systemd/systemd
else
exec /init
fi
View
@@ -0,0 +1,18 @@
#!/usr/bin/python2
############################################################
#
# This script produces a YAML list on stdout of all
# packages necessary to support the given init system
#
import argparse
ap = argparse.ArgumentParser(description='ONL Init Package Lister')
ap.add_argument('init', metavar='INIT-SYSTEM', choices=['sysvinit', 'systemd'], help='Init system to use')
ops = ap.parse_args()
if ops.init == 'sysvinit':
print '- sysvinit-core'
elif ops.init == 'systemd':
print '- systemd'
print '- systemd-sysv'

0 comments on commit a681cf6

Please sign in to comment.