Initial Commit
- initial default booting image
This commit is contained in:
29
package/tinycbor/0001-install-json2cbor.patch
Normal file
29
package/tinycbor/0001-install-json2cbor.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From c2c569fbef704685ce62d45fb7b20a804f45e9f3 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Larysch <larysch@fixme.gmbh>
|
||||
Date: Mon, 13 Apr 2026 21:57:03 +0200
|
||||
Subject: [PATCH] install json2cbor
|
||||
|
||||
The old Make-based build system installed json2cbor during "make
|
||||
install" if it has been built. However, this behavior got dropped during
|
||||
the CMake migration, causing this tool to be missing by default. Restore
|
||||
the old behavior.
|
||||
|
||||
Signed-off-by: Florian Larysch <fl@n621.de>
|
||||
Upstream: https://github.com/intel/tinycbor/commit/c2c569fbef704685ce62d45fb7b20a804f45e9f3
|
||||
---
|
||||
tools/json2cbor/CMakeLists.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/json2cbor/CMakeLists.txt b/tools/json2cbor/CMakeLists.txt
|
||||
index 41892a3..a873114 100644
|
||||
--- a/tools/json2cbor/CMakeLists.txt
|
||||
+++ b/tools/json2cbor/CMakeLists.txt
|
||||
@@ -6,4 +6,5 @@ if(LIBCJSON_FOUND)
|
||||
tinycbor_add_executable(json2cbor json2cbor.c)
|
||||
target_include_directories(json2cbor SYSTEM PUBLIC ${LIBCJSON_INCLUDE_DIRS})
|
||||
target_link_libraries(json2cbor ${LIBCJSON_LIBRARIES})
|
||||
+ install(TARGETS json2cbor)
|
||||
endif()
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 4adba2c1cc376cbbbbc603595e2f561a21259bfb Mon Sep 17 00:00:00 2001
|
||||
From: Florian Larysch <fl@n621.de>
|
||||
Date: Mon, 13 Apr 2026 23:34:39 +0200
|
||||
Subject: [PATCH] compilersupport: fix build with GCC < 11
|
||||
|
||||
Commit 45e4641 ("Fix build with GCC < 11: [[fallthrough]] is supported
|
||||
but not allowed in C") introduced a fix for old GCC versions, but commit
|
||||
91d1c50 ("compilersupport: fix compilation in C23 mode") reverted it,
|
||||
reintroducing the build failure.
|
||||
|
||||
Revert the revert.
|
||||
|
||||
Signed-off-by: Florian Larysch <fl@n621.de>
|
||||
Upstream: https://github.com/intel/tinycbor/commit/76d7a29cead0f8c1c72a6b4fb2ecbc8a9885ed89
|
||||
---
|
||||
src/compilersupport_p.h | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/compilersupport_p.h b/src/compilersupport_p.h
|
||||
index 7f24773..670a291 100644
|
||||
--- a/src/compilersupport_p.h
|
||||
+++ b/src/compilersupport_p.h
|
||||
@@ -52,10 +52,14 @@
|
||||
# define cbor_static_assert(x) ((void)sizeof(char[2*!!(x) - 1]))
|
||||
#endif
|
||||
|
||||
-#if defined(__has_cpp_attribute) // C23 and C++17
|
||||
+#if defined(__has_cpp_attribute) && defined(__cplusplus) // C++17
|
||||
# if __has_cpp_attribute(fallthrough)
|
||||
# define CBOR_FALLTHROUGH [[fallthrough]]
|
||||
# endif
|
||||
+#elif defined(__has_c_attribute) && !defined(__cplusplus) // C23
|
||||
+# if __has_c_attribute(fallthrough)
|
||||
+# define CBOR_FALLTHROUGH [[fallthrough]]
|
||||
+# endif
|
||||
#endif
|
||||
#ifndef CBOR_FALLTHROUGH
|
||||
# ifdef __GNUC__
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From bd2f0a3d2402cbb2d6e071cc3051ad04aa93e63d Mon Sep 17 00:00:00 2001
|
||||
From: Florian Larysch <fl@n621.de>
|
||||
Date: Mon, 13 Apr 2026 23:26:21 +0200
|
||||
Subject: [PATCH] CMake: don't depend on C++ compiler for main build
|
||||
|
||||
Only the tests actually require a C++ compiler, however CXX is globally
|
||||
enabled for the project, which prevents building on targets that do
|
||||
not have a C++ compiler available.
|
||||
|
||||
Only enable C++ support selectively when building the tests is enabled
|
||||
too.
|
||||
|
||||
Signed-off-by: Florian Larysch <fl@n621.de>
|
||||
Upstream: https://github.com/intel/tinycbor/pull/323
|
||||
---
|
||||
CMakeLists.txt | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e504ee5..e185474 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
-project(tinycbor LANGUAGES C CXX VERSION 7.0)
|
||||
+project(tinycbor LANGUAGES C VERSION 7.0)
|
||||
|
||||
# Set path to additional cmake scripts
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
@@ -56,7 +56,7 @@ add_library(tinycbor
|
||||
)
|
||||
if(WITH_FREESTANDING)
|
||||
target_compile_options(tinycbor PUBLIC
|
||||
- $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-ffreestanding>
|
||||
+ $<$<NOT:$<C_COMPILER_ID:MSVC>>:-ffreestanding>
|
||||
)
|
||||
else()
|
||||
target_sources(tinycbor PRIVATE
|
||||
@@ -106,8 +106,8 @@ endif()
|
||||
|
||||
# Enable warnings
|
||||
target_compile_options(tinycbor PRIVATE
|
||||
- $<$<CXX_COMPILER_ID:MSVC>:-W3>
|
||||
- $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:
|
||||
+ $<$<C_COMPILER_ID:MSVC>:-W3>
|
||||
+ $<$<NOT:$<C_COMPILER_ID:MSVC>>:
|
||||
-Wall -Wextra
|
||||
-Werror=format-security
|
||||
-Werror=incompatible-pointer-types
|
||||
@@ -181,6 +181,7 @@ if(BUILD_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
if(BUILD_TESTING)
|
||||
+ enable_language(CXX)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
--
|
||||
2.53.0
|
||||
|
||||
6
package/tinycbor/Config.in
Normal file
6
package/tinycbor/Config.in
Normal file
@@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_TINYCBOR
|
||||
bool "tinycbor"
|
||||
help
|
||||
Concise Binary Object Representation (CBOR) Library
|
||||
|
||||
https://github.com/01org/tinycbor
|
||||
3
package/tinycbor/tinycbor.hash
Normal file
3
package/tinycbor/tinycbor.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 8b1b76001b9f987677f2ea7aa814fba1f810ff6cbbffa62ea3bac612c55b1a56 tinycbor-7.0.tar.gz
|
||||
sha256 3c6ba0b5bfa7830505301ffb336a17b0748e0d61c4d34216e9dc98f10e40395e LICENSE
|
||||
18
package/tinycbor/tinycbor.mk
Normal file
18
package/tinycbor/tinycbor.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
#
|
||||
# tinycbor
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TINYCBOR_VERSION = 7.0
|
||||
TINYCBOR_SITE = $(call github,intel,tinycbor,v$(TINYCBOR_VERSION))
|
||||
TINYCBOR_LICENSE = MIT
|
||||
TINYCBOR_LICENSE_FILES = LICENSE
|
||||
|
||||
TINYCBOR_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CJSON),y)
|
||||
TINYCBOR_DEPENDENCIES += cjson
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user