1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-20 03:48:22 +01:00

use sysvinit

This commit is contained in:
DanyLE 2023-08-02 10:13:00 +02:00
parent 8ba74de514
commit e552576431
4 changed files with 12 additions and 4 deletions

View File

@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
SRC_URI += "file://confd \ SRC_URI += "file://confd \
file://expandfs.sh \ file://expandfs.sh \
file://80_diya \ file://80_diya \
file://fs_resize" file://fs_resize \
file://boot-to-recovery"
inherit update-rc.d useradd inherit update-rc.d useradd
@ -26,7 +27,8 @@ do_install() {
install -d ${D}/usr/bin/ install -d ${D}/usr/bin/
install -d ${D}/etc/default/volatiles install -d ${D}/etc/default/volatiles
# install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles # install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/sbin/expandfs.sh
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/usr/sbin/boot-to-recovery
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/ install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
cat << EOF >> ${DEPLOY_DIR_IMAGE}/extraconfig.txt cat << EOF >> ${DEPLOY_DIR_IMAGE}/extraconfig.txt

View File

@ -9,7 +9,7 @@ fi
# prepare env for recovery boot # prepare env for recovery 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
echo "Rebooting to recovery mode" echo "Rebooting to recovery mode"
reboot reboot

View File

@ -13,7 +13,7 @@ case "$1" in
# 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
if [ -f "/boot/fs_resize" ]; then if [ -f "/boot/fs_resize" ]; then
/usr/bin/expandfs.sh /usr/sbin/expandfs.sh
touch /boot/home_partition_should_be_formated touch /boot/home_partition_should_be_formated
rm /boot/fs_resize rm /boot/fs_resize
reboot reboot

View File

@ -1,4 +1,10 @@
#! /bin/sh #! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$0 shall be run as root"
exit 1
fi
line=$( line=$(
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p4 sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p4
p p