Skip to contentSkip to conversation

uxen: update guest tools to 4.1.8

PATCH In review Martin Jansa 2 participants 14 messages Dec 1, 2021 – Dec 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/13 uxen: update guest tools to 4.1.8

From: Bruce Ashfield <[email protected]>

---
 ...xen-guest-tools_4.1.7.bb => uxen-guest-tools_4.1.8.bb} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename recipes-extended/uxen/{uxen-guest-tools_4.1.7.bb => uxen-guest-tools_4.1.8.bb} (63%)
recipes-extended/uxen/uxen-guest-tools_4.1.8.bb renamed from recipes-extended/uxen/uxen-guest-tools_4.1.7.bb +4 -4
similarity index 63%
rename from recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
rename to recipes-extended/uxen/uxen-guest-tools_4.1.8.bb
index 4dcfe51..2ca0cb1 100644
@@ -6,17 +6,17 @@ LICENSE = "GPLv2"
 COMPATIBLE_HOST = '(x86_64.*).*-linux'
 
 SRC_URI = " \
-    https://www.bromium.com/wp-content/uploads/2019/06/uxen-vmsupport-linux-${PV}.zip;name=uxen \
+    https://www.bromium.com/wp-content/uploads/2019/11/uxen-${PV}.zip;name=uxen \
     https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
     file://fix-Makefile-for-OE-kernel-build.patch \
     "
 
-SRC_URI[uxen.sha384sum] = "d9d7a1fa5c44ac77eea3d8d4756f9e07fc02acfe12606325ff0bb8a60c07abc3e9ddb80c2039797fb2122d750219722f"
+SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4"
 SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
 
 # The software license is GPLv2: please see page 199 of the pdf document
-LIC_FILES_CHKSUM = "file://../Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
 
-S = "${WORKDIR}/uxen-vmsupport-linux-${PV}"
+S = "${WORKDIR}/uxen-${PV}-72a4af9/vm-support/linux"
 
 inherit module dos2unix
Signature · 1 line
2.32.0
#2 lore raw

PATCH 3/13 uxen-guest-tools: fix build against kernels 5.15+

This is a compile only fix to update the uxen kernel modules to work against newer kernels.

---
 ...-support-fix-build-for-kernel-s-5.15.patch | 46 +++++++++++++++++++
 ...-support-fix-build-for-kernel-s-5.14.patch | 32 +++++++++++++
 .../uxen/uxen-guest-tools_4.1.8.bb            |  4 +-
 3 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 recipes-extended/uxen/uxen-guest-tools/0002-vm-support-fix-build-for-kernel-s-5.15.patch
 create mode 100644 recipes-extended/uxen/uxen-guest-tools/0003-vm-support-fix-build-for-kernel-s-5.14.patch
recipes-extended/uxen/uxen-guest-tools/0002-vm-support-fix-build-for-kernel-s-5.15.patch new file +46 -0
new file mode 100644
index 0000000..6b7f1f8
@@ -0,0 +1,46 @@
+From f8a33a209498b32b0fc06d80baa071f0902b9a85 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Tue, 30 Nov 2021 06:45:34 -0800
+Subject: [PATCH] vm-support: fix build for kernel's > 5.15
+
+* remove callback was changed to return void instead of int in:
+  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc7a6209d5710618eb4f72a77cd81b8d694ecf89
+
+Signed-off-by: Martin Jansa <[email protected]>
+---
+ uxenplatform/platform.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/uxenplatform/platform.c b/uxenplatform/platform.c
+index 99fc76a..5225a00 100644
+--- a/uxenplatform/platform.c
++++ b/uxenplatform/platform.c
+@@ -4,6 +4,7 @@
+ #include <linux/random.h>
+ #include <linux/kthread.h>
+ #include <linux/delay.h>
++#include <linux/version.h>
+ 
+ #include <uxen-hypercall.h>
+ #include <uxen-platform.h>
+@@ -32,14 +33,20 @@ static int bus_probe(struct device *_dev)
+     return drv && drv->probe ? drv->probe(dev) : -ENODEV;
+ }
+ 
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0))
+ static int bus_remove(struct device *_dev)
++#else
++static void bus_remove(struct device *_dev)
++#endif
+ {
+     struct uxen_device *dev = dev_to_uxen(_dev);
+     struct uxen_driver *drv = drv_to_uxen(_dev->driver);
+ 
+     if (dev && drv && drv->remove)
+        drv->remove(dev);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0))
+     return 0;
++#endif
+ }
+ 
+ static int bus_suspend(struct device *_dev, pm_message_t state)
recipes-extended/uxen/uxen-guest-tools/0003-vm-support-fix-build-for-kernel-s-5.14.patch new file +32 -0
new file mode 100644
index 0000000..ec31eea
@@ -0,0 +1,32 @@
+From 59986e91d807591f05dfbd57b459ba71670874f9 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Tue, 30 Nov 2021 15:04:31 +0000
+Subject: [PATCH] vm-support: fix build for kernel's > 5.14
+
+* remove set_driver_byte call
+* not sure if it's still necessary here, but set_driver_byte as well as DRIVER_SENSE was killed in 5.14 with:
+  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=464a00c9e0ad45e3f42ff6ea705491a356df818e
+
+  in some cases it was replaced with set_status_byte(sc, SAM_STAT_CHECK_CONDITION), but I didn't
+  read the implementation carefully enough to decide if this is still needed, I was only interested
+  in fixing the build failure (and I don't use this at all to test it in runtime)
+
+Signed-off-by: Martin Jansa <[email protected]>
+---
+ uxenstor/stor.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/uxenstor/stor.c b/uxenstor/stor.c
+index e07b08e..6bf2184 100644
+--- a/uxenstor/stor.c
++++ b/uxenstor/stor.c
+@@ -109,7 +109,9 @@ static void uxenstor_softirq(unsigned long opaque)
+                                          sc->sense_buffer,
+                                          sizeof(hdr) + hdr.sense_size,
+                                          0, sizeof(hdr));
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0))
+                 set_driver_byte(sc, DRIVER_SENSE);
++#endif
+             }
+ 
+             set_host_byte(sc, DID_ERROR);
recipes-extended/uxen/uxen-guest-tools_4.1.8.bb +3 -1
index 06dc376..841c71a 100644
@@ -10,7 +10,9 @@ SRC_URI = " \
     https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
     file://fix-Makefile-for-OE-kernel-build.patch \
     file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \
-    "
+    file://0002-vm-support-fix-build-for-kernel-s-5.15.patch \
+    file://0003-vm-support-fix-build-for-kernel-s-5.14.patch \
+"
 
 SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4"
 SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
Signature · 1 line
2.32.0
#3 lore raw

PATCH 4/13 uxen-guest-tools: fix -DMODULE not working when building uxenhc module

In reply to Martin Jansa

* undo the unnecessary and incomplete changes from 0001-vm-support-fix-build-for-kernel-s-5.4.patch because with 5.15 it was still failing with:
ERROR: modpost: missing MODULE_LICENSE() in uxen-guest-tools/4.1.8-r0/uxen-4.1.8-72a4af9/vm-support/linux/uxenhc/uxenhc.o

fix it properly in 0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch

---
 ...m-support-fix-build-for-kernel-s-5.4.patch | 13 -----
 ...LE-not-working-on-module-build-comma.patch | 56 +++++++++++++++++++
 .../uxen/uxen-guest-tools_4.1.8.bb            |  1 +
 3 files changed, 57 insertions(+), 13 deletions(-)
 create mode 100644 recipes-extended/uxen/uxen-guest-tools/0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch
recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch +0 -13
index a3325ce..287170c 100644
@@ -34,19 +34,6 @@ index 0b9ef3f..04957a8 100644
          if (!uxen_hcbase) {
              ret = -ENOMEM;
              goto out;
-@@ -149,8 +154,11 @@ static void __exit uxen_hypercall_exit(void)
- {
- }
- 
-+
-+#define KBUILD_MODFILE "uxenhc"
-+
- module_init(uxen_hypercall_init);
- module_exit(uxen_hypercall_exit);
-+MODULE_LICENSE("GPL");
- MODULE_AUTHOR("[email protected]");
- MODULE_DESCRIPTION("uXen hypercall support");
--MODULE_LICENSE("GPL");
 diff --git a/v4vvsock/v4v_vsock.c b/v4vvsock/v4v_vsock.c
 index 8d80d7d..cd7e8ce 100644
 --- a/v4vvsock/v4v_vsock.c
recipes-extended/uxen/uxen-guest-tools/0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch new file +56 -0

56 lines not on this page · raw message

recipes-extended/uxen/uxen-guest-tools_4.1.8.bb +1 -0
index 841c71a..529efdb 100644
@@ -12,6 +12,7 @@ SRC_URI = " \
     file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \
     file://0002-vm-support-fix-build-for-kernel-s-5.15.patch \
     file://0003-vm-support-fix-build-for-kernel-s-5.14.patch \
+    file://0004-uxenhc-fix-DMODULE-not-working-on-module-build-comma.patch \
 "
 
 SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4"
Signature · 1 line
2.32.0
#1 lore raw

PATCH 2/13 uxen-guest-tools: fix build against kernels 5.4+

In reply to Martin Jansa

From: Bruce Ashfield <[email protected]>

This is a compile only fix to update the uxen kernel modules to work against newer kernels.

---
 ...m-support-fix-build-for-kernel-s-5.4.patch | 97 +++++++++++++++++++
 .../uxen/uxen-guest-tools_4.1.8.bb            |  1 +
 2 files changed, 98 insertions(+)
 create mode 100644 recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch
recipes-extended/uxen/uxen-guest-tools/0001-vm-support-fix-build-for-kernel-s-5.4.patch new file +97 -0
new file mode 100644
index 0000000..a3325ce
@@ -0,0 +1,97 @@
+From 21bb6953a64390dd1c5a8b7520eb5e2c18ea3ff1 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Mon, 29 Nov 2021 21:01:03 -0500
+Subject: [PATCH] vm-support: fix build for kernel's > 5.4
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ a/uxenhc/hypercall.c             | 10 +++++++++-
+ a/v4vvsock/v4v_vsock.c           |  2 ++
+ a/vmdiagnostics/vm_diagnostics.c |  9 ++++++++-
+ 3 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/uxenhc/hypercall.c b/uxenhc/hypercall.c
+index 0b9ef3f..04957a8 100644
+--- a/uxenhc/hypercall.c
++++ b/uxenhc/hypercall.c
+@@ -10,6 +10,7 @@
+ #include <linux/mm.h>
+ #include <linux/spinlock.h>
+ #include <linux/compiler.h>
++#include <linux/version.h>
+ 
+ #include <xen/xen.h>
+ #include <xen/version.h>
+@@ -124,7 +125,11 @@ static int __init uxen_hypercall_init(void)
+     printk(KERN_INFO "using uxen hypervisor\n");
+ 
+     if (!uxen_hcbase) {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0))
+         uxen_hcbase =  __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC);
++#else
++	uxen_hcbase =  __vmalloc(PAGE_SIZE, GFP_KERNEL);
++#endif
+         if (!uxen_hcbase) {
+             ret = -ENOMEM;
+             goto out;
+@@ -149,8 +154,11 @@ static void __exit uxen_hypercall_exit(void)
+ {
+ }
+ 
++
++#define KBUILD_MODFILE "uxenhc"
++
+ module_init(uxen_hypercall_init);
+ module_exit(uxen_hypercall_exit);
++MODULE_LICENSE("GPL");
+ MODULE_AUTHOR("[email protected]");
+ MODULE_DESCRIPTION("uXen hypercall support");
+-MODULE_LICENSE("GPL");
+diff --git a/v4vvsock/v4v_vsock.c b/v4vvsock/v4v_vsock.c
+index 8d80d7d..cd7e8ce 100644
+--- a/v4vvsock/v4v_vsock.c
++++ b/v4vvsock/v4v_vsock.c
+@@ -578,8 +578,10 @@ static const struct proto_ops vsock_dgram_ops = {
+     .ioctl = sock_no_ioctl,
+     .listen = sock_no_listen,
+     .shutdown = sock_no_shutdown,
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0))
+     .setsockopt = sock_no_setsockopt,
+     .getsockopt = sock_no_getsockopt,
++#endif
+     .sendmsg = vsock_sendmsg,
+     .recvmsg = vsock_recvmsg,
+     .mmap = sock_no_mmap,
+diff --git a/vmdiagnostics/vm_diagnostics.c b/vmdiagnostics/vm_diagnostics.c
+index 9ff94fb..db14e57 100644
+--- a/vmdiagnostics/vm_diagnostics.c
++++ b/vmdiagnostics/vm_diagnostics.c
+@@ -22,6 +22,7 @@
+ #include <linux/timekeeping.h>
+ #include <linux/types.h>
+ #include <linux/vmstat.h>
++#include <linux/version.h>
+ 
+ #include <uxen-v4vlib.h>
+ 
+@@ -403,10 +404,16 @@ static void vm_handle_request_stat_task(struct vm_diagnostics_context *context,
+  
+             task_payload.state = task_state_to_char(task);
+             task_payload.num_threads = get_nr_threads(task);
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0))
+             task_payload.start_time_nsec = task->real_start_time;
++#else
++            task_payload.start_time_nsec = task->start_boottime;
++#endif
++
+             task_payload.last_run_cpu_id = task_cpu(task);
+ 
+-            thread_group_cputime_adjusted(task, &user_nsec, &system_nsec);
++            //thread_group_cputime_adjusted(task, &user_nsec, &system_nsec);
+             task_payload.user_nsec = user_nsec;
+             task_payload.system_nsec = system_nsec;
+ 
+-- 
+2.19.1
+
recipes-extended/uxen/uxen-guest-tools_4.1.8.bb +1 -0
index 2ca0cb1..06dc376 100644
@@ -9,6 +9,7 @@ SRC_URI = " \
     https://www.bromium.com/wp-content/uploads/2019/11/uxen-${PV}.zip;name=uxen \
     https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
     file://fix-Makefile-for-OE-kernel-build.patch \
+    file://0001-vm-support-fix-build-for-kernel-s-5.4.patch \
     "
 
 SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4"
Signature · 1 line
2.32.0
#4 lore raw

PATCH 5/13 xvisor: uprev to latest master and fix python reference

In reply to Martin Jansa

From: Bruce Ashfield <[email protected]>

Bumping to the latest xvisor tip.

We drop one patch that is now part of the upstream, and we add another to remove /usr/bin/python from scripts called during build, since it breaks the build on hosts without /usr/bin/python.

---
 ...-Allow-Xvisor-to-compile-with-gcc-10.patch | 55 -------------------
 ...d-use-usr-bin-env-for-python-scripts.patch | 36 ++++++++++++
 recipes-extended/xvisor/xvisor_git.bb         |  6 +-
 3 files changed, 39 insertions(+), 58 deletions(-)
 delete mode 100644 recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch
 create mode 100644 recipes-extended/xvisor/files/0001-build-use-usr-bin-env-for-python-scripts.patch
