summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-02-01 13:53:50 +0100
committerKhem Raj <raj.khem@gmail.com>2026-02-02 00:23:13 -0800
commit19fdc49db3a41b1380c387bf9b5dbbf631048a64 (patch)
tree637f945483451159d522f90fde66203e84732f86
parentad890c16e891277a1837c7184270d327b9010cf8 (diff)
downloadmeta-openembedded-19fdc49db3a41b1380c387bf9b5dbbf631048a64.tar.gz
libx86-1: upgrade 1.1 -> 1.1.1
Bugfix release, mostly with patches applied from other distros. Also fixes the SRC_URI which became inaccessible over time. Drop patches that are included in this release. Shortlog: https://gitlab.archlinux.org/grawlinson/libx86/-/compare/v1.1...v1.1.1 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/libx86-1/libx86-1.1.1/0001-Define-CARD32-as-uint-as-it-is-32-bit.patch (renamed from meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Define-CARD32-as-uint-as-it-is-32-bit.patch)0
-rw-r--r--meta-oe/recipes-extended/libx86-1/libx86-1.1.1/0001-assume-zero-is-valid-address.patch (renamed from meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-assume-zero-is-valid-address.patch)0
-rw-r--r--meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Fix-type-of-the-void-pointer-assignment.patch33
-rw-r--r--meta-oe/recipes-extended/libx86-1/libx86-1.1/libx86-mmap-offset.patch192
-rw-r--r--meta-oe/recipes-extended/libx86-1/libx86-1.1/makefile-add-ldflags.patch17
-rw-r--r--meta-oe/recipes-extended/libx86-1/libx86-1_1.1.1.bb (renamed from meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb)9
6 files changed, 4 insertions, 247 deletions
diff --git a/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Define-CARD32-as-uint-as-it-is-32-bit.patch b/meta-oe/recipes-extended/libx86-1/libx86-1.1.1/0001-Define-CARD32-as-uint-as-it-is-32-bit.patch
index aef521bc5d..aef521bc5d 100644
--- a/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Define-CARD32-as-uint-as-it-is-32-bit.patch
+++ b/meta-oe/recipes-extended/libx86-1/libx86-1.1.1/0001-Define-CARD32-as-uint-as-it-is-32-bit.patch
diff --git a/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-assume-zero-is-valid-address.patch b/meta-oe/recipes-extended/libx86-1/libx86-1.1.1/0001-assume-zero-is-valid-address.patch
index 7a46301deb..7a46301deb 100644
--- a/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-assume-zero-is-valid-address.patch
+++ b/meta-oe/recipes-extended/libx86-1/libx86-1.1.1/0001-assume-zero-is-valid-address.patch
diff --git a/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Fix-type-of-the-void-pointer-assignment.patch b/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Fix-type-of-the-void-pointer-assignment.patch
deleted file mode 100644
index ea3c306fd7..0000000000
--- a/meta-oe/recipes-extended/libx86-1/libx86-1.1/0001-Fix-type-of-the-void-pointer-assignment.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From c782e208021409e9b78acb2200abd4319072e78a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 2 Sep 2022 00:28:05 -0700
4Subject: [PATCH] Fix type of the void pointer assignment
5
6Fixes build with clang
7
8x86-common.c:216:9: error: incompatible integer to pointer conversion assigning to 'void *' from 'long' [-Wint-conversion]
9 offset = mem_info.offset - REAL_MEM_BASE;
10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 x86-common.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/x86-common.c b/x86-common.c
19index 137bc3c..6f737ed 100644
20--- a/x86-common.c
21+++ b/x86-common.c
22@@ -213,7 +213,7 @@ void *LRMI_common_init(int high_page)
23 if (!real_mem_init(high_page))
24 return NULL;
25
26- offset = mem_info.offset - REAL_MEM_BASE;
27+ offset = (void*)(mem_info.offset - REAL_MEM_BASE);
28
29 /*
30 Map the Interrupt Vectors (0x0 - 0x400) + BIOS data (0x400 - 0x502)
31--
322.37.3
33
diff --git a/meta-oe/recipes-extended/libx86-1/libx86-1.1/libx86-mmap-offset.patch b/meta-oe/recipes-extended/libx86-1/libx86-1.1/libx86-mmap-offset.patch
deleted file mode 100644
index 1c120c04b9..0000000000
--- a/meta-oe/recipes-extended/libx86-1/libx86-1.1/libx86-mmap-offset.patch
+++ /dev/null
@@ -1,192 +0,0 @@
1Upstream-Status: Pending
2
3Upstream-Statue: Pending
4[from ftp://195.220.108.108/linux/fedora/linux/development/rawhide/source/SRPMS/l/libx86-1.1-21.fc23.src.rpm]
5
6diff -ur libx86-1.1/lrmi.c libx86-1.1.hack/lrmi.c
7--- libx86-1.1/lrmi.c 2006-10-30 15:10:16.000000000 -0500
8+++ libx86-1.1.hack/lrmi.c 2009-10-26 15:55:42.000000000 -0400
9@@ -136,7 +136,7 @@
10 if (context.ready)
11 return 1;
12
13- if (!LRMI_common_init())
14+ if (!LRMI_common_init(0))
15 return 0;
16
17 /*
18diff -ur libx86-1.1/thunk.c libx86-1.1.hack/thunk.c
19--- libx86-1.1/thunk.c 2008-04-02 20:48:00.000000000 -0400
20+++ libx86-1.1.hack/thunk.c 2009-10-26 16:05:39.000000000 -0400
21@@ -139,11 +139,11 @@
22 int i;
23 X86EMU_intrFuncs intFuncs[256];
24
25- if (!LRMI_common_init())
26+ mmap_addr = LRMI_common_init(1);
27+
28+ if (!mmap_addr)
29 return 0;
30
31- mmap_addr = 0;
32-
33 X86EMU_pioFuncs pioFuncs = {
34 (&x_inb),
35 (&x_inw),
36@@ -169,10 +169,10 @@
37 X86_ESP = 0xFFF9;
38 memset (stack, 0, 64*1024);
39
40- *((char *)0) = 0x4f; /* Make sure that we end up jumping back to a
41- halt instruction */
42+ *mmap_addr = 0x4f; /* Make sure that we end up jumping back to a
43+ halt instruction */
44
45- M.mem_base = 0;
46+ M.mem_base = (unsigned long)mmap_addr;
47 M.mem_size = 1024*1024;
48
49 return 1;
50diff -ur libx86-1.1/x86-common.c libx86-1.1.hack/x86-common.c
51--- libx86-1.1/x86-common.c 2008-05-16 12:56:23.000000000 -0400
52+++ libx86-1.1.hack/x86-common.c 2009-10-26 16:03:21.000000000 -0400
53@@ -45,14 +45,15 @@
54 static struct {
55 int ready;
56 int count;
57+ void *offset;
58 struct mem_block blocks[REAL_MEM_BLOCKS];
59 } mem_info = { 0 };
60
61 static int
62-real_mem_init(void)
63+real_mem_init(int high_page)
64 {
65 void *m;
66- int fd_zero;
67+ int fd_zero, flags = MAP_SHARED;
68
69 if (mem_info.ready)
70 return 1;
71@@ -63,9 +64,12 @@
72 return 0;
73 }
74
75+ if (!high_page)
76+ flags |= MAP_FIXED;
77+
78 m = mmap((void *)REAL_MEM_BASE, REAL_MEM_SIZE,
79- PROT_READ | PROT_WRITE | PROT_EXEC,
80- MAP_FIXED | MAP_SHARED, fd_zero, 0);
81+ PROT_READ | PROT_WRITE | PROT_EXEC,
82+ flags, fd_zero, 0);
83
84 if (m == (void *)-1) {
85 perror("mmap /dev/zero");
86@@ -76,6 +80,7 @@
87 close(fd_zero);
88
89 mem_info.ready = 1;
90+ mem_info.offset = m;
91 mem_info.count = 1;
92 mem_info.blocks[0].size = REAL_MEM_SIZE;
93 mem_info.blocks[0].free = 1;
94@@ -87,7 +92,7 @@
95 real_mem_deinit(void)
96 {
97 if (mem_info.ready) {
98- munmap((void *)REAL_MEM_BASE, REAL_MEM_SIZE);
99+ munmap(mem_info.offset, REAL_MEM_SIZE);
100 mem_info.ready = 0;
101 }
102 }
103@@ -119,7 +124,7 @@
104 LRMI_alloc_real(int size)
105 {
106 int i;
107- char *r = (char *)REAL_MEM_BASE;
108+ char *r = (char *)mem_info.offset;
109
110 if (!mem_info.ready)
111 return NULL;
112@@ -151,7 +156,7 @@
113 LRMI_free_real(void *m)
114 {
115 int i;
116- char *r = (char *)REAL_MEM_BASE;
117+ char *r = (char *)mem_info.offset;
118
119 if (!mem_info.ready)
120 return;
121@@ -200,13 +205,15 @@
122 return *(unsigned short *)(i * 4);
123 }
124
125-int LRMI_common_init(void)
126+void *LRMI_common_init(int high_page)
127 {
128- void *m;
129+ void *m, *offset;
130 int fd_mem;
131
132- if (!real_mem_init())
133- return 0;
134+ if (!real_mem_init(high_page))
135+ return NULL;
136+
137+ offset = mem_info.offset - REAL_MEM_BASE;
138
139 /*
140 Map the Interrupt Vectors (0x0 - 0x400) + BIOS data (0x400 - 0x502)
141@@ -217,33 +224,33 @@
142 if (fd_mem == -1) {
143 real_mem_deinit();
144 perror("open /dev/mem");
145- return 0;
146+ return NULL;
147 }
148
149- m = mmap((void *)0, 0x502,
150- PROT_READ | PROT_WRITE | PROT_EXEC,
151- MAP_FIXED | MAP_SHARED, fd_mem, 0);
152+ m = mmap(offset, 0x502,
153+ PROT_READ | PROT_WRITE | PROT_EXEC,
154+ MAP_FIXED | MAP_SHARED, fd_mem, 0);
155
156 if (m == (void *)-1) {
157 close(fd_mem);
158 real_mem_deinit();
159 perror("mmap /dev/mem");
160- return 0;
161+ return NULL;
162 }
163
164- m = mmap((void *)0xa0000, 0x100000 - 0xa0000,
165+ m = mmap(offset+0xa0000, 0x100000 - 0xa0000,
166 PROT_READ | PROT_WRITE | PROT_EXEC,
167 MAP_FIXED | MAP_SHARED, fd_mem, 0xa0000);
168
169 if (m == (void *)-1) {
170- munmap((void *)0, 0x502);
171+ munmap(offset, 0x502);
172 close(fd_mem);
173 real_mem_deinit();
174 perror("mmap /dev/mem");
175- return 0;
176+ return NULL;
177 }
178
179 close(fd_mem);
180
181- return 1;
182+ return offset;
183 }
184diff -ur libx86-1.1/x86-common.h libx86-1.1.hack/x86-common.h
185--- libx86-1.1/x86-common.h 2006-09-07 18:44:27.000000000 -0400
186+++ libx86-1.1.hack/x86-common.h 2009-10-26 16:01:19.000000000 -0400
187@@ -40,4 +40,4 @@
188
189 void *LRMI_alloc_real(int size);
190 void LRMI_free_real(void *m);
191-int LRMI_common_init(void);
192+void *LRMI_common_init(int high_page);
diff --git a/meta-oe/recipes-extended/libx86-1/libx86-1.1/makefile-add-ldflags.patch b/meta-oe/recipes-extended/libx86-1/libx86-1.1/makefile-add-ldflags.patch
deleted file mode 100644
index 821ab379d5..0000000000
--- a/meta-oe/recipes-extended/libx86-1/libx86-1.1/makefile-add-ldflags.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1Upstream-Status: Pending
2
3Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
4
5diff --git a/Makefile b/Makefile
6index 951b617..6d9b73d 100644
7--- a/Makefile
8+++ b/Makefile
9@@ -22,7 +22,7 @@ static: $(OBJECTS)
10 $(AR) cru libx86.a $(OBJECTS)
11
12 shared: $(OBJECTS)
13- $(CC) $(CFLAGS) -o libx86.so.1 -shared -Wl,-soname,libx86.so.1 $(OBJECTS)
14+ $(CC) $(CFLAGS) $(LDFLAGS) -o libx86.so.1 -shared -Wl,-soname,libx86.so.1 $(OBJECTS)
15
16 objclean:
17 $(MAKE) -C x86emu clean
diff --git a/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb b/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.1.bb
index 817322a484..5ef7707a86 100644
--- a/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.bb
+++ b/meta-oe/recipes-extended/libx86-1/libx86-1_1.1.1.bb
@@ -7,17 +7,16 @@ LICENSE = "MIT & BSD-3-Clause"
7SECTION = "libs" 7SECTION = "libs"
8LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=633af6c02e6f624d4c472d970a2aca53" 8LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=633af6c02e6f624d4c472d970a2aca53"
9 9
10SRC_URI = "https://mirrors.slackware.com/slackware/slackware-current/source/ap/libx86/libx86-${PV}.tar.gz \ 10SRC_URI = "https://mirrors.slackware.com/slackware/slackware-current/source/ap/libx86/libx86-v${PV}.tar.lz \
11 file://libx86-mmap-offset.patch \
12 file://0001-assume-zero-is-valid-address.patch \ 11 file://0001-assume-zero-is-valid-address.patch \
13 file://makefile-add-ldflags.patch \
14 file://0001-Fix-type-of-the-void-pointer-assignment.patch \
15 file://0001-Define-CARD32-as-uint-as-it-is-32-bit.patch \ 12 file://0001-Define-CARD32-as-uint-as-it-is-32-bit.patch \
16" 13"
17SRC_URI[sha256sum] = "5bf13104cb327472b5cb65643352a9138646becacc06763088d83001d832d048" 14SRC_URI[sha256sum] = "0de221c8e2fcc84078155c1a82f86dcd71c2706033eb410d2090d86c99f51141"
18 15
19UPSTREAM_CHECK_URI = "https://mirrors.slackware.com/slackware/slackware-current/source/ap/libx86/" 16UPSTREAM_CHECK_URI = "https://mirrors.slackware.com/slackware/slackware-current/source/ap/libx86/"
20 17
18S = "${UNPACKDIR}/${BPN}-v${PV}"
19
21BPN = "libx86" 20BPN = "libx86"
22COMPATIBLE_HOST = '(x86_64|i.86).*-linux' 21COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
23 22