init: Added /dev/null to fix rootfs issues.
When booting from rootfs, /dev/null generates attributes as 0 0, causing service startup failure (ssh/nfs,...etc) remove debug code: "echo abcd" Signed-off-by: samin <samin.guo@starfivetech.com>
This commit is contained in:
@@ -19,7 +19,6 @@ for x in $(cat /proc/cmdline); do
|
||||
done
|
||||
|
||||
if [ "x${ROOT}" = "x" ]; then
|
||||
echo abcd
|
||||
exec /sbin/init
|
||||
fi
|
||||
|
||||
@@ -27,8 +26,8 @@ mount -t sysfs sysfs /sys
|
||||
|
||||
mdev -s
|
||||
|
||||
mkdir /dev/pts
|
||||
mkdir /dev/shm
|
||||
mkdir -p /dev/pts
|
||||
mkdir -p /dev/shm
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /dev/shm
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
@@ -45,6 +44,9 @@ else
|
||||
if [ ! -e /rootfs/dev/console ]; then
|
||||
/bin/mknod /rootfs/dev/console c 5 1
|
||||
fi
|
||||
if [ ! -e /rootfs/dev/null ]; then
|
||||
/bin/mknod /rootfs/dev/null c 1 3
|
||||
fi
|
||||
fi
|
||||
|
||||
mount -n -o move /proc /rootfs/proc
|
||||
|
||||
Reference in New Issue
Block a user