added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,69 @@
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
resize_enabled() {
return 0
}
resize_run() {
ln -s /proc/mounts /etc/mtab
if [ -n "$ROOTFS_DIR" ]; then
if [ ! -e $ROOTFS_DIR/etc/.resized ]
then
# check command line to now storage device used
if [ -n "$bootparam_root" ]; then
debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..."
if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" ]; then
root_uuid=`echo $bootparam_root | cut -c6-`
bootparam_root="/dev/disk/by-uuid/$root_uuid"
elif [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then
root_partuuid=`echo $bootparam_root | cut -c10-`
bootparam_root="/dev/disk/by-partuuid/$root_partuuid"
elif [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
root_partlabel=`echo $bootparam_root | cut -c11-`
bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
elif [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
root_label=`echo $bootparam_root | cut -c7-`
bootparam_root="/dev/disk/by-label/$root_label"
fi
if [ -e "$bootparam_root" ]; then
bootparam_root_device=$(busybox readlink $bootparam_root -f)
j=$(echo $bootparam_root_device | sed "s|/dev/mmcblk\([0-1]\)p.*|\1|")
for i in 3 4 5 6 7 8 9 10 11 12 13 14 15 16;
do
DEVICE="/dev/mmcblk"$j"p"$i
if [ -e $DEVICE ]; then
label=$(/sbin/e2label $DEVICE 2> /dev/null)
if [ $? -eq 0 ]; then
case $label in
user*)
echo "RESIZE USERFS [$DEVICE]"
/sbin/e2fsck -f -y -c -C 0 $DEVICE && /sbin/resize2fs $DEVICE
;;
root*)
echo "RESIZE ROOTFS [$DEVICE]"
/sbin/resize2fs $DEVICE
;;
vendor*)
echo "RESIZE VENDORFS [$DEVICE]"
/sbin/e2fsck -f -y -c -C 0 $DEVICE && /sbin/resize2fs $DEVICE
;;
boot*)
echo "RESIZE BOOTFS [$DEVICE]"
/sbin/e2fsck -f -y -c -C 0 $DEVICE && /sbin/resize2fs $DEVICE
;;
*)
;;
esac
fi
fi
done
touch $ROOTFS_DIR/etc/.resized
fi
fi
fi
fi
}

View File

@@ -0,0 +1,15 @@
SUMMARY = "Resize init script"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://init-resize.sh"
S = "${WORKDIR}"
do_install() {
install -d ${D}/init.d
install -m 0755 ${WORKDIR}/init-resize.sh ${D}/init.d/95-resize
}
inherit allarch
FILES:${PN} += "/init.d/"

View File

@@ -0,0 +1,44 @@
SUMMARY = "ST InitRD installation package for ${INITRD_IMAGE_ALL} image(s)"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
# We provide an InitRD specific to machine
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit deploy
S = "${WORKDIR}"
# Set InitRD image list
INITRD_IMAGE ??= ""
INITRD_IMAGE_ALL += "${INITRD_IMAGE}"
do_install() {
if [ -z "${INITRD_IMAGE_ALL}" ]; then
bbnote "No InitRD file set"
return
fi
for img in ${INITRD_IMAGE_ALL}; do
INITRD_IMAGE_FILE=$(find ${DEPLOY_DIR_IMAGE} -name ${img}*-${MACHINE}.${INITRAMFS_FSTYPES})
if [ -e "${INITRD_IMAGE_FILE}" ]; then
bbnote "Copying ${img} InitRD file into ./boot/ ..."
install -d ${D}/boot
install -m 0644 ${INITRD_IMAGE_FILE} ${D}/boot/${img}
else
bbfatal "Could not find ${img}*-${MACHINE}.${INITRAMFS_FSTYPES} image file in ${DEPLOY_DIR_IMAGE} folder"
fi
done
}
do_install[depends] += "${@' '.join([i + ':do_image_complete' for i in d.getVar('INITRD_IMAGE_ALL').split()])}"
do_deploy() {
install -d ${DEPLOYDIR}
echo "${SUMMARY}" > ${DEPLOYDIR}/${PN}-${DISTRO}-${MACHINE}
}
addtask deploy before do_build after do_compile
FILES:${PN} += "/boot"
# Provide empty package to allow direct use on image side even with none InitRD
ALLOW_EMPTY:${PN} = "1"