Files
poky/meta-yocto/recipes-core/tiny-init/files/init
Darren Hart e96d541c8e tiny-init: Mount devtmpfs manually
When using an initramfs, the default for poky-tiny, the kernel can't
automatically mount devtmpfs. Ensure it is mounted. This eliminates the
need to create the ptmx device.

(From meta-yocto rev: b0ae9ca7078ec57fe21ccd8a14302a075ca07aa3)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:39:07 -08:00

550 B

#!/bin/sh

Mount the Linux kernel virtual filesystems

mount none -t proc /proc mount none -t sysfs /sys

Ensure devtmpfs is mounted, it must be done manually with initramfs

mount none -t devtmpfs /dev

Setup PTY infrastructure

mkdir /dev/pts mount none -t devpts /dev/pts

ifup lo

Allow for distro or local customizations

if [ -f /etc/rc.local ] ; then source /etc/rc.local fi

Become session leader and try to find a real tty (e.g. ttyS0)

while true; do setsid cttyhack sh echo "Console sh exited with $?, respawning..." sleep 1 done