mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2025-08-29 07:12:12 +02:00
Compare commits
2 Commits
ac4af715b3
...
6436a22054
Author | SHA1 | Date | |
---|---|---|---|
|
6436a22054 | ||
|
ca78790be1 |
@@ -29,8 +29,4 @@ 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/*
|
||||||
# setup hostname
|
|
||||||
cat << 'EOF' >> "${IMAGE_ROOTFS}/etc/hostname"
|
|
||||||
diyaid
|
|
||||||
EOF
|
|
||||||
}
|
}
|
20
recipes-diya/initramfs/files/confd
Normal file
20
recipes-diya/initramfs/files/confd
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
DESC="Auto deployment configuration from media"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Start $DESC: "
|
||||||
|
# for some reason the LCD backlight is turned off
|
||||||
|
# need to turn it on manually
|
||||||
|
echo 0 > /sys/class/backlight/backlight/bl_power
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
N=/etc/init.d/$NAME
|
||||||
|
echo "Usage: $N {start}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
@@ -120,6 +120,8 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exec /sbin/init
|
||||||
|
|
||||||
# active the back light
|
# active the back light
|
||||||
echo 0 > /sys/class/backlight/backlight/bl_power
|
echo 0 > /sys/class/backlight/backlight/bl_power
|
||||||
|
|
||||||
@@ -159,7 +161,7 @@ for m in $MODULES_DIR/*; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
exec /sbin/init
|
|
||||||
# exec sh
|
# exec sh
|
||||||
# Catch all
|
# Catch all
|
||||||
fatal "ERROR: Initramfs failed to initialize the system."
|
fatal "ERROR: Initramfs failed to initialize the system."
|
||||||
|
@@ -8,13 +8,10 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|||||||
|
|
||||||
PR = "r4"
|
PR = "r4"
|
||||||
|
|
||||||
inherit useradd
|
inherit allarch useradd update-rc.d
|
||||||
|
|
||||||
inherit allarch
|
|
||||||
|
|
||||||
SRC_URI = "file://init \
|
SRC_URI = "file://init \
|
||||||
file://udev \
|
file://confd \
|
||||||
file://debug \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}"
|
S = "${WORKDIR}"
|
||||||
@@ -24,6 +21,9 @@ GROUPADD_PACKAGES = "${PN}"
|
|||||||
|
|
||||||
USERADD_PARAM:${PN} = "-u 0 -d /root -r -s /bin/sh root"
|
USERADD_PARAM:${PN} = "-u 0 -d /root -r -s /bin/sh root"
|
||||||
|
|
||||||
|
INITSCRIPT_NAME = "confd"
|
||||||
|
INITSCRIPT_PARAMS = "start 30 S ."
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}/init.d
|
install -d ${D}/init.d
|
||||||
|
|
||||||
@@ -31,11 +31,12 @@ do_install() {
|
|||||||
install -m 0755 ${WORKDIR}/init ${D}/init
|
install -m 0755 ${WORKDIR}/init ${D}/init
|
||||||
|
|
||||||
# udev
|
# udev
|
||||||
install -m 0755 ${WORKDIR}/udev ${D}/init.d/01-udev
|
# install -m 0755 ${WORKDIR}/udev ${D}/init.d/01-udev
|
||||||
|
|
||||||
# debug
|
# debug
|
||||||
install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
|
# install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
|
||||||
|
|
||||||
|
install -m 0755 ${WORKDIR}/confd ${D}/init.d/confd
|
||||||
|
|
||||||
# Create device nodes expected by some kernels in initramfs
|
# Create device nodes expected by some kernels in initramfs
|
||||||
# before even executing /init.
|
# before even executing /init.
|
||||||
|
Reference in New Issue
Block a user