initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
From 7ea7fe229ea6195938d9eadbe783cb1aa74380ba Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sun, 26 Apr 2020 15:33:39 +0200
|
||||
Subject: [PATCH] Use LONG_BIT to define RADIX_BITS
|
||||
|
||||
This allows to avoid having to support each CPU architecture
|
||||
individually.
|
||||
|
||||
Also, add the necessary defines in the makefile to expose
|
||||
LONG_BIT. Adding those defines end up requiring using <sys/select.h>
|
||||
as we're now using >= POSIX.1-2001 definitions of fd_set and friends.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
---
|
||||
src/LibSupport.h | 21 +++------------------
|
||||
src/TcpServerPosix.c | 1 +
|
||||
src/makefile | 2 ++
|
||||
3 files changed, 6 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/LibSupport.h b/src/LibSupport.h
|
||||
index 5055560..48b1e16 100644
|
||||
--- a/src/LibSupport.h
|
||||
+++ b/src/LibSupport.h
|
||||
@@ -64,24 +64,9 @@
|
||||
#ifndef _LIB_SUPPORT_H_
|
||||
#define _LIB_SUPPORT_H_
|
||||
|
||||
-/* kgold added power and s390 */
|
||||
-#ifndef RADIX_BITS
|
||||
-# if defined(__x86_64__) || defined(__x86_64) \
|
||||
- || defined(__amd64__) || defined(__amd64) \
|
||||
- || defined(_WIN64) || defined(_M_X64) \
|
||||
- || defined(_M_ARM64) || defined(__aarch64__) \
|
||||
- || defined(__powerpc64__) || defined(__PPC64__) || defined(__ppc64__) \
|
||||
- || defined(__s390x__)
|
||||
-# define RADIX_BITS 64
|
||||
-# elif defined(__i386__) || defined(__i386) || defined(i386) \
|
||||
- || defined(_WIN32) || defined(_M_IX86) \
|
||||
- || defined(_M_ARM) || defined(__arm__) || defined(__thumb__) \
|
||||
- || defined(__powerpc__) || defined(__PPC__)
|
||||
-# define RADIX_BITS 32
|
||||
-# else
|
||||
-# error Unable to determine RADIX_BITS from compiler environment
|
||||
-# endif
|
||||
-#endif // RADIX_BITS
|
||||
+#include <limits.h>
|
||||
+
|
||||
+#define RADIX_BITS LONG_BIT
|
||||
|
||||
// These macros use the selected libraries to the proper include files.
|
||||
#define LIB_QUOTE(_STRING_) #_STRING_
|
||||
diff --git a/src/TcpServerPosix.c b/src/TcpServerPosix.c
|
||||
index cad0402..6293cdd 100644
|
||||
--- a/src/TcpServerPosix.c
|
||||
+++ b/src/TcpServerPosix.c
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
+#include <sys/select.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
diff --git a/src/makefile b/src/makefile
|
||||
index f124e78..6ee128e 100644
|
||||
--- a/src/makefile
|
||||
+++ b/src/makefile
|
||||
@@ -46,6 +46,8 @@ CCFLAGS = -Wall \
|
||||
-c -ggdb -O0 \
|
||||
-DTPM_POSIX \
|
||||
-D_POSIX_ \
|
||||
+ -D_DEFAULT_SOURCE \
|
||||
+ -D_XOPEN_SOURCE=500 \
|
||||
-DTPM_NUVOTON
|
||||
|
||||
# add this line for big endian platforms
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_IBM_SW_TPM2
|
||||
bool "ibm-sw-tpm2"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS # ibm-sw-tpm2
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
|
||||
help
|
||||
This project is an implementation of the TCG TPM 2.0
|
||||
specification. It is based on the TPM specification Parts 3
|
||||
and 4 source code donated by Microsoft, with additional
|
||||
files to complete the implementation.
|
||||
|
||||
https://sourceforge.net/projects/ibmswtpm2/
|
||||
|
||||
comment "ibm-sw-tpm2 needs a toolchain w/ threads, dynamic library"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
@@ -0,0 +1,6 @@
|
||||
# from https://sourceforge.net/projects/ibmswtpm2/files
|
||||
sha1 a2a5335024a2edc1739f08b99e716fa355be627d ibmtpm1563.tar.gz
|
||||
md5 13013612b3a13dc935fefe1a5684179c ibmtpm1563.tar.gz
|
||||
# Locally computed:
|
||||
sha256 55145928ad2b24f34be6a0eacf9fb492e10e0ea919b8428c721fa970e85d6147 ibmtpm1661.tar.gz
|
||||
sha256 dd2d31b560011ea673e197251e710e52669d911367d83cd3cfd018f8ed58bde9 LICENSE
|
||||
@@ -0,0 +1,23 @@
|
||||
################################################################################
|
||||
#
|
||||
# ibm-sw-tpm2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IBM_SW_TPM2_VERSION = 1661
|
||||
IBM_SW_TPM2_SOURCE = ibmtpm$(IBM_SW_TPM2_VERSION).tar.gz
|
||||
IBM_SW_TPM2_SITE = https://sourceforge.net/projects/ibmswtpm2/files
|
||||
IBM_SW_TPM2_LICENSE = BSD-3-Clause
|
||||
IBM_SW_TPM2_LICENSE_FILES = LICENSE
|
||||
IBM_SW_TPM2_DEPENDENCIES = openssl
|
||||
|
||||
define IBM_SW_TPM2_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS)
|
||||
endef
|
||||
|
||||
define IBM_SW_TPM2_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS) install \
|
||||
DESTDIR=$(TARGET_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user