initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
From 6bc5abf99ef01e5aeea4f5bce5f5bff7f1b8ddd9 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Prado <sergio.prado@e-labworks.com>
|
||||
Date: Sat, 4 Jul 2020 20:02:53 -0300
|
||||
Subject: [PATCH] Fix musl build: basename() is in libgen.h.
|
||||
|
||||
Also, its argument is not const, so add const_cast.
|
||||
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
|
||||
---
|
||||
src/core/sysfs.cc | 19 ++++++++++---------
|
||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc
|
||||
index 32d65642f157..c2fa84fe8d0f 100644
|
||||
--- a/src/core/sysfs.cc
|
||||
+++ b/src/core/sysfs.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
+#include <libgen.h>
|
||||
|
||||
|
||||
__ID("@(#) $Id$");
|
||||
@@ -100,7 +101,7 @@ static string sysfs_getbustype(const string & path)
|
||||
{
|
||||
devname =
|
||||
string(fs.path + "/bus/") + string(namelist[i]->d_name) +
|
||||
- "/devices/" + basename(path.c_str());
|
||||
+ "/devices/" + basename(const_cast<char*>(path.c_str()));
|
||||
|
||||
if (samefile(devname, path))
|
||||
return string(namelist[i]->d_name);
|
||||
@@ -140,7 +141,7 @@ static string sysfstobusinfo(const string & path)
|
||||
|
||||
if (bustype == "usb")
|
||||
{
|
||||
- string name = basename(path.c_str());
|
||||
+ string name = basename(const_cast<char*>(path.c_str()));
|
||||
if (matches(name, "^[0-9]+-[0-9]+(\\.[0-9]+)*:[0-9]+\\.[0-9]+$"))
|
||||
{
|
||||
size_t colon = name.rfind(":");
|
||||
@@ -151,7 +152,7 @@ static string sysfstobusinfo(const string & path)
|
||||
|
||||
if (bustype == "virtio")
|
||||
{
|
||||
- string name = basename(path.c_str());
|
||||
+ string name = basename(const_cast<char*>(path.c_str()));
|
||||
if (name.compare(0, 6, "virtio") == 0)
|
||||
return "virtio@" + name.substr(6);
|
||||
else
|
||||
@@ -159,10 +160,10 @@ static string sysfstobusinfo(const string & path)
|
||||
}
|
||||
|
||||
if (bustype == "vio")
|
||||
- return string("vio@") + basename(path.c_str());
|
||||
+ return string("vio@") + basename(const_cast<char*>(path.c_str()));
|
||||
|
||||
if (bustype == "ccw")
|
||||
- return string("ccw@") + basename(path.c_str());
|
||||
+ return string("ccw@") + basename(const_cast<char*>(path.c_str()));
|
||||
|
||||
if (bustype == "ccwgroup")
|
||||
{
|
||||
@@ -240,7 +241,7 @@ string entry::driver() const
|
||||
string driverlink = This->devpath + "/driver";
|
||||
if (!exists(driverlink))
|
||||
return "";
|
||||
- return basename(readlink(driverlink).c_str());
|
||||
+ return basename(const_cast<char*>(readlink(driverlink).c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +329,7 @@ string entry::name_in_class(const string & classname) const
|
||||
|
||||
string entry::name() const
|
||||
{
|
||||
- return basename(This->devpath.c_str());
|
||||
+ return basename(const_cast<char*>(This->devpath.c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -340,12 +341,12 @@ entry entry::parent() const
|
||||
|
||||
string entry::classname() const
|
||||
{
|
||||
- return basename(dirname(This->devpath).c_str());
|
||||
+ return basename(const_cast<char*>(dirname(This->devpath).c_str()));
|
||||
}
|
||||
|
||||
bool entry::isvirtual() const
|
||||
{
|
||||
- return string(basename(dirname(dirname(This->devpath)).c_str())) == "virtual";
|
||||
+ return string(basename(const_cast<char*>(dirname(dirname(This->devpath)).c_str()))) == "virtual";
|
||||
}
|
||||
|
||||
string entry::string_attr(const string & name, const string & def) const
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 246b9e07f22d551fae0718315273760c087b79ca Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Prado <sergio.prado@e-labworks.com>
|
||||
Date: Sat, 4 Jul 2020 20:28:26 -0300
|
||||
Subject: [PATCH] Fix musl build: wrong usage of LONG_BIT
|
||||
|
||||
LONG_BIT is not a sysconf value, it is either 32 or 64. Using it as
|
||||
a sysconf value will give weird results.
|
||||
|
||||
Originally it was sysconf(_SC_LONG_BIT) (before it was "fixed" by the
|
||||
gentoo guys). But this is useless: it will always return a value
|
||||
equal to LONG_BIT: it's either compiled 32-bit or 64-bit so a runtime
|
||||
lookup doesn't make sense. For this reason, musl has removed the
|
||||
definition of _SC_LONG_BIT.
|
||||
|
||||
Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
---
|
||||
src/core/abi.cc | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/core/abi.cc b/src/core/abi.cc
|
||||
index adff7b55acfa..76c664c03ce7 100644
|
||||
--- a/src/core/abi.cc
|
||||
+++ b/src/core/abi.cc
|
||||
@@ -20,9 +20,7 @@ __ID("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $");
|
||||
bool scan_abi(hwNode & system)
|
||||
{
|
||||
// are we compiled as 32- or 64-bit process ?
|
||||
- long sc = sysconf(LONG_BIT);
|
||||
- if(sc==-1) sc = sysconf(_SC_LONG_BIT);
|
||||
- if(sc!=-1) system.setWidth(sc);
|
||||
+ system.setWidth(LONG_BIT);
|
||||
|
||||
pushd(PROC_SYS);
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_LSHW
|
||||
bool "lshw"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_HWDATA # runtime
|
||||
select BR2_PACKAGE_HWDATA_PCI_IDS
|
||||
select BR2_PACKAGE_HWDATA_USB_IDS
|
||||
help
|
||||
lshw (Hardware Lister) is a small tool to provide
|
||||
detailed information on the hardware configuration of the
|
||||
machine.
|
||||
|
||||
http://ezix.org/project/wiki/HardwareLiSter
|
||||
|
||||
comment "lshw needs a toolchain w/ C++, wchar"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80 lshw-B.02.19.2.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
@@ -0,0 +1,30 @@
|
||||
################################################################################
|
||||
#
|
||||
# lshw
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LSHW_VERSION = 02.19.2
|
||||
LSHW_SITE = http://ezix.org/software/files
|
||||
LSHW_SOURCE = lshw-B.$(LSHW_VERSION).tar.gz
|
||||
LSHW_LICENSE = GPL-2.0
|
||||
LSHW_LICENSE_FILES = COPYING
|
||||
|
||||
LSHW_MAKE_OPTS = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \
|
||||
RPM_OPT_FLAGS="$(TARGET_CFLAGS)" all
|
||||
LSHW_MAKE_ENV = \
|
||||
$(TARGET_MAKE_ENV) \
|
||||
LIBS=$(TARGET_NLS_LIBS)
|
||||
LSHW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
|
||||
|
||||
define LSHW_BUILD_CMDS
|
||||
$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPTS)
|
||||
endef
|
||||
|
||||
define LSHW_INSTALL_TARGET_CMDS
|
||||
$(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) \
|
||||
$(LSHW_MAKE_OPTS) install
|
||||
$(RM) -rf $(TARGET_DIR)/usr/share/lshw
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user