packages/utils/hwinfo/patches/1-remove_libx8emu_dependency
Josef Schlehofer 743e645b1f
hwinfo: refresh patches to avoid fuzz and offset
Fixes:
Applying patch 3-assorted-Makefile-butchery
patching file Makefile
patching file Makefile.common
patching file src/Makefile
patching file src/hd/Makefile
Hunk #1 succeeded at 8 with fuzz 1 (offset -4 lines).
patching file src/isdn/Makefile
patching file src/smp/Makefile

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2020-12-09 02:17:24 +01:00

65 lines
1.8 KiB
Text

the library libx86emu is used only for manipulating VBIOS
firmware to get some information from it.
Since it's not crucial for OpenWrt usecase and it's a pain
to compile this package with this dependency in OpenWrt due to
host builds and whatnot, we simply remove it and disable this
functionality in hwinfo.
This also saves some space.
--- a/Makefile
+++ b/Makefile
@@ -25,13 +25,14 @@ LIBDIR ?= /usr/lib
endif
ULIBDIR = $(LIBDIR)
+# this library has been removed from the code, disabling it here too
# ia64
-ifneq ($(filter i386 x86_64, $(ARCH)),)
-SLIBS += -lx86emu
-TLIBS += -lx86emu
-SO_LIBS += -lx86emu
-TSO_LIBS += -lx86emu
-endif
+#ifneq ($(filter i386 x86_64, $(ARCH)),)
+#SLIBS += -lx86emu
+#TLIBS += -lx86emu
+#SO_LIBS += -lx86emu
+#TSO_LIBS += -lx86emu
+#endif
SHARED_FLAGS =
OBJS_NO_TINY = names.o parallel.o modem.o
--- a/src/hd/bios.c
+++ b/src/hd/bios.c
@@ -447,9 +447,10 @@ void hd_scan_bios(hd_data_t *hd_data)
}
}
-#if defined(__i386__) || defined (__x86_64__)
- get_vbe_info(hd_data, vbe);
-#endif
+//disabled as we removed the library needed for this function
+//#if defined(__i386__) || defined (__x86_64__)
+// get_vbe_info(hd_data, vbe);
+//#endif
if(vbe->ok) {
bt->vbe_ver = vbe->version;
--- a/src/hd/bios.h
+++ b/src/hd/bios.h
@@ -5,4 +5,5 @@
#define BIOS_RAM_SIZE 0x100
void hd_scan_bios(hd_data_t *hd_data);
-void get_vbe_info(hd_data_t *hd_data, vbe_info_t *vbe);
+//disabled as we removed the lib needed by this function
+//void get_vbe_info(hd_data_t *hd_data, vbe_info_t *vbe);
--- a/src/hd/mdt.c
+++ b/src/hd/mdt.c
@@ -1,4 +1,6 @@
-#if defined(__i386__) || defined (__x86_64__)
+//disabling this whole thing as it's using the lib we have removed
+//#if defined(__i386__) || defined (__x86_64__)
+#if defined(__disabled__) || defined (__disabled__)
#define _GNU_SOURCE