mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 06:32:13 +02:00
initrdscripts: Add the simplest init script
When booting from initramfs, one must provide a /init link. This one is the simplest one, just forking a shell, allowing for the smallest initramfs.
This commit is contained in:
8
meta/packages/initrdscripts/files/init-boot.sh
Normal file
8
meta/packages/initrdscripts/files/init-boot.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir /proc
|
||||
mkdir /sys
|
||||
mount -t proc proc /proc
|
||||
mount -t sysfs sysfs /sys
|
||||
|
||||
exec sh
|
||||
12
meta/packages/initrdscripts/initramfs-boot_1.0.bb
Normal file
12
meta/packages/initrdscripts/initramfs-boot_1.0.bb
Normal file
@@ -0,0 +1,12 @@
|
||||
DESCRIPTON = "A live image init script"
|
||||
|
||||
SRC_URI = "file://init-boot.sh"
|
||||
|
||||
PR = "r0"
|
||||
|
||||
do_install() {
|
||||
install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
|
||||
}
|
||||
|
||||
PACKAGE_ARCH = "all"
|
||||
FILES_${PN} += " /init "
|
||||
Reference in New Issue
Block a user