initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,20 @@
Makefile.gnu: allow non-root install by not enforcing root ownserhip
Signed-off-by: Rémi Rérolle <remi.rerolle@gmail.com>
diff -ruN a/Makefile.gnu b/Makefile.gnu
--- a/Makefile.gnu 2015-04-09 16:34:02.315316841 +0200
+++ b/Makefile.gnu 2015-04-09 16:34:28.875483201 +0200
@@ -71,9 +71,9 @@
install:
install -d $(INCDIR) $(INSTALLDIR)
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+ install -m 644 $(HEADER) $(INCDIR)
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
# ldconfig
@@ -0,0 +1,67 @@
Fix build issue caused by invalid register usage on x86
Patch taken from https://github.com/openexr/openexr/issues/128.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp
===================================================================
--- a/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp
+++ b/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp
@@ -40,21 +40,19 @@
namespace {
#if defined(IMF_HAVE_SSE2) && defined(__GNUC__)
-
+#include <cpuid.h>
// Helper functions for gcc + SSE enabled
- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
+ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx,
+ unsigned int &ecx, unsigned int &edx)
{
- __asm__ __volatile__ (
- "cpuid"
- : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
- : /* Input */ "a"(n)
- : /* Clobber */);
+ __get_cpuid(n, &eax, &ebx, &ecx, &edx);
}
#else // IMF_HAVE_SSE2 && __GNUC__
// Helper functions for generic compiler - all disabled
- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
+ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx,
+ unsigned int &ecx, unsigned int &edx)
{
eax = ebx = ecx = edx = 0;
}
@@ -64,7 +62,7 @@
#ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
- void xgetbv(int n, int &eax, int &edx)
+ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx)
{
__asm__ __volatile__ (
"xgetbv"
@@ -75,7 +73,7 @@
#else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
- void xgetbv(int n, int &eax, int &edx)
+ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx)
{
eax = edx = 0;
}
@@ -94,8 +92,8 @@
f16c(false)
{
bool osxsave = false;
- int max = 0;
- int eax, ebx, ecx, edx;
+ unsigned int max = 0;
+ unsigned int eax, ebx, ecx, edx;
cpuid(0, max, ebx, ecx, edx);
if (max > 0)
@@ -0,0 +1,64 @@
fixed PluginBMP, PluginDDS for compilation under Big Endian OS
Downloaded from upstream commit:
https://sourceforge.net/p/freeimage/svn/1809/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
diff -uNr FreeImage.orig/Source/FreeImage/PluginBMP.cpp FreeImage/Source/FreeImage/PluginBMP.cpp
--- FreeImage.orig/Source/FreeImage/PluginBMP.cpp 2016-06-15 12:35:30.000000000 +0200
+++ FreeImage/Source/FreeImage/PluginBMP.cpp 2019-08-31 16:00:27.813378612 +0200
@@ -518,7 +518,7 @@
io->read_proc(FreeImage_GetPalette(dib), used_colors * sizeof(RGBQUAD), 1, handle);
#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB
RGBQUAD *pal = FreeImage_GetPalette(dib);
- for(int i = 0; i < used_colors; i++) {
+ for(unsigned int i = 0; i < used_colors; i++) {
INPLACESWAP(pal[i].rgbRed, pal[i].rgbBlue);
}
#endif
@@ -1419,7 +1419,7 @@
free(buffer);
#ifdef FREEIMAGE_BIGENDIAN
- } else if (bpp == 16) {
+ } else if (dst_bpp == 16) {
int padding = dst_pitch - dst_width * sizeof(WORD);
WORD pad = 0;
WORD pixel;
@@ -1440,7 +1440,7 @@
}
#endif
#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_RGB
- } else if (bpp == 24) {
+ } else if (dst_bpp == 24) {
int padding = dst_pitch - dst_width * sizeof(FILE_BGR);
DWORD pad = 0;
FILE_BGR bgr;
@@ -1461,7 +1461,7 @@
}
}
}
- } else if (bpp == 32) {
+ } else if (dst_bpp == 32) {
FILE_BGRA bgra;
for(unsigned y = 0; y < dst_height; y++) {
BYTE *line = FreeImage_GetScanLine(dib, y);
diff -uNr FreeImage.orig/Source/FreeImage/PluginDDS.cpp FreeImage/Source/FreeImage/PluginDDS.cpp
--- FreeImage.orig/Source/FreeImage/PluginDDS.cpp 2018-07-31 17:04:58.000000000 +0200
+++ FreeImage/Source/FreeImage/PluginDDS.cpp 2019-08-31 16:00:39.213465120 +0200
@@ -356,14 +356,6 @@
for(int i=0; i<11; i++) {
SwapLong(&header->surfaceDesc.dwReserved1[i]);
}
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwSize);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFlags);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwFourCC);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBBitCount);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRBitMask);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwGBitMask);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwBBitMask);
- SwapLong(&header->surfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask);
SwapLong(&header->surfaceDesc.ddsCaps.dwCaps1);
SwapLong(&header->surfaceDesc.ddsCaps.dwCaps2);
SwapLong(&header->surfaceDesc.ddsCaps.dwReserved[0]);
+18
View File
@@ -0,0 +1,18 @@
config BR2_PACKAGE_LIBFREEIMAGE
bool "libfreeimage"
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_STATIC_LIBS
depends on BR2_USE_WCHAR
# compiler issue: "Error: invalid register number `63'"
depends on !BR2_arc
help
FreeImage is an Open Source library project for developers who
would like to support popular graphics image formats like PNG,
BMP, JPEG, TIFF and others as needed by today's multimedia
applications.
http://freeimage.sourceforge.net
comment "libfreeimage needs a toolchain w/ C++, dynamic library, wchar"
depends on !BR2_arc
depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
+9
View File
@@ -0,0 +1,9 @@
# From https://sourceforge.net/projects/freeimage/files/Source%20Distribution/3.18.0/
md5 f8ba138a3be233a3eed9c456e42e2578 FreeImage3180.zip
sha1 38daa9d8f1bca2330a2eaa42ec66fbe6ede7dce9 FreeImage3180.zip
# Locally computed
sha256 f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd FreeImage3180.zip
sha256 d51615a1a47f1ddbb027920d60d3fc30a00e1284c795a47857883e641349fadf license-gplv2.txt
sha256 084be110e3e8757d8e6945cda1fbc7e5073bbe688dc19b92c0d8440155d8e282 license-gplv3.txt
sha256 0bb9a3123297c73ae6e19c70459fb0e58f313f67ca63176fd43f8e77668b8243 license-fi.txt
+35
View File
@@ -0,0 +1,35 @@
################################################################################
#
# libfreeimage
#
################################################################################
LIBFREEIMAGE_VERSION = 3.18.0
LIBFREEIMAGE_SITE = http://downloads.sourceforge.net/freeimage
LIBFREEIMAGE_SOURCE = FreeImage$(subst .,,$(LIBFREEIMAGE_VERSION)).zip
LIBFREEIMAGE_LICENSE = GPL-2.0 or GPL-3.0 or FreeImage Public License
LIBFREEIMAGE_LICENSE_FILES = license-gplv2.txt license-gplv3.txt license-fi.txt
LIBFREEIMAGE_CPE_ID_VENDOR = freeimage_project
LIBFREEIMAGE_CPE_ID_PRODUCT = freeimage
LIBFREEIMAGE_INSTALL_STAGING = YES
define LIBFREEIMAGE_EXTRACT_CMDS
$(UNZIP) $(LIBFREEIMAGE_DL_DIR)/$(LIBFREEIMAGE_SOURCE) -d $(@D)
mv $(@D)/FreeImage/* $(@D)
rmdir $(@D)/FreeImage
endef
define LIBFREEIMAGE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" $(MAKE) -C $(@D)
endef
define LIBFREEIMAGE_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
endef
define LIBFREEIMAGE_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
endef
$(eval $(generic-package))