recipes-extended/xvisor/files/0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch deleted +0 -55
deleted file mode 100644
index 221a314..0000000
@@ -1,55 +0,0 @@
-From 417184cc41cfd33ae7b4c11c8396e0f47f43e2ba Mon Sep 17 00:00:00 2001
-From: Jean-Christophe Dubois <[email protected]>
-Date: Fri, 8 May 2020 15:17:36 +0200
-Subject: [PATCH] EMULATORS: Allow Xvisor to compile with gcc 10.
-
-With gcc 10 because some header files do not declare some variable
-definition as extern, the variable get duplicated in all files
-using it.
-
-This patch allow xvisor to compile with the latest gcc.
-
-Signed-off-by: Jean-Christophe Dubois <[email protected]>
-Reviewed-by: Anup Patel <[email protected]>
----
- drivers/mmc/core/core.h    |  2 +-
- emulators/display/drawfn.h | 10 +++++-----
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
-index d75d135a..e2ca3141 100644
---- a/drivers/mmc/core/core.h
-+++ b/drivers/mmc/core/core.h
-@@ -64,7 +64,7 @@ int mmc_go_idle(struct mmc_host *host);
-  * Note: Must be called with host->lock held.
-  */
- extern struct vmm_bus sdio_bus_type;
--struct vmm_device_type sdio_func_type;
-+extern struct vmm_device_type sdio_func_type;
- 
- int __sdio_attach(struct mmc_host *host);
- 
-diff --git a/emulators/display/drawfn.h b/emulators/display/drawfn.h
-index f9163cff..385deaf6 100644
---- a/emulators/display/drawfn.h
-+++ b/emulators/display/drawfn.h
-@@ -69,14 +69,14 @@ typedef void (*drawfn)(struct vmm_surface *,
- 				 DRAWFN_ORDER_MAX * \
- 				 DRAWFN_FORMAT_MAX)
- 
--drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE];
-+extern drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE];
- 
--drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE];
-+extern drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE];
- 
--drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE];
-+extern drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE];
- 
--drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE];
-+extern drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE];
- 
--drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE];
-+extern drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE];
- 
- #endif
recipes-extended/xvisor/files/0001-build-use-usr-bin-env-for-python-scripts.patch new file +36 -0
new file mode 100644
index 0000000..dfbb00b
@@ -0,0 +1,36 @@
+From eb351ca63a86f53cfb18987284a1445d543dfe56 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Mon, 29 Nov 2021 17:20:00 -0500
+Subject: [PATCH] build: use /usr/bin/env for python scripts
+
+Without this, we break on hosts without /usr/bin/python
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ tools/scripts/d2c.py    | 2 +-
+ tools/scripts/memimg.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/scripts/d2c.py b/tools/scripts/d2c.py
+index b46a7bc4..0a6bce08 100755
+--- a/tools/scripts/d2c.py
++++ b/tools/scripts/d2c.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #/**
+ # Copyright (c) 2013 Anup Patel.
+ # All rights reserved.
+diff --git a/tools/scripts/memimg.py b/tools/scripts/memimg.py
+index 423c9c33..ba2f06cb 100755
+--- a/tools/scripts/memimg.py
++++ b/tools/scripts/memimg.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #/**
+ # Copyright (c) 2011 Anup Patel.
+ # All rights reserved.
+-- 
+2.19.1
+
recipes-extended/xvisor/xvisor_git.bb +3 -3
index 831c943..85ac163 100644
@@ -9,10 +9,10 @@ require xvisor-configs.inc
 inherit autotools-brokensep
 
 # This version support the RISC-V v0.5.0 Hypervisor extensions
-SRCREV = "b3dac5b1f61f23f21dc59b3880897cff78f3b618"
-SRC_URI = "git://github.com/avpatel/xvisor-next.git \
+SRCREV = "6b23764a1439f9d08b2ed2f363da522460d8a22b"
+SRC_URI = "git://github.com/avpatel/xvisor-next.git;branch=master;protocol=https \
     file://0001-TESTS-Don-t-specify-mabi-or-march-for-RISC-V.patch \
-    file://0001-EMULATORS-Allow-Xvisor-to-compile-with-gcc-10.patch \
+    file://0001-build-use-usr-bin-env-for-python-scripts.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.32.0
#5 lore raw

PATCH 6/13 xvisor: set PV

In reply to Martin Jansa

* use something more reasonable than default 'git' from filename
* there wasn't a new tag for a long time, so this is quite far from 0.3.0 as git describe shows:
v0.3.0-231-g6b23764a
but 0.3.0 is still the closest release I've found and matches PROJECT_VERSION in Makefile:
https://github.com/avpatel/xvisor-next/blob/6b23764a1439f9d08b2ed2f363da522460d8a22b/Makefile#L29

---
 recipes-extended/xvisor/xvisor_git.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-extended/xvisor/xvisor_git.bb +2 -0
index 85ac163..7510a8b 100644
@@ -8,6 +8,8 @@ require xvisor-configs.inc
 
 inherit autotools-brokensep
 
+PV = "0.3.0+git${SRCPV}"
+
 # This version support the RISC-V v0.5.0 Hypervisor extensions
 SRCREV = "6b23764a1439f9d08b2ed2f363da522460d8a22b"
 SRC_URI = "git://github.com/avpatel/xvisor-next.git;branch=master;protocol=https \
Signature · 1 line
2.32.0
#6 lore raw

PATCH 7/13 dev86: add dependency on gperf-native

In reply to Martin Jansa

* fails to build on hosts without gperf:
/bin/sh: gperf: command not found Makefile:27: recipe for target 'token2.h' failed

* normally this isn't triggered, because token[12].h
are included in git repo, but regenerating them fails:
tmp-glibc/work/x86_64-linux/dev86-native/0.16.21-r0/git/cpp$ touch token1.tok tmp-glibc/work/x86_64-linux/dev86-native/0.16.21-r0/git/cpp$ make bcc-cpp gperf -aptTc -N is_ctok -H hash1 token1.tok > tmp.h
/bin/sh: gperf: command not found
Makefile:23: recipe for target 'token1.h' failed
make: *** [token1.h] Error 127

* unfortunately this isn't enough, because new gperf 3.1 from oe-core isn't compatible, we need to upgrade to different dev86 fork which contains:
https://github.com/jbruchon/dev86/pull/19

---
 recipes-extended/dev86/dev86_0.16.21.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-extended/dev86/dev86_0.16.21.bb +2 -0
index cf64a9d..def7c5c 100644
@@ -9,6 +9,8 @@ SRC_URI = "git://github.com/lkundrak/${BPN}.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
+DEPENDS = "gperf-native"
+
 BBCLASSEXTEND = "native"
 EXTRA_OEMAKE = "VERSION=${PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"
 
Signature · 1 line
2.32.0
#7 lore raw

PATCH 8/13 dev86: switch to still maintained fork of dev86

In reply to Martin Jansa

* as mentioned in:
https://github.com/lkundrak/dev86/pull/17
the original lkundrak repo is no longer maintained

* pass only BASE_PV as VERSION in EXTRA_OEMAKE to prevent:

  | version.h:4:20: error: ‘gitAUTOINC’ undeclared (first use in this function)
  |  #define VER_PAT 21+gitAUTOINC+e254e0b196
  |                     ^

* there are many new commits, we need at least that fix for newer gperf

