mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 21:09:03 +02:00
fri2: Add tiny-init bbappend for devtmpfs and console
When using an initramfs, the default for poky-tiny, the kernel cannot automatically mount devtmpfs. Ensure it is mounted. This eliminates the need to create the ptmx device. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
9fe538c48e
commit
0ebdf34f9a
6
meta-fri2/recipes-core/tiny-init/tiny-init.bbappend
Normal file
6
meta-fri2/recipes-core/tiny-init/tiny-init.bbappend
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Update the init script for the tiny image to manually mount devtmpfs and
|
||||
# ensure the ttyPCH1 device is available for the console.
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
PRINC := "${@int(PRINC) + 1}"
|
26
meta-fri2/recipes-core/tiny-init/tiny-init/init
Normal file
26
meta-fri2/recipes-core/tiny-init/tiny-init/init
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/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
|
Loading…
Reference in New Issue
Block a user