95 lines
3.5 KiB
BlitzBasic
95 lines
3.5 KiB
BlitzBasic
LICENSE = "GPL-2.0-only"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
|
|
|
SRC_URI = "git://github.com/redhat-performance/tuned;protocol=https;branch=master"
|
|
SRC_URI[sha256sum] = "66fa95b07b73a1ceafb6712b140fbbd77136d4cf86de47d6cabef9137a9bbdfa"
|
|
|
|
SRC_URI += " file://tuned-boot-path.patch "
|
|
#SRC_URI += " file://grubenv_location.patch "
|
|
|
|
# Modify these as desired
|
|
PV = "2.26+git${SRCPV}"
|
|
SRCREV = "181472a0be2125c8cd36c7673ec546d75d396a3d"
|
|
|
|
# LinuxCNC build separation is broken, so we need to build in src
|
|
#S = '${UNPACKDIR}/git'
|
|
#TARGET_CC_ARCH += " ${LDFLAGS}"
|
|
|
|
INHERIT += "grub-efi"
|
|
DEPENDS += " desktop-file-utils-native python3"
|
|
RDEPENDS:${PN} += "grub-bootconf grub-efi grub-efi-editenv python3 python3-core bash systemtap python3-dbus python3-pygobject python3-pyudev python3-linux-procfs irqbalance "
|
|
#RDEPENDS:${PN} += " grub grub-editenv grub-bootconf grub-common grub-efi grub-efi-editenv "
|
|
|
|
inherit pkgconfig
|
|
inherit systemd
|
|
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
|
|
SYSTEMD_SERVICE:${PN} = "tuned.service"
|
|
|
|
BASELIB:${PN} = "lib64"
|
|
|
|
|
|
#TODO make file callouts explicit, or at least somehow filter down to ensure only required files are packaged
|
|
FILES:${PN} += "\
|
|
/usr/lib64/* \
|
|
/usr/lib/* \
|
|
/usr/local/* \
|
|
/usr/share/* \
|
|
/usr/bin/grub2-editenv \
|
|
/etc/default/grub \
|
|
"
|
|
FILES:${PN}-dev = " "
|
|
FILES:${PN}-dbg = " "
|
|
|
|
do_configure:append () {
|
|
cd ${S}
|
|
oe_runmake
|
|
}
|
|
|
|
do_install:append () {
|
|
cd ${S}
|
|
oe_runmake install DESTDIR=${D}
|
|
mkdir -p ${RECIPE_SYSROOT}/etc
|
|
#TODO this is mad hacky, we don't want user account info tied up in the build enviornment
|
|
cp /etc/passwd ${RECIPE_SYSROOT}/etc/passwd
|
|
cp /etc/group ${RECIPE_SYSROOT}/etc/group
|
|
rm ${D}/run -rf
|
|
rm ${PKGD}/var/volatile -rf
|
|
PYVER=$(find ${RECIPE_SYSROOT}/usr/${BASELIB} -maxdepth 1 -type d -name python3\.* -exec basename {} \;)
|
|
mkdir -p ${D}/usr/${BASELIB}/${PYVER}/site-packages
|
|
#PYTHON_SITELIB might break on a future update to tuned; this line is copied manually from the makefile
|
|
#PYTHON_SITELIB=$(python3 -c 'from sysconfig import get_path; print(get_path("purelib"));')
|
|
TUNED_ORIG=$(find ${D} -wholename "*/${PYVER}/site-packages/${PN}" -type d -maxdepth 5)
|
|
mv $TUNED_ORIG ${D}/usr/${BASELIB}/${PYVER}/site-packages
|
|
ln -s /boot/EFI/BOOT/grub.cfg ${D}/etc/grub2.cfg
|
|
ln -s grub-editenv ${D}/usr/bin/grub2-editenv
|
|
ln -s grub-mkconfig ${D}/usr/bin/grub2-mkconfig
|
|
mkdir -p ${D}/etc/default
|
|
echo "#this file was generated by the Tuned bitbake install script" > ${D}/etc/default/grub
|
|
#mkdir -p ${D}/boot/grub
|
|
#mkdir -p ${DEPLOY_DIR_IMAGE}/boot
|
|
#ln -s /boot/EFI/BOOT/ ${DEPLOY_DIR_IMAGE}/boot/grub
|
|
#source Makefile
|
|
}
|
|
|
|
#raspberry pi seems to struggle with only 1 housekeeping core, so we set a second one here
|
|
#unclear why, or if this will extend to other ARM systems (as a stab in the dark, possibly where u-boot is required?)
|
|
#Specifically, an RPi 5 reports kernel panic if isolcpus=1-3, or even 1-2 (although it boots normally if isolcpus=2-3).
|
|
# with isolcpus=1-2, a boot delay of 2s allowed the Pi to boot successfully
|
|
# with isolcpus=1-3, Pi reports a kernel panic with boot delay even up to 4s
|
|
do_install:append:rpi () {
|
|
sed -i "s/1}/2}/" ${D}/etc/${PN}/realtime-variables.conf
|
|
}
|
|
|
|
do_package_qa:prepend () {
|
|
import shutil
|
|
_dir = d.getVar('PKGD') + "/var/volatile"
|
|
if os.path.isdir(_dir):
|
|
shutil.rmtree(_dir)
|
|
_dir = d.getVar('PKGDEST') + "/" + d.getVar('PN') + "/var/volatile"
|
|
if os.path.isdir(_dir):
|
|
shutil.rmtree(_dir)
|
|
}
|
|
#IMAGE_BOOT_FILES += "grub"
|
|
#IMAGE_EFI_BOOT_FILES += "/boot/grub"
|
|
INSANE_SKIP:${PN} += "host-user-contaminated"
|