git log --oneline v0.16.21..jbruchon/master
e254e0b (jbruchon/master) Merge pull request #21 from tkchia/master
3473bde [libc] update _signal syscall semantics, per ABI change in ELKS at https://github.com/jbruchon/elks/pull/629
d74e90d Merge pull request #20 from tkchia/tkchia/update-syscalls
541a8d5 [libc] update syscall list & ino_t type, per ELKS tree
710e852 Merge pull request #16 from spacerace/master
b215454 Merge pull request #17 from mfld-fr/master
870635e Move EMU86 & MON86 to standalone projects
84e3d00 [mon86] Latest touch before moving
c2f288c [emu86] Latest touch before moving
f7449f3 libc tests for MSDOS target (far away from complete ;))
6cbd64d fixing problem in string.h introduced by myself -.-
39e04cd Merge branch 'master' of https://github.com/spacerace/dev86
b44e43d Added OpenBSD's timingsafe_bcmp() and timingsafe_memcmp()
857c30e Added BSD's strlcat() and strlcpy(), safe string copy/cat
0764e09 typo in string.h
2fb6a3a swab()
4e09d08 strupr()
2bd985f strset()
5a7bb33 strrev()
56be26a strnset()
c919b2d strlwr()
b63f295 h+Mf bzero() strnset() strset() strlwr() strupr() strrev() swab()
5985246 removed old implementation of strstr. if anyone needs this file => remains in git history 7b481c0 added bzero()
776929c Merge pull request #15 from spacerace/master
8206ed2 stdlib.h + Makefile changes for getenv() and system()
b995d1e getenv() implementation
60466fe system() implementation
12439ac note on __mkenv (related to getenv commits from me)
aae041a removed empty line on top of file
6d6d91f removed uneeded empty file (see sound.c)
ff7d37e formatting (tabs)
246418a formatting in one line fixed
4ff1f48 Merge pull request #14 from mfld-fr/emu86
1b8f8db Add data & suspicious opcode breakpoints
798c4a2 Merge pull request #13 from rdebath/jbruchon
2eb4d82 Add .travis.yml for running "make distribution" tests.
2ea54e1 Merge pull request #12 from mgorny/makez
f14f78e build: Always use $(MAKE) to spawn sub-make
dfb9b42 Merge pull request #11 from mfld-fr/emu86
6ae2b54 Make dev86 working "in tree"
224843f Merge pull request #10 from mfld-fr/emu86
e56a958 [emu86] Test against ELKS - Round 3
0099ec8 Merge pull request #9 from mfld-fr/emu86
32865c8 [emu86] Test against ELKS - Round 2
e1aa9bd Merge pull request #8 from mfld-fr/emu86
c7ebb2a [emu86] Optimize execution lookup
57019a7 [emu86] Complete decoding optimization
de516a5 [emu86] Fix mfld-fr#21 : opcode 90h (NOP)
40f7c99 [emu86] Optimize decoding < C0h
91d4c61 [emu86] Fix mfld-fr#16 : add pcat timing options
d519caf [emu86] Fix mfld-fr#14 : trace support
3a479e7 [emu86] Check vector before interrupt
7eec401 Optimize decoding < 80h
98334d3 Fix mfld-fr#8 and warning cleanup
0579c82 Merge pull request #7 from mfld-fr/master
49492b9 [emu86] Add option for tiny model
da6a960 [emu86] fix #19 : remove PT1 test
e3b465f [dis88] Move back from ELKS
f2ea895 Merge pull request #6 from mfld-fr/master
b0700f4 [mon86] First stage removal after second validated
6ef705d [mon86] Fix #18 : Complete host tool
1fa5a70 Fix #10 and #11 : Target specific code
22c7770 Merge branch 'bug86'
e25c996 [mon86] Tune host tool for read & write
47aadb5 [mon86] Fix #15 : Cleanup in host tool
ae7c628 [mon86] Makefile for host part + more testing
ae6c84a [mon86] New host tool + fix context parsing
c9205ac Add missing void types to libc/misc/qsort.c
7a4f074 unproto: fix macOS Sierra compilation error reported by scontini76
ac6d924 unproto: better CFLAGS
f86ad57 bcc: if EOF is hit before end of comment, report it as an error
fcdbcd7 limits.h: add PATH_MAX
7239fea include: Add a skeleton for inttypes.h
f3e88f9 Remove accidental ignoring of "include"
0ac417a Merge branch 'master' of https://github.com/jbruchon/dev86
74753fa Fix size_t declaration, add ssize_t declaration
4be53b7 Merge pull request #5 from mfld-fr/master
d5ecd9c [mon86] Second stage tested on real SBC
81b0ab2 [mon86] Second stage monitor completed
b55cbbc [mon86] Trace & break interrupt support
18a5ba8 Merge pull request #4 from mfld-fr/master
77f028b [mon86] First stage monitor completed
07689d4 Merge remote-tracking branch 'upstream/master'
e043007 Revert accidental bcc changes in commit 3c83dee
495b99a [emu86] Test against ELKS - Round 1
5508efa Merge pull request #3 from mfld-fr/master
8aa3313 [emu86] Testing against a real ROM - Round 1
d8ac93e [emu86] Fixed #7 : segment selection & override
5b521d6 [emu86] Test against a real POST - Round 2
3c83dee [emu86] Test against a real POST - Round 1
b45a3d2 [emu86] Command line options
345513c [emu86] Fixed #6 : simplified variable size
2d7d316 [emu86] Fixed #2 + FAR call & ret
8ac48bf Import MON86 standalone project needed by EMU86
1da15c0 Bug fixes after EMU86 testing
1dc5fd3 Merge pull request #2 from mfld-fr/master
24935c0 [emu86] Final touch before the weekend
9090120 [emu86] Fixed #5 : redirect serial I/O to PTS
96dfb1a [emu86] Added memory and stack dumps
4fbcead [emu86] Fixed #1 : move reg num out of val struct
205e47d Improved EMU86 for MON86 testing
377ed40 Merge branch 'master' into emu86
fd3cf7e Added partial ZF and CF flags support
c758426 Merge pull request #1 from mfld-fr/master
72ad336 Merge branch 'master' of git://github.com/jbruchon/dev86 into emu86
2d8398b More support of 8086 instruction set
b2eadba EMU86 second draft
9a8e116 EMU86 first draft
fb3b436 Revert "fix linker alignment for .bss segment"
bf19066 Merge https://github.com/anchorz/dev86-1
4e8476e Revert "copt: fix a minor glitch in copt/rules.86"
1bcc185 Merge remote-tracking branch 'upstream/master'
b0426b2 Force output of initial segment directive
a44b267 fix linker alignment for .bss segment
c0832c8 under CYGWIN bcc requires -o option to compile an .o file otherwise it ends up as .exe and cannot link 80d485b (origin/master, origin/HEAD) Add stdint.h header to recognize some C99 types
29dbfca libc/msdos: program name missing in argv[0]
b0e9b25 libc/msdos: __mkargv es register changed
4a350d3 ar: rename of temporary libary fails on some platforms
cf72284 copt: fix a minor glitch in copt/rules.86
ce888f6 Allow copt rules with empty outputs; fix minor glitch in copt/rules.86
4ed1997 bcc/dbprintf.c: ix implicit declaration warnings
9de6f00 Make a.out.h portable to 64 bit systems
7eae1c0 Change strstr() to Jody's two-way implementation
2f53e83 Add a .gitignore file
c21e14a initial version with minimal routines
fa9c32e Add stdint.h header to recognize some C99 types
6e8432b Minor style cleanups
b7a191c Add "make distclean" and make it really clean everything
dab04fb bootblocks: long -> int32_t for proper building on 64-bit hosts
0d9ee41 bootblocks requires as86_encap to build

---
 recipes-extended/dev86/{dev86_0.16.21.bb => dev86_git.bb} | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
 rename recipes-extended/dev86/{dev86_0.16.21.bb => dev86_git.bb} (79%)
