diff options
3 files changed, 57 insertions, 13 deletions
diff --git a/recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch b/recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch index a3325ce6..287170cb 100644 --- a/recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch +++ b/recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch | |||
| @@ -34,19 +34,6 @@ index 0b9ef3f..04957a8 100644 | |||
| 34 | if (!uxen_hcbase) { | 34 | if (!uxen_hcbase) { |
| 35 | ret = -ENOMEM; | 35 | ret = -ENOMEM; |
| 36 | goto out; | 36 | goto out; |
| 37 | @@ -149,8 +154,11 @@ static void __exit uxen_hypercall_exit(void) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | + | ||
| 42 | +#define KBUILD_MODFILE "uxenhc" | ||
| 43 | + | ||
| 44 | module_init(uxen_hypercall_init); | ||
| 45 | module_exit(uxen_hypercall_exit); | ||
| 46 | +MODULE_LICENSE("GPL"); | ||
| 47 | MODULE_AUTHOR("paulian.marinca@bromium.com"); | ||
| 48 | MODULE_DESCRIPTION("uXen hypercall support"); | ||
| 49 | -MODULE_LICENSE("GPL"); | ||
| 50 | diff --git a/v4vvsock/v4v_vsock.c b/v4vvsock/v4v_vsock.c | 37 | diff --git a/v4vvsock/v4v_vsock.c b/v4vvsock/v4v_vsock.c |
| 51 | index 8d80d7d..cd7e8ce 100644 | 38 | index 8d80d7d..cd7e8ce 100644 |
| 52 | --- a/v4vvsock/v4v_vsock.c | 39 | --- a/v4vvsock/v4v_vsock.c |
diff --git a/recipes-extended/uxen/uxen-guest-tools/0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch b/recipes-extended/uxen/uxen-guest-tools/0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch new file mode 100644 index 00000000..60018f0b --- /dev/null +++ b/recipes-extended/uxen/uxen-guest-tools/0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | From 732791cb353289e37448d84503a7d62ca156f29f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Tue, 30 Nov 2021 16:33:14 +0000 | ||
| 4 | Subject: [PATCH] uxenhc: fix -DMODULE not working on module build command line | ||
| 5 | |||
| 6 | * ATTOXEN_API_INC isn't defined anywhere in our OE builds, so the command line ends like this: | ||
| 7 | |||
| 8 | x86_64-oe-linux-gcc -fuse-ld=bfd -fmacro-prefix-map=/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0=/usr/src/debug/uxen-guest-tools/4.1.8-r0 -fdebug-prefix-map=/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0=/usr/src/debug/uxen-guest-tools/4.1.8-r0 -fdebug-prefix-map=/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/recipe-sysroot= -fdebug-prefix-map=/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/recipe-sysroot-native= -fdebug-prefix-map=/OE/work-shared/qemux86-64/kernel-source=/usr/src/kernel -Wp,-MMD,/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/uxenhc/.hypercall.o.d -I/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/include/ -I/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/include/uxen -I/OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/include/uxen/xen -I/OE/work-shared/qemux86-64/kernel-source/arch/x86/include -I./arch/x86/include/generated -I/OE/work-shared/qemux86-64/kernel-source/include -I./include -I/OE/work-shared/qemux86-64/kernel-source/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/OE/work-shared/qemux86-64/kernel-source/include/uapi -I./include/generated/uapi -include /OE/work-shared/qemux86-64/kernel-source/include/linux/compiler-version.h -include /OE/work-shared/qemux86-64/kernel-source/include/linux/kconfig.h -include /OE/work-shared/qemux86-64/kernel-source/include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=/OE/work-shared/qemux86-64/kernel-source/= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -DLX_TARGET_STANDARDVM -g -Wall -I -DMODULE -DKBUILD_BASENAME='"hypercall"' -DKBUILD_MODNAME='"uxenhc"' -D__KBUILD_MODNAME=kmod_uxenhc -c -o /OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/uxenhc/hypercall.o /OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/uxenhc/hypercall.c | ||
| 9 | |||
| 10 | the important part is "-I -DMODULE" which breaks include/linux/module.h behavior: | ||
| 11 | |||
| 12 | /* | ||
| 13 | * MODULE_FILE is used for generating modules.builtin | ||
| 14 | * So, make it no-op when this is being built as a module | ||
| 15 | */ | ||
| 16 | #ifdef MODULE | ||
| 17 | #define MODULE_FILE | ||
| 18 | #else | ||
| 19 | #define MODULE_FILE MODULE_INFO(file, KBUILD_MODFILE); | ||
| 20 | #endif | ||
| 21 | |||
| 22 | resulting in: | ||
| 23 | |||
| 24 | In file included from /OE/work-shared/qemux86-64/kernel-source/include/linux/module.h:22, | ||
| 25 | from /OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/uxenhc/hypercall.c:3: | ||
| 26 | /OE/work-shared/qemux86-64/kernel-source/include/linux/module.h:183:43: error: expected ',' or ';' before 'KBUILD_MODFILE' | ||
| 27 | 183 | #define MODULE_FILE MODULE_INFO(file, KBUILD_MODFILE); | ||
| 28 | | ^~~~~~~~~~~~~~ | ||
| 29 | /OE/work-shared/qemux86-64/kernel-source/include/linux/moduleparam.h:26:61: note: in definition of macro '__MODULE_INFO' | ||
| 30 | 26 | = __MODULE_INFO_PREFIX __stringify(tag) "=" info | ||
| 31 | | ^~~~ | ||
| 32 | /OE/work-shared/qemux86-64/kernel-source/include/linux/module.h:183:25: note: in expansion of macro 'MODULE_INFO' | ||
| 33 | 183 | #define MODULE_FILE MODULE_INFO(file, KBUILD_MODFILE); | ||
| 34 | | ^~~~~~~~~~~ | ||
| 35 | /OE/work-shared/qemux86-64/kernel-source/include/linux/module.h:230:34: note: in expansion of macro 'MODULE_FILE' | ||
| 36 | 230 | #define MODULE_LICENSE(_license) MODULE_FILE MODULE_INFO(license, _license) | ||
| 37 | | ^~~~~~~~~~~ | ||
| 38 | /OE/work/qemux86_64-oe-linux/uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/uxenhc/hypercall.c:161:1: note: in expansion of macro 'MODULE_LICENSE' | ||
| 39 | 161 | MODULE_LICENSE("GPL"); | ||
| 40 | | ^~~~~~~~~~~~~~ | ||
| 41 | |||
| 42 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 43 | --- | ||
| 44 | uxenhc/Kbuild | 1 - | ||
| 45 | 1 file changed, 1 deletion(-) | ||
| 46 | |||
| 47 | diff --git a/uxenhc/Kbuild b/uxenhc/Kbuild | ||
| 48 | index e418096..ef1b145 100644 | ||
| 49 | --- a/uxenhc/Kbuild | ||
| 50 | +++ b/uxenhc/Kbuild | ||
| 51 | @@ -1,4 +1,3 @@ | ||
| 52 | obj-m += uxenhc.o | ||
| 53 | |||
| 54 | uxenhc-y := hypercall.o | ||
| 55 | -CFLAGS_hypercall.o := -I$(ATTOXEN_API_INC) | ||
| 56 | \ No newline at end of file | ||
diff --git a/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb b/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb index 841c71a4..529efdbf 100644 --- a/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb +++ b/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI = " \ | |||
| 12 | file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \ | 12 | file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \ |
| 13 | file://0002-vm-support-fix-build-for-kernel-s-5.15.patch \ | 13 | file://0002-vm-support-fix-build-for-kernel-s-5.15.patch \ |
| 14 | file://0003-vm-support-fix-build-for-kernel-s-5.14.patch \ | 14 | file://0003-vm-support-fix-build-for-kernel-s-5.14.patch \ |
| 15 | file://0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4" | 18 | SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4" |
