summaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-initramfs/recipes-bsp')
-rw-r--r--meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh31
-rw-r--r--meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb14
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh b/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh
new file mode 100644
index 000000000..7edbd70cb
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh
@@ -0,0 +1,31 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4
5do_mount_fs() {
6 grep -q "$1" /proc/filesystems || return
7 test -d "$2" || mkdir -p "$2"
8 mount -t "$1" "$1" "$2"
9}
10
11do_mknod() {
12 test -e "$1" || mknod "$1" "$2" "$3" "$4"
13}
14
15mkdir -p /proc
16mount -t proc proc /proc
17
18do_mount_fs sysfs /sys
19do_mount_fs debugfs /sys/kernel/debug
20do_mount_fs devtmpfs /dev
21do_mount_fs devpts /dev/pts
22do_mount_fs tmpfs /dev/shm
23
24mkdir -p /run
25mkdir -p /var/run
26
27do_mknod /dev/console c 5 1
28do_mknod /dev/null c 1 3
29do_mknod /dev/zero c 1 5
30
31exec sh </dev/console >/dev/console 2>/dev/console
diff --git a/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb b/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
new file mode 100644
index 000000000..b7defff6f
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb
@@ -0,0 +1,14 @@
1SUMMARY = "Extremely basic live image init script"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-debug.sh"
5
6S = "${WORKDIR}"
7
8do_install() {
9 install -m 0755 ${WORKDIR}/init-debug.sh ${D}/init
10}
11
12inherit allarch
13
14FILES_${PN} += " /init "