Skip to content

Commit e9e1bb3

Browse files
committed
Maybe this builds? I mean it does manually, but the patching inline is tricky
1 parent e570bb7 commit e9e1bb3

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

build.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
set -euo pipefail
55

66
function install_dependencies {
7-
apt update
8-
apt install -y bc flex bison gcc make libelf-dev libssl-dev squashfs-tools busybox-static tree cpio curl patch
7+
if command -v apt >/dev/null 2>&1; then
8+
apt update
9+
apt install -y bc flex bison gcc make libelf-dev libssl-dev squashfs-tools busybox-static tree cpio curl patch
10+
else
11+
echo "apt not available; skipping dependency installation"
12+
fi
913
}
1014

1115
# From above mentioned script
@@ -49,16 +53,20 @@ function build_version {
4953
+
5054
+ pr_info("fpu: copy_uabi_to_xstate hdr.xfeatures=%#llx hdr.xcomp_bv=%#llx fpstate->header=%#llx xcr0=%#llx\n",
5155
+ hdr.xfeatures, hdr.xcomp_bv, fpstate->regs.xsave.header.xfeatures,
52-
+ this_cpu_read(x86_xcr0));
56+
+ xgetbv(XCR_XFEATURE_ENABLED_MASK));
5357
*** arch/x86/kernel/fpu/core.c
5458
@@
59+
-#include <asm/irq_regs.h>
60+
+#include <asm/irq_regs.h>
61+
+#include <asm/fpu/xcr.h>
62+
@@
5563
-void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask)
5664
-{
5765
+void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask)
5866
+{
5967
+ pr_info("fpu: restore_fpregs_from_fpstate mask=%#llx fpstate->header=%#llx xcr0=%#llx\n",
6068
+ mask, fpstate->regs.xsave.header.xfeatures,
61-
+ this_cpu_read(x86_xcr0));
69+
+ xgetbv(XCR_XFEATURE_ENABLED_MASK));
6270
***
6371
EOF
6472

0 commit comments

Comments
 (0)