builds and runs on intel-x86 and rpi4 with acceptable realtime performance

This commit is contained in:
vaughn committed 2026-09-25 17:29:14 -04:00
1 parent 2bce6fa556
commit 3faf544f0b
120 files changed
+6317 -1

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
default=boot graphics console
timeout=5
menuentry 'boot graphics console'{
linux /@KERNEL_IMAGETYPE@ LABEL=initrd-install @APPEND@
initrd /wrlinux-image-installer-initramfs-@MACHINE@.rootfs.@INITRAMFS_FSTYPES@
}
menuentry 'boot serial console'{
linux /@KERNEL_IMAGETYPE@ LABEL=initrd-install console=ttyS0,115200 @APPEND@
initrd /wrlinux-image-installer-initramfs-@MACHINE@.rootfs.@INITRAMFS_FSTYPES@
}
@@ -0,0 +1,26 @@
diff --git a/tuned.spec b/tuned.spec
index 0b7dc03..6213976 100644
--- a/tuned.spec
+++ b/tuned.spec
@@ -397,7 +397,7 @@ if [ "$1" == 0 ]; then
# cleanup for Boot loader specification (BLS)
# clear grubenv variables
- grub2-editenv - unset tuned_params tuned_initrd &>/dev/null || :
+ grub2-editenv /boot/EFI/BOOT/grubenv unset tuned_params tuned_initrd &>/dev/null || :
# unpatch BLS entries
MACHINE_ID=`cat /etc/machine-id 2>/dev/null`
if [ "$MACHINE_ID" ]
diff --git a/tuned/plugins/plugin_bootloader.py b/tuned/plugins/plugin_bootloader.py
index 2711e11..c327384 100644
--- a/tuned/plugins/plugin_bootloader.py
+++ b/tuned/plugins/plugin_bootloader.py
@@ -481,7 +481,7 @@ class BootloaderPlugin(base.Plugin):
def _update_grubenv(self, d):
log.debug("updating grubenv, setting %s" % str(d))
l = ["%s=%s" % (str(option), str(value)) for option, value in d.items()]
- (rc, out) = self._cmd.execute(["grub2-editenv", "-", "set"] + l)
+ (rc, out) = self._cmd.execute(["grub2-editenv", "/boot/EFI/BOOT/grubenv", "set"] + l)
if rc != 0:
log.warning("cannot update grubenv: '%s'" % out)
return False
@@ -0,0 +1,27 @@
Upstream-Status: Inappropriate [oe specific]
diff --git a/tuned.spec b/tuned.spec
index 0b7dc03..6213976 100644
--- a/tuned.spec
+++ b/tuned.spec
@@ -397,7 +397,7 @@ if [ "$1" == 0 ]; then
# cleanup for Boot loader specification (BLS)
# clear grubenv variables
- grub2-editenv - unset tuned_params tuned_initrd &>/dev/null || :
+ grub2-editenv "/boot/EFI/BOOT/grubenv" unset tuned_params tuned_initrd &>/dev/null || :
# unpatch BLS entries
MACHINE_ID=`cat /etc/machine-id 2>/dev/null`
if [ "$MACHINE_ID" ]
diff --git a/tuned/plugins/plugin_bootloader.py b/tuned/plugins/plugin_bootloader.py
index 2711e11..c327384 100644
--- a/tuned/plugins/plugin_bootloader.py
+++ b/tuned/plugins/plugin_bootloader.py
@@ -481,7 +481,7 @@ class BootloaderPlugin(base.Plugin):
def _update_grubenv(self, d):
log.debug("updating grubenv, setting %s" % str(d))
l = ["%s=%s" % (str(option), str(value)) for option, value in d.items()]
- (rc, out) = self._cmd.execute(["grub2-editenv", "-", "set"] + l)
+ (rc, out) = self._cmd.execute(["grub2-editenv", "/boot/EFI/BOOT/grubenv", "set"] + l)
if rc != 0:
log.warning("cannot update grubenv: '%s'" % out)
return False
+49
View File
@@ -0,0 +1,49 @@
diff --git a/tuned.spec b/tuned.spec
index 0b7dc03..6213976 100644
--- a/tuned.spec
+++ b/tuned.spec
@@ -397,7 +397,7 @@ if [ "$1" == 0 ]; then
# cleanup for Boot loader specification (BLS)
# clear grubenv variables
- grub2-editenv - unset tuned_params tuned_initrd &>/dev/null || :
+ grub2-editenv /boot/EFI/BOOT/grubenv unset tuned_params tuned_initrd &>/dev/null || :
# unpatch BLS entries
MACHINE_ID=`cat /etc/machine-id 2>/dev/null`
if [ "$MACHINE_ID" ]
diff --git a/tuned/plugins/plugin_bootloader.py b/tuned/plugins/plugin_bootloader.py
index 2711e11..451a642 100644
--- a/tuned/plugins/plugin_bootloader.py
+++ b/tuned/plugins/plugin_bootloader.py
@@ -361,9 +361,13 @@ class BootloaderPlugin(base.Plugin):
log.debug("initial patching of grub.cfg")
s = r"\1\n\n" + consts.GRUB2_TEMPLATE_HEADER_BEGIN + "\n"
for opt in d:
+ log.debug("opt: " + opt)
s += r"set " + self._cmd.escape(opt) + "=\"" + self._cmd.escape(d[opt]) + "\"\n"
s += consts.GRUB2_TEMPLATE_HEADER_END + r"\n"
+ log.debug("\n\ns = \n" + s)
+ log.debug("\n\n#1 grub_cfg = \n" + grub_cfg)
grub2_cfg = re.sub(r"^(\s*###\s+END\s+[^#]+/00_header\s+### *)\n", s, grub2_cfg, flags = re.MULTILINE)
+ log.debug("\n\n#2 grub_cfg = \n" + grub_cfg)
d2 = {"linux" : consts.GRUB2_TUNED_VAR, "initrd" : consts.GRUB2_TUNED_INITRD_VAR}
for i in d2:
@@ -373,6 +377,8 @@ class BootloaderPlugin(base.Plugin):
grub2_cfg = re.sub(r"^(\s*" + i + r"(?:16|efi)?\s+\S+rescue.*)\$" + d2[i] + r" *(.*)$", r"\1\2", grub2_cfg, flags = re.MULTILINE)
# fix whitespaces in rescue kernels
grub2_cfg = re.sub(r"^(\s*" + i + r"(?:16|efi)?\s+\S+rescue.*) +$", r"\1", grub2_cfg, flags = re.MULTILINE)
+
+ log.debug("\n\n#3 grub_cfg = \n" + grub_cfg)
return grub2_cfg
def _grub2_default_env_patch(self):
@@ -481,7 +487,7 @@ class BootloaderPlugin(base.Plugin):
def _update_grubenv(self, d):
log.debug("updating grubenv, setting %s" % str(d))
l = ["%s=%s" % (str(option), str(value)) for option, value in d.items()]
- (rc, out) = self._cmd.execute(["grub2-editenv", "-", "set"] + l)
+ (rc, out) = self._cmd.execute(["grub2-editenv", "/boot/EFI/BOOT/grubenv", "set"] + l)
if rc != 0:
log.warning("cannot update grubenv: '%s'" % out)
return False