summaryrefslogtreecommitdiffstats
path: root/meta-yocto/recipes-core/tiny-init/files
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta-yocto/recipes-core/tiny-init/files
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-yocto/recipes-core/tiny-init/files')
-rw-r--r--meta-yocto/recipes-core/tiny-init/files/init26
-rw-r--r--meta-yocto/recipes-core/tiny-init/files/rc.local.sample23
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-yocto/recipes-core/tiny-init/files/init b/meta-yocto/recipes-core/tiny-init/files/init
new file mode 100644
index 0000000000..9140e9558e
--- /dev/null
+++ b/meta-yocto/recipes-core/tiny-init/files/init
@@ -0,0 +1,26 @@
1#!/bin/sh
2
3# Mount the Linux kernel virtual filesystems
4mount none -t proc /proc
5mount none -t sysfs /sys
6
7# Ensure devtmpfs is mounted, it must be done manually with initramfs
8mount none -t devtmpfs /dev
9
10# Setup PTY infrastructure
11mkdir /dev/pts
12mount none -t devpts /dev/pts
13
14ifup lo
15
16# Allow for distro or local customizations
17if [ -f /etc/rc.local ] ; then
18 . /etc/rc.local
19fi
20
21# Become session leader and try to find a real tty (e.g. ttyS0)
22while true; do
23 setsid cttyhack sh
24 echo "Console sh exited with $?, respawning..."
25 sleep 1
26done
diff --git a/meta-yocto/recipes-core/tiny-init/files/rc.local.sample b/meta-yocto/recipes-core/tiny-init/files/rc.local.sample
new file mode 100644
index 0000000000..d9e198a200
--- /dev/null
+++ b/meta-yocto/recipes-core/tiny-init/files/rc.local.sample
@@ -0,0 +1,23 @@
1#!/bin/sh
2
3# Start services and customize the boot process here.
4echo "Running /etc/rc.local..."
5
6# Use init scripts included with packages such as dropbear
7#/etc/init.d/dropbear start
8
9# Spawn a getty manually
10#setsid /sbin/getty 115200 ttyS2
11
12# Print a banner
13#echo "You are running a poky-tiny image brought to you by the Yocto Project."
14
15# Setup a debugging environment
16#mkdir /debugfs
17#mount none -t debugfs /debugfs
18
19# Load modules (note: linux-yocto-tiny does not have module support by default)
20#modprobe yourdriver
21
22# DO NOT run any long running tasks or loops as these will delay
23# the /init script and the console shell.