From b48b7b4109868a8c0ddda090992e936e821c7ea6 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Wed, 17 Aug 2016 15:04:38 -0500 Subject: Squashed 'import-layers/meta-openembedded/' content from commit 247b126 Change-Id: I40827e9ce5fba63f1cca2a0be44976ae8383b4c0 git-subtree-dir: import-layers/meta-openembedded git-subtree-split: 247b1267bbe95719cd4877d2d3cfbaf2a2f4865a Signed-off-by: Patrick Williams --- .../recipes-bsp/initrdscripts/files/init-debug.sh | 31 ++++++++++++++++++++++ .../initrdscripts/initramfs-debug_1.0.bb | 14 ++++++++++ 2 files changed, 45 insertions(+) create mode 100644 import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh create mode 100644 import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb (limited to 'import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts') diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh new file mode 100644 index 000000000..7edbd70cb --- /dev/null +++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/files/init-debug.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +do_mount_fs() { + grep -q "$1" /proc/filesystems || return + test -d "$2" || mkdir -p "$2" + mount -t "$1" "$1" "$2" +} + +do_mknod() { + test -e "$1" || mknod "$1" "$2" "$3" "$4" +} + +mkdir -p /proc +mount -t proc proc /proc + +do_mount_fs sysfs /sys +do_mount_fs debugfs /sys/kernel/debug +do_mount_fs devtmpfs /dev +do_mount_fs devpts /dev/pts +do_mount_fs tmpfs /dev/shm + +mkdir -p /run +mkdir -p /var/run + +do_mknod /dev/console c 5 1 +do_mknod /dev/null c 1 3 +do_mknod /dev/zero c 1 5 + +exec sh /dev/console 2>/dev/console diff --git a/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb new file mode 100644 index 000000000..b7defff6f --- /dev/null +++ b/import-layers/meta-openembedded/meta-initramfs/recipes-bsp/initrdscripts/initramfs-debug_1.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "Extremely basic live image init script" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +SRC_URI = "file://init-debug.sh" + +S = "${WORKDIR}" + +do_install() { + install -m 0755 ${WORKDIR}/init-debug.sh ${D}/init +} + +inherit allarch + +FILES_${PN} += " /init " -- cgit v1.2.1