hwinfo: add new package

add hwinfo package, it is a complete
system hardware detection tool,
similar to lshw but is written in C
and has minimal dependencies.
It is part of core SUSE Linux
applications like Yast installer
and system configurator tool so
it's regularly maintained.

Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
This commit is contained in:
Alberto Bursi
2020-06-01 19:35:42 +02:00
parent 64926ff607
commit 509b9d52a0
5 changed files with 448 additions and 0 deletions
@@ -0,0 +1,68 @@
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 @@
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 @@
}
}
-#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