1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-16 18:18:21 +01:00

add base initscripts to initramfs image

This commit is contained in:
DanyLE 2023-08-02 16:14:34 +02:00
parent 715588e723
commit 46bb69221a
2 changed files with 7 additions and 10 deletions

View File

@ -41,6 +41,11 @@ IMAGE_PREPROCESS_COMMAND += "image_patch;"
image_patch () { image_patch () {
# delete unused image # delete unused image
rm -rf ${IMAGE_ROOTFS}/boot/* rm -rf ${IMAGE_ROOTFS}/boot/*
# patch inittab runlevel 6 # create /etc/fstab
cat << EOF > ${IMAGE_ROOTFS}/etc/fstab
/dev/mmcblk0p1 /boot auto defaults,sync,noauto 0 0
EOF
cat << EOF > ${IMAGE_ROOTFS}/etc/hostname
diya-recovery
EOF
} }

View File

@ -10,20 +10,12 @@ case "$1" in
# for some reason the LCD backlight is turned off # for some reason the LCD backlight is turned off
# need to turn it on manually # need to turn it on manually
echo 0 > /sys/class/backlight/backlight/bl_power echo 0 > /sys/class/backlight/backlight/bl_power
# hostname
echo "diya-recovery" > /proc/sys/kernel/hostname
# mount boot
mount /dev/mmcblk0p1 /boot
cat << EOF > /boot/extraconfig.txt cat << EOF > /boot/extraconfig.txt
# initramfs recovery-${MACHINE}.cpio.gz followkernel # initramfs recovery-${MACHINE}.cpio.gz followkernel
EOF EOF
;; ;;
stop)
umount /boot
;;
*) *)
N=/etc/init.d/$NAME N=/etc/init.d/$NAME
echo "Usage: $N {start}" >&2 echo "Usage: $N {start}" >&2