summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2017-12-19 11:16:28 +0100
committerJohn Ogness <john.ogness@linutronix.de>2017-12-19 11:16:28 +0100
commit6e7e1b7172813fc4ecb60597f903dd21a4616159 (patch)
treedbfe0b8f1a3d51c275722ba86d4ffe109ee88aef /distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs
parent270520b4a2eac8725c8575c3180964289722e191 (diff)
update yocto-advanced: sync to devel/manut/yocto
The devel/manut/yocto heavily diverted from master. Sync with latest version 8cd4956a9b48a316eab6dc6d1b1f6cd51362fecf. Signed-off-by: John Ogness <john.ogness@linutronix.de>
Diffstat (limited to 'distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs')
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/busybox_inittab13
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/rcS18
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/schulung-rootfs_1.0.bb36
3 files changed, 67 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/busybox_inittab b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/busybox_inittab
new file mode 100644
index 0000000..66942e4
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/busybox_inittab
@@ -0,0 +1,13 @@
+# Boot-time system configuration/initialization script.
+# This is run first except when booting in single-user mode.
+::sysinit:/etc/init.d/rcS
+
+# start an "askfirst" shell on the console (whatever that may be)
+::askfirst:-/bin/sh
+
+# stuff to do when restarting the init process
+::restart:/sbin/init
+
+# stuff to do before rebooting
+::ctrlaltdel:/sbin/reboot
+::shutdown:/bin/umount -a -r
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/rcS b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/rcS
new file mode 100644
index 0000000..e0d039a
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/files/rcS
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# mount important virtual filesystems
+mount -t devtmpfs none /dev
+mount -t proc none /proc
+mount -t sysfs none /sys
+
+# make sure there is a startup direcdtory
+test -d /etc/rcS.d || exit 0
+
+# start all startup scripts in startup directory
+for scr in `ls /etc/rcS.d`; do
+ case $scr in
+ S*)
+ /etc/rcS.d/$scr start
+ ;;
+ esac
+done
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/schulung-rootfs_1.0.bb b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/schulung-rootfs_1.0.bb
new file mode 100644
index 0000000..4c4992a
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-core/rootfs/schulung-rootfs_1.0.bb
@@ -0,0 +1,36 @@
+# license information
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+# increase this value to force a rebuild of the recipe
+PR = "r0"
+
+# specify _runtime_ dependency on busybox (for package manager)
+# (i.e. busybox can't be uninstalled because schulung-rootfs depends on it)
+# - since runtime dependencies are related to specific packages, they are
+# specified in per package variables (i.e. RDEPENDS_${PN}, not RDEPENDS)
+RDEPENDS_${PN} = "busybox"
+
+# specify inittab configuration file and master startup script
+SRC_URI = "file://busybox_inittab file://rcS"
+
+# install scripts, configurations, important empty directories
+do_install () {
+ # install the scripts/configurations
+ install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS
+ install -D -m 0644 ${WORKDIR}/busybox_inittab ${D}${sysconfdir}/inittab
+
+ # create skeleton directories
+ install -d ${D}/tmp
+ install -d ${D}/dev
+ install -d ${D}/proc
+ install -d ${D}/sys
+}
+
+# manually add some directories because they are not automatically identified
+# (if this is not done, poky will complain about files
+# in ${D} that do not belong to any package)
+FILES_${PN} += "/tmp"
+FILES_${PN} += "/dev"
+FILES_${PN} += "/proc"
+FILES_${PN} += "/sys"