recipes-extended/dev86/dev86_git.bb renamed from recipes-extended/dev86/dev86_0.16.21.bb +5 -3
similarity index 79%
rename from recipes-extended/dev86/dev86_0.16.21.bb
rename to recipes-extended/dev86/dev86_git.bb
index def7c5c..476bf38 100644
@@ -4,15 +4,17 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
 SECTION = "console/tools"
 
-SRCREV = "c6f36cbafa979710b809f117562773dbd6825918"
-SRC_URI = "git://github.com/lkundrak/${BPN}.git;protocol=https"
+BASE_PV="0.16.21"
+PV = "${BASE_PV}+git${SRCPV}"
+SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
+SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
 DEPENDS = "gperf-native"
 
 BBCLASSEXTEND = "native"
-EXTRA_OEMAKE = "VERSION=${PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"
+EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"
 
 do_compile() {
 	# ${S}/Makefile does respect LDFLAGS, but ${S}/cpp/Makefile doesn't when building bcc-cpp
Signature · 1 line
2.32.0
#8 lore raw

PATCH 9/13 dev86: depend on dev86-native for ifdefg

In reply to Martin Jansa
---
 ...espect-LDFLAGS-when-building-bcc-cpp.patch | 23 ++++++++++++
 ...efg-from-dev86-native-instead-of-tar.patch | 36 +++++++++++++++++++
 recipes-extended/dev86/dev86_git.bb           | 17 ++++++---
 3 files changed, 71 insertions(+), 5 deletions(-)
 create mode 100644 recipes-extended/dev86/dev86/0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch
 create mode 100644 recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch
recipes-extended/dev86/dev86/0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch new file +23 -0
new file mode 100644
index 0000000..fc7fdd5
@@ -0,0 +1,23 @@
+From 12f3a54801e15f3bdd5222ca1487f2fe36141c5d Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Fri, 14 May 2021 06:30:18 -0700
+Subject: [PATCH] cpp/Makefile: respect LDFLAGS when building bcc-cpp
+
+Signed-off-by: Martin Jansa <[email protected]>
+---
+ cpp/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cpp/Makefile b/cpp/Makefile
+index 0ea43cc..303b43c 100644
+--- a/cpp/Makefile
++++ b/cpp/Makefile
+@@ -3,7 +3,7 @@ CFLAGS=-Wall -Wstrict-prototypes
+ all: bcc-cpp
+ 
+ bcc-cpp: main.o cpp.o hash.o token1.o token2.o
+-	$(CC) $(CFLAGS) -o bcc-cpp main.o cpp.o hash.o token1.o token2.o
++	$(CC) $(CFLAGS) $(LDFLAGS) -o bcc-cpp main.o cpp.o hash.o token1.o token2.o
+ 
+ clean realclean:
+ 	rm -f bcc-cpp main.o cpp.o hash.o token1.o token2.o tmp.h
recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch new file +36 -0
new file mode 100644
index 0000000..52d5d59
@@ -0,0 +1,36 @@
+From 9b347a5ee9604d4ec972506328ee44a0d8eb1bf0 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Fri, 14 May 2021 06:32:02 -0700
+Subject: [PATCH] Makefile: use ifdefg from dev86-native instead of target
+
+* recipe is restricted to:
+  COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+  so it's less likely to reproduce invalid combination of
+  host and target, but I guess if you have aarch64 build
+  machine and build for x86 then it might fail as for Bruce:
+
+| ./ifdefg -MU  makefile.in >tmp.mak
+| /bin/sh: 1: ./ifdefg: not found
+| make[1]: *** [Makefile:46: make.fil] Error 127
+
+  use ifdefg from native build to increase chances that it
+  will be compatible with your host system
+
+Signed-off-by: Martin Jansa <[email protected]>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8a61b65..7fdf861 100644
+--- a/Makefile
++++ b/Makefile
+@@ -43,7 +43,7 @@ realclean:
+ 	-for X in */; do cd $$X && make clean; cd $(WD); done
+ 
+ make.fil: $(IFDEFNAME) makefile.in
+-	./$(IFDEFNAME) -MU $(IFDEFOPTS) makefile.in >tmp.mak
++	$(IFDEFNAME) -MU $(IFDEFOPTS) makefile.in >tmp.mak
+ 	echo > tmp.sed
+ 	[ "$(BINDIR)" != "//bin" ] || echo >> tmp.sed "s:%BINDIR%:/bin:"
+ 	[ "$(LIBDIR)" != "//lib/bcc" ] || echo >> tmp.sed "s:%LIBDIR%:/lib/bcc:"
recipes-extended/dev86/dev86_git.bb +12 -5
index 476bf38..c987342 100644
@@ -7,21 +7,23 @@ SECTION = "console/tools"
 BASE_PV="0.16.21"
 PV = "${BASE_PV}+git${SRCPV}"
 SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
-SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https"
+SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \
+    file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \
+"
+SRC_URI_append_class-target = " \
+    file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \
+"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "gperf-native"
+DEPENDS = "gperf-native dev86-native"
 
 BBCLASSEXTEND = "native"
 EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"
 
 do_compile() {
-	# ${S}/Makefile does respect LDFLAGS, but ${S}/cpp/Makefile doesn't when building bcc-cpp
-	sed -i 's#$(CC) $(CFLAGS) -o bcc-cpp#$(CC) $(CFLAGS) $(LDFLAGS) -o bcc-cpp#g' ${S}/cpp/Makefile
 	oe_runmake make.fil
 	oe_runmake -f make.fil bcc86 as86 ld86
-
 }
 
 do_install() {
@@ -33,8 +35,13 @@ do_install() {
 	oe_runmake install-bcc
 	ln -s ../lib/bcc/bcc-cpp ${D}${prefix}/bin/bcc-cpp
 	ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1
+}
 
+do_install_append_class-native() {
+        install -v -m 755 ${B}/ifdefg ${D}${bindir}
 }
+
 COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
 FILES_${PN} += "${libdir}/bcc"
+
 INSANE_SKIP_${PN} = "already-stripped"
Signature · 1 line
2.32.0
#9 lore raw

PATCH 10/13 dev86: fix compatibility with gperf-3.1

In reply to Martin Jansa
---
 ...1.tok-to-make-new-gperf-happy-regen..patch | 256 ++++++++++++
 ...gen-token2.h-token1.h-with-gperf-3.1.patch | 389 ++++++++++++++++++
 recipes-extended/dev86/dev86_git.bb           |   2 +
 3 files changed, 647 insertions(+)
 create mode 100644 recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch
 create mode 100644 recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch
recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch new file +256 -0
new file mode 100644
index 0000000..38e4d81
@@ -0,0 +1,256 @@
+From e908a3ad04bb40e425542b85fbb3a1eb5a38e194 Mon Sep 17 00:00:00 2001
+From: Tee-Kiah Chia <[email protected]>
+Date: Thu, 27 Feb 2020 00:52:05 +0800
+Subject: [PATCH] [cpp] update token1.tok to make new gperf happy; regen.
+ token1.h
+
+Signed-off-by: Martin Jansa <[email protected]>
+Upstream-Status: Pending [it was submitted in https://github.com/jbruchon/dev86/pull/19
+but then closed by author]
+
+---
+ cpp/token1.h   | 170 +++++++++++++++++++++++++++++++++----------------
+ cpp/token1.tok |   2 +-
+ 2 files changed, 115 insertions(+), 57 deletions(-)
+
+diff --git a/cpp/token1.h b/cpp/token1.h
+index 2e2b9eb..bb313aa 100644
+--- a/cpp/token1.h
++++ b/cpp/token1.h
+@@ -1,15 +1,48 @@
+-/* C code produced by gperf version 2.7.1 (19981006 egcs) */
++/* C code produced by gperf version 3.0.4 */
+ /* Command-line: gperf -aptTc -N is_ctok -H hash1 token1.tok  */
++/* Computed positions: -k'1-2' */
++
++#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
++      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
++      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
++      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
++      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
++      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
++      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
++      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
++      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
++      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
++      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
++      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
++      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
++      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
++      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
++      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
++      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
++      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
++      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
++      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
++      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
++      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
++      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
++/* The character set is not based on ISO-646.  */
++error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>."
++#endif
++
+ 
+ #define TOTAL_KEYWORDS 23
+ #define MIN_WORD_LENGTH 2
+ #define MAX_WORD_LENGTH 3
+ #define MIN_HASH_VALUE 2
+-#define MAX_HASH_VALUE 63
+-/* maximum key range = 62, duplicates = 0 */
++#define MAX_HASH_VALUE 62
++/* maximum key range = 61, duplicates = 0 */
+ 
+ #ifdef __GNUC__
+ __inline
++#else
++#ifdef __cplusplus
++inline
++#endif
+ #endif
+ static unsigned int
+ hash1 (str, len)
+@@ -18,38 +51,41 @@ hash1 (str, len)
+ {
+   static unsigned char asso_values[] =
+     {
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64,  1, 64, 64, 64,  3, 25, 64,
+-      64, 64, 13, 18, 64,  8, 30, 15, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-       5,  0, 20, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 30, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 23, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+-      64, 64, 64, 64, 64, 64
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63,  6, 63, 63, 63, 28,  8, 63,
++      63, 63, 23,  3, 63, 25, 20, 18, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      10,  5,  0, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 13, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 30, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
++      63, 63, 63, 63, 63, 63
+     };
+-  return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
++  return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
+ }
+ 
+ #ifdef __GNUC__
+ __inline
++#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
++__attribute__ ((__gnu_inline__))
++#endif
+ #endif
+ struct token_trans *
+ is_ctok (str, len)
+@@ -59,46 +95,68 @@ is_ctok (str, len)
+   static struct token_trans wordlist[] =
+     {
+       {""}, {""},
++#line 14 "token1.tok"
++      {">>",	TK_RIGHT_OP},
++#line 4 "token1.tok"
++      {">>=",	TK_RIGHT_ASSIGN},
++      {""}, {""}, {""},
++#line 22 "token1.tok"
++      {">=",	TK_GE_OP},
++#line 16 "token1.tok"
++      {"++",	TK_INC_OP},
++      {""},
++#line 6 "token1.tok"
++      {"+=",	TK_ADD_ASSIGN},
++      {""},
++#line 23 "token1.tok"
+       {"==",	TK_EQ_OP},
++#line 24 "token1.tok"
+       {"!=",	TK_NE_OP},
+       {""},
+-      {"%=",	TK_MOD_ASSIGN},
++#line 11 "token1.tok"
++      {"&=",	TK_AND_ASSIGN},
+       {""},
++#line 21 "token1.tok"
+       {"<=",	TK_LE_OP},
+-      {"<<=",	TK_LEFT_ASSIGN},
++#line 19 "token1.tok"
++      {"&&",	TK_AND_OP},
+       {""},
+-      {"-=",	TK_SUB_ASSIGN},
++#line 12 "token1.tok"
++      {"^=",	TK_XOR_ASSIGN},
+       {""},
++#line 15 "token1.tok"
+       {"<<",	TK_LEFT_OP},
+-      {""}, {""},
+-      {"*=",	TK_MUL_ASSIGN},
++#line 5 "token1.tok"
++      {"<<=",	TK_LEFT_ASSIGN},
+       {""},
++#line 9 "token1.tok"
+       {"/=",	TK_DIV_ASSIGN},
+-      {"--",	TK_DEC_OP},
+       {""},
+-      {"+=",	TK_ADD_ASSIGN},
+-      {""},
+-      {">=",	TK_GE_OP},
+-      {">>=",	TK_RIGHT_ASSIGN},
+-      {""},
+-      {"|=",	TK_OR_ASSIGN},
++#line 18 "token1.tok"
++      {"->",	TK_PTR_OP},
++      {""}, {""},
++#line 8 "token1.tok"
++      {"*=",	TK_MUL_ASSIGN},
+       {""},
+-      {"&=",	TK_AND_ASSIGN},
++#line 7 "token1.tok"
++      {"-=",	TK_SUB_ASSIGN},
+       {""}, {""},
+-      {"->",	TK_PTR_OP},
++#line 10 "token1.tok"
++      {"%=",	TK_MOD_ASSIGN},
+       {""},
+-      {"^=",	TK_XOR_ASSIGN},
+-      {""}, {""}, {""}, {""}, {""},
+-      {"++",	TK_INC_OP},
+-      {""}, {""}, {""},
+-      {">>",	TK_RIGHT_OP},
+-      {""}, {""}, {""}, {""}, {""},
+-      {"||",	TK_OR_OP},
+-      {""}, {""}, {""},
+-      {"&&",	TK_AND_OP},
+-      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
++#line 13 "token1.tok"
++      {"|=",	TK_OR_ASSIGN},
++      {""}, {""}, {""}, {""},
++#line 25 "token1.tok"
+       {"..",	TK_WORD},
+-      {"...",	TK_ELLIPSIS}
++#line 3 "token1.tok"
++      {"...",	TK_ELLIPSIS},
++      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
++#line 17 "token1.tok"
++      {"--",	TK_DEC_OP},
++      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
++#line 20 "token1.tok"
++      {"||",	TK_OR_OP}
+     };
+ 
+   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+@@ -109,7 +167,7 @@ is_ctok (str, len)
+         {
+           register const char *s = wordlist[key].name;
+ 
+-          if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
++          if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+             return &wordlist[key];
+         }
+     }
+diff --git a/cpp/token1.tok b/cpp/token1.tok
+index cd668ce..a98926f 100644
+--- a/cpp/token1.tok
++++ b/cpp/token1.tok
+@@ -7,7 +7,7 @@ struct token_trans { char * name; int token; };
+ -=,	TK_SUB_ASSIGN
+ *=,	TK_MUL_ASSIGN
+ /=,	TK_DIV_ASSIGN
+-%=,	TK_MOD_ASSIGN
++"%=",	TK_MOD_ASSIGN
+ &=,	TK_AND_ASSIGN
+ ^=,	TK_XOR_ASSIGN
+ |=,	TK_OR_ASSIGN
recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch new file +389 -0

389 lines not on this page · raw message

recipes-extended/dev86/dev86_git.bb +2 -0
index c987342..a5f40fa 100644
@@ -9,6 +9,8 @@ PV = "${BASE_PV}+git${SRCPV}"
 SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
 SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \
     file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \
+    file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \
+    file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \
 "
 SRC_URI_append_class-target = " \
     file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \
Signature · 1 line
2.32.0
#10 lore raw

PATCH 11/13 dev86: remove the pre-generated token[12].h and force gperf to generate them in do_compile

In reply to Martin Jansa
---
 ...1.tok-to-make-new-gperf-happy-regen..patch | 230 +-----------
 ...gen-token2.h-token1.h-with-gperf-3.1.patch | 332 +-----------------
 recipes-extended/dev86/dev86_git.bb           |   2 +
 3 files changed, 5 insertions(+), 559 deletions(-)
recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch +2 -228
index 38e4d81..47c283b 100644
@@ -8,239 +8,13 @@ Signed-off-by: Martin Jansa <[email protected]>
 Upstream-Status: Pending [it was submitted in https://github.com/jbruchon/dev86/pull/19
 but then closed by author]
 
+Remove regenerated token1.h as we'll force it to regenerate in do_compile.
+
 ---
  cpp/token1.h   | 170 +++++++++++++++++++++++++++++++++----------------
  cpp/token1.tok |   2 +-
  2 files changed, 115 insertions(+), 57 deletions(-)
 
-diff --git a/cpp/token1.h b/cpp/token1.h
-index 2e2b9eb..bb313aa 100644
---- a/cpp/token1.h
-+++ b/cpp/token1.h
-@@ -1,15 +1,48 @@
--/* C code produced by gperf version 2.7.1 (19981006 egcs) */
-+/* C code produced by gperf version 3.0.4 */
- /* Command-line: gperf -aptTc -N is_ctok -H hash1 token1.tok  */
-+/* Computed positions: -k'1-2' */
-+
-+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
-+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
-+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
-+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
-+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
-+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
-+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
-+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
-+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
-+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
-+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
-+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
-+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
-+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
-+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
-+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
-+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
-+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
-+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
-+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
-+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
-+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
-+/* The character set is not based on ISO-646.  */
-+error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>."
-+#endif
-+
- 
- #define TOTAL_KEYWORDS 23
- #define MIN_WORD_LENGTH 2
- #define MAX_WORD_LENGTH 3
- #define MIN_HASH_VALUE 2
--#define MAX_HASH_VALUE 63
--/* maximum key range = 62, duplicates = 0 */
-+#define MAX_HASH_VALUE 62
-+/* maximum key range = 61, duplicates = 0 */
- 
- #ifdef __GNUC__
- __inline
-+#else
-+#ifdef __cplusplus
-+inline
-+#endif
- #endif
- static unsigned int
- hash1 (str, len)
-@@ -18,38 +51,41 @@ hash1 (str, len)
- {
-   static unsigned char asso_values[] =
-     {
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64,  1, 64, 64, 64,  3, 25, 64,
--      64, 64, 13, 18, 64,  8, 30, 15, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--       5,  0, 20, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 30, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 23, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
--      64, 64, 64, 64, 64, 64
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63,  6, 63, 63, 63, 28,  8, 63,
-+      63, 63, 23,  3, 63, 25, 20, 18, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      10,  5,  0, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 13, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 30, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-+      63, 63, 63, 63, 63, 63
-     };
--  return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
-+  return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
- }
- 
- #ifdef __GNUC__
- __inline
-+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-+__attribute__ ((__gnu_inline__))
-+#endif
- #endif
- struct token_trans *
- is_ctok (str, len)
-@@ -59,46 +95,68 @@ is_ctok (str, len)
-   static struct token_trans wordlist[] =
-     {
-       {""}, {""},
-+#line 14 "token1.tok"
-+      {">>",	TK_RIGHT_OP},
-+#line 4 "token1.tok"
-+      {">>=",	TK_RIGHT_ASSIGN},
-+      {""}, {""}, {""},
-+#line 22 "token1.tok"
-+      {">=",	TK_GE_OP},
-+#line 16 "token1.tok"
-+      {"++",	TK_INC_OP},
-+      {""},
-+#line 6 "token1.tok"
-+      {"+=",	TK_ADD_ASSIGN},
-+      {""},
-+#line 23 "token1.tok"
-       {"==",	TK_EQ_OP},
-+#line 24 "token1.tok"
-       {"!=",	TK_NE_OP},
-       {""},
--      {"%=",	TK_MOD_ASSIGN},
-+#line 11 "token1.tok"
-+      {"&=",	TK_AND_ASSIGN},
-       {""},
-+#line 21 "token1.tok"
-       {"<=",	TK_LE_OP},
--      {"<<=",	TK_LEFT_ASSIGN},
-+#line 19 "token1.tok"
-+      {"&&",	TK_AND_OP},
-       {""},
--      {"-=",	TK_SUB_ASSIGN},
-+#line 12 "token1.tok"
-+      {"^=",	TK_XOR_ASSIGN},
-       {""},
-+#line 15 "token1.tok"
-       {"<<",	TK_LEFT_OP},
--      {""}, {""},
--      {"*=",	TK_MUL_ASSIGN},
-+#line 5 "token1.tok"
-+      {"<<=",	TK_LEFT_ASSIGN},
-       {""},
-+#line 9 "token1.tok"
-       {"/=",	TK_DIV_ASSIGN},
--      {"--",	TK_DEC_OP},
-       {""},
--      {"+=",	TK_ADD_ASSIGN},
--      {""},
--      {">=",	TK_GE_OP},
--      {">>=",	TK_RIGHT_ASSIGN},
--      {""},
--      {"|=",	TK_OR_ASSIGN},
-+#line 18 "token1.tok"
-+      {"->",	TK_PTR_OP},
-+      {""}, {""},
-+#line 8 "token1.tok"
-+      {"*=",	TK_MUL_ASSIGN},
-       {""},
--      {"&=",	TK_AND_ASSIGN},
-+#line 7 "token1.tok"
-+      {"-=",	TK_SUB_ASSIGN},
-       {""}, {""},
--      {"->",	TK_PTR_OP},
-+#line 10 "token1.tok"
-+      {"%=",	TK_MOD_ASSIGN},
-       {""},
--      {"^=",	TK_XOR_ASSIGN},
--      {""}, {""}, {""}, {""}, {""},
--      {"++",	TK_INC_OP},
--      {""}, {""}, {""},
--      {">>",	TK_RIGHT_OP},
--      {""}, {""}, {""}, {""}, {""},
--      {"||",	TK_OR_OP},
--      {""}, {""}, {""},
--      {"&&",	TK_AND_OP},
--      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
-+#line 13 "token1.tok"
-+      {"|=",	TK_OR_ASSIGN},
-+      {""}, {""}, {""}, {""},
-+#line 25 "token1.tok"
-       {"..",	TK_WORD},
--      {"...",	TK_ELLIPSIS}
-+#line 3 "token1.tok"
-+      {"...",	TK_ELLIPSIS},
-+      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
-+#line 17 "token1.tok"
-+      {"--",	TK_DEC_OP},
-+      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
-+#line 20 "token1.tok"
-+      {"||",	TK_OR_OP}
-     };
- 
-   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
-@@ -109,7 +167,7 @@ is_ctok (str, len)
-         {
-           register const char *s = wordlist[key].name;
- 
--          if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
-+          if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
-             return &wordlist[key];
-         }
-     }
 diff --git a/cpp/token1.tok b/cpp/token1.tok
 index cd668ce..a98926f 100644
 --- a/cpp/token1.tok
recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch +1 -331

347 lines not on this page · raw message

recipes-extended/dev86/dev86_git.bb +2 -0
index a5f40fa..9488d90 100644
@@ -24,6 +24,8 @@ BBCLASSEXTEND = "native"
 EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"
 
 do_compile() {
+	# always regenerate token1.h, token2.h for deterministic behavior
+	rm -f ${S}/cpp/token1.h ${S}/cpp/token2.h
 	oe_runmake make.fil
 	oe_runmake -f make.fil bcc86 as86 ld86
 }
Signature · 1 line
2.32.0
#11 lore raw

PATCH 12/13 dev86: work on all hosts, other cleanups

In reply to Martin Jansa

From: Ross Burton <[email protected]>

Remove COMPATIBLE_HOST, whilst this is an x86 assembler there's nothing to stop you building it on or for arm64 and assembling x86 code.

Override INEXE so that binaries are not stripped and remove INSANE_SKIP.

---
 recipes-extended/dev86/dev86_git.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
recipes-extended/dev86/dev86_git.bb +1 -4
index 9488d90..ad7a0df 100644
@@ -21,7 +21,7 @@ S = "${WORKDIR}/git"
 DEPENDS = "gperf-native dev86-native"
 
 BBCLASSEXTEND = "native"
-EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}'"
+EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}' INEXE=''"
 
 do_compile() {
 	# always regenerate token1.h, token2.h for deterministic behavior
@@ -45,7 +45,4 @@ do_install_append_class-native() {
         install -v -m 755 ${B}/ifdefg ${D}${bindir}
 }
 
-COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
 FILES_${PN} += "${libdir}/bcc"
-
-INSANE_SKIP_${PN} = "already-stripped"
Signature · 1 line
2.32.0
#12 lore raw

PATCH 13/13 dev86: don't require dev86-native to build dev86

In reply to Martin Jansa

From: Ross Burton <[email protected]>

Instead of installing binaries and patching the makefiles to run external commands, simply build ifdef using BUILD_CC instead of CC.

This patch is now upstreamable, the recipe is less complicated, and nativesdk works.

---
 ...efg-from-dev86-native-instead-of-tar.patch | 36 -------------------
 recipes-extended/dev86/dev86/cross.patch      | 29 +++++++++++++++
 recipes-extended/dev86/dev86_git.bb           | 12 ++-----
 3 files changed, 32 insertions(+), 45 deletions(-)
 delete mode 100644 recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch
 create mode 100644 recipes-extended/dev86/dev86/cross.patch
recipes-extended/dev86/dev86/0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch deleted +0 -36
deleted file mode 100644
index 52d5d59..0000000
@@ -1,36 +0,0 @@
-From 9b347a5ee9604d4ec972506328ee44a0d8eb1bf0 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <[email protected]>
-Date: Fri, 14 May 2021 06:32:02 -0700
-Subject: [PATCH] Makefile: use ifdefg from dev86-native instead of target
-
-* recipe is restricted to:
-  COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
-  so it's less likely to reproduce invalid combination of
-  host and target, but I guess if you have aarch64 build
-  machine and build for x86 then it might fail as for Bruce:
-
-| ./ifdefg -MU  makefile.in >tmp.mak
-| /bin/sh: 1: ./ifdefg: not found
-| make[1]: *** [Makefile:46: make.fil] Error 127
-
-  use ifdefg from native build to increase chances that it
-  will be compatible with your host system
-
-Signed-off-by: Martin Jansa <[email protected]>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 8a61b65..7fdf861 100644
---- a/Makefile
-+++ b/Makefile
-@@ -43,7 +43,7 @@ realclean:
- 	-for X in */; do cd $$X && make clean; cd $(WD); done
- 
- make.fil: $(IFDEFNAME) makefile.in
--	./$(IFDEFNAME) -MU $(IFDEFOPTS) makefile.in >tmp.mak
-+	$(IFDEFNAME) -MU $(IFDEFOPTS) makefile.in >tmp.mak
- 	echo > tmp.sed
- 	[ "$(BINDIR)" != "//bin" ] || echo >> tmp.sed "s:%BINDIR%:/bin:"
- 	[ "$(LIBDIR)" != "//lib/bcc" ] || echo >> tmp.sed "s:%LIBDIR%:/lib/bcc:"
recipes-extended/dev86/dev86/cross.patch new file +29 -0
new file mode 100644
index 0000000..041a8d3
@@ -0,0 +1,29 @@
+Build ifdef using BUILD_CC, not CC.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/Makefile b/Makefile
+index 8a61b65..99f41de 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,6 +22,10 @@ CFLAGS=  -O
+ IFDEFNAME= ifdef
+ WD=$(shell pwd)
+ 
++BUILD_CC ?= $(CC)
++BUILD_CFLAGS ?= $(CFLAGS)
++BUILD_LDFLAGS ?= $(LDFLAGS)
++
+ # Some makes take the last of a list as the default ...
+ all: make.fil
+ 	PATH="`pwd`/bin:$$PATH" $(MAKE) -f make.fil VERSION=$(VERSION) TOPDIR=`pwd` $@
+@@ -65,7 +69,7 @@ make.fil: $(IFDEFNAME) makefile.in
+ 	@rm -f tmp.mak tmp.sed
+ 
+ $(IFDEFNAME): ifdef.c
+-	$(CC) $(IFDEFARCH) $(CFLAGS) $(IFDEFFLAGS) $(LDFLAGS) -o $(IFDEFNAME) ifdef.c
++	$(BUILD_CC) $(IFDEFARCH) $(BUILD_CFLAGS) $(IFDEFFLAGS) $(BUILD_LDFLAGS) -o $(IFDEFNAME) ifdef.c
+ 
+ uninstall:
+ 	@echo 'Sorry, no go; it was just wrong.'
recipes-extended/dev86/dev86_git.bb +3 -9
index ad7a0df..838918a 100644
@@ -11,16 +11,14 @@ SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \
     file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \
     file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \
     file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \
-"
-SRC_URI_append_class-target = " \
-    file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \
+	file://cross.patch \
 "
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "gperf-native dev86-native"
+DEPENDS = "gperf-native"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 EXTRA_OEMAKE = "VERSION=${BASE_PV} PREFIX=${prefix} DIST=${D} LDFLAGS='${LDFLAGS}' INEXE=''"
 
 do_compile() {
@@ -41,8 +39,4 @@ do_install() {
 	ln -s ../lib/bcc/bcc-cc1 ${D}${prefix}/bin/bcc-cc1
 }
 
-do_install_append_class-native() {
-        install -v -m 755 ${B}/ifdefg ${D}${bindir}
-}
-
 FILES_${PN} += "${libdir}/bcc"
Signature · 1 line
2.32.0
#13 lore raw
In reply to Martin Jansa

all 13 are merged to hardknott.

Bruce

In message: [meta-virtualization][hardknott][PATCH 01/13] uxen: update guest tools to 4.1.8

Quoted 40 lines · on 01/12/2021 Martin Jansa wrote:

From: Bruce Ashfield <[email protected]>

---
 ...xen-guest-tools_4.1.7.bb => uxen-guest-tools_4.1.8.bb} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename recipes-extended/uxen/{uxen-guest-tools_4.1.7.bb => uxen-guest-tools_4.1.8.bb} (63%)
recipes-extended/uxen/uxen-guest-tools_4.1.8.bb renamed from recipes-extended/uxen/uxen-guest-tools_4.1.7.bb +4 -4
similarity index 63%
rename from recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
rename to recipes-extended/uxen/uxen-guest-tools_4.1.8.bb
index 4dcfe51..2ca0cb1 100644
@@ -6,17 +6,17 @@ LICENSE = "GPLv2"
 COMPATIBLE_HOST = '(x86_64.*).*-linux'
 
 SRC_URI = " \
-    https://www.bromium.com/wp-content/uploads/2019/06/uxen-vmsupport-linux-${PV}.zip;name=uxen \
+    https://www.bromium.com/wp-content/uploads/2019/11/uxen-${PV}.zip;name=uxen \
     https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
     file://fix-Makefile-for-OE-kernel-build.patch \
     "
 
-SRC_URI[uxen.sha384sum] = "d9d7a1fa5c44ac77eea3d8d4756f9e07fc02acfe12606325ff0bb8a60c07abc3e9ddb80c2039797fb2122d750219722f"
+SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac71e6a3316fcaa2ed070c622618bd226f43a4d6db5d4"
 SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
 
 # The software license is GPLv2: please see page 199 of the pdf document
-LIC_FILES_CHKSUM = "file://../Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
 
-S = "${WORKDIR}/uxen-vmsupport-linux-${PV}"
+S = "${WORKDIR}/uxen-${PV}-72a4af9/vm-support/linux"
 
 inherit module dos2unix
Signature · 1 line
2.32.0