Хвостатый кодер
86 subscribers
398 photos
11 videos
4 files
194 links
Download Telegram
Я уже в systemd преисполнился. Хорошая штука для случая когда вы рукожопы не умеете service писать
Хвостатый кодер
Текст: Unit File Load Path Unit files are loaded from a set of paths determined during compilation, described in the two tables below. Unit files found in directories listed earlier override files with the same name in directories lower in the list. When…
Вообщем смог это все же реализовать, осталось понять как заставить делать это yocto не хардкором а чем то адекватным
do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD:cpio () {
(cd ${IMAGE_ROOTFS} && find . | sort | cpio --reproducible -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
# We only need the /init symlink if we're building the real
# image. The -dbg image doesn't need it! By being clever
# about this we also avoid 'touch' below failing, as it
# might be trying to touch /sbin/init on the host since both
# the normal and the -dbg image share the same WORKDIR
if [ "${IMAGE_BUILDING_DEBUGFS}" != "true" ]; then
if [ ! -L ${IMAGE_ROOTFS}/init ] && [ ! -e ${IMAGE_ROOTFS}/init ]; then
if [ -L ${IMAGE_ROOTFS}/sbin/init ] || [ -e ${IMAGE_ROOTFS}/sbin/init ]; then
ln -sf /sbin/init ${WORKDIR}/cpio_append/init
touch -h -r ${IMAGE_ROOTFS}/sbin/init ${WORKDIR}/cpio_append/init
else
touch -r ${IMAGE_ROOTFS} ${WORKDIR}/cpio_append/init
fi
(cd ${WORKDIR}/cpio_append && echo ./init | cpio --reproducible -oA -H newc -F ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
fi
fi
}