1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-08 06:28:23 +01:00

use sysvinit

This commit is contained in:
DanyLE 2023-08-02 09:51:11 +02:00
parent a11dda3253
commit 7978bdd326
8 changed files with 24 additions and 8 deletions

View File

@ -12,4 +12,8 @@ if [ ! -e "$XDG_RUNTIME_DIR" ]; then
fi
export TERM=xterm-256color
EOF
cat << EOF >> "${D}${sysconfdir}/profile"
export MACHINE=$MACHINE
EOF
}

View File

@ -12,7 +12,7 @@ EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE diya; \
usermod -a -G avahi diya; \
usermod -a -G sudo diya \
"
IMAGE_BOOT_FILES:append = "fs_resize extraconfig.txt cmd.recovery recovery-${MACHINE}.cpio.gz "
IMAGE_BOOT_FILES:append = "fs_resize extraconfig.txt recovery-${MACHINE}.cpio.gz "
IMAGE_INSTALL:append = "libcurl \
libdrm \
@ -57,3 +57,9 @@ IMAGE_INSTALL:append = "libcurl \
gdbserver \
"
IMAGE_PREPROCESS_COMMAND += "image_patch;"
image_patch () {
# delete unused kernel image
rm -rf ${IMAGE_ROOTFS}/boot/*
}

View File

@ -7,7 +7,6 @@ SRC_URI += "file://confd \
file://expandfs.sh \
file://80_diya \
file://fs_resize \
file://cmd.recovery \
file://extraconfig.txt"
@ -30,8 +29,10 @@ do_install() {
# 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}/fs_resize ${DEPLOY_DIR_IMAGE}/
install -m 0755 ${WORKDIR}/cmd.recovery ${DEPLOY_DIR_IMAGE}/
install -m 0755 ${WORKDIR}/extraconfig.txt ${DEPLOY_DIR_IMAGE}/
cat << EOF >> ${DEPLOY_DIR_IMAGE}/extraconfig.txt
# initramfs recovery-${MACHINE}.cpio.gz followkernel
EOF
install -d ${D}/var/etc
install -d ${D}/var/etc/upper

View File

@ -1 +0,0 @@
dwc_otg.lpm_enable=0 root=/dev/ram0 console=tty0,115200 bootparam_init_fatal_sh=1 rootwait logo.nologo

View File

@ -1 +0,0 @@
# initramfs recovery.cpio.gz followkernel

View File

@ -2,6 +2,7 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC="Custom configuration"
. /etc/profile
case "$1" in
start)
@ -13,6 +14,10 @@ case "$1" in
echo "diya-recovery" > /proc/sys/kernel/hostname
# mount boot
mount /dev/mmcblk0p1 /boot
cat << EOF >> /boot/extraconfig.txt
# initramfs recovery-${MACHINE}.cpio.gz followkernel
EOF
;;
*)
N=/etc/init.d/$NAME

View File

@ -61,7 +61,7 @@ EFI_DIR=/sys/firmware/efi # place to store device firmware information
touch /etc/fstab
# initialize /proc, /sys, /run/lock and /var/lock
mkdir -p /proc /sys /run/lock /var/lock
mkdir -p /proc /sys /run/lock /var/lock /var/run
mount -t proc proc /proc
mount -t sysfs sysfs /sys

View File

@ -25,7 +25,9 @@ do_install() {
# base
install -m 0755 ${WORKDIR}/init ${D}/init
install -m 0755 ${WORKDIR}/confd ${D}/etc/init.d/confd
cat << EOF >> ${D}/etc/profile
export MACHINE=${MACHINE}
EOF
# Create device nodes expected by some kernels in initramfs
# before even executing /init.
install -d ${D}/dev