Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
From b08fe001e3d3f3564ef298e62342f07080807f7a Mon Sep 17 00:00:00 2001
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Date: Wed, 28 Oct 2015 15:45:10 +0000
Subject: [PATCH] Let the shared and the static library have the same name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The will be differentiated by the extension (.so or .a).
Fetched from:
https://github.com/vriera/yajl/commit/6d09f11b8fd358cab0e31b965327e64a599f9ce9
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
src/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 99cf9e9..1a900d3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,6 +36,7 @@ SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig)
SET(LIBRARY_OUTPUT_PATH ${libDir})
ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
+SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl)
ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
--
2.8.0

View File

@@ -0,0 +1,51 @@
From b3cddf92adacfe5ca40574afb3e323cc7cdebc5c Mon Sep 17 00:00:00 2001
From: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Date: Tue, 2 Feb 2016 15:46:09 +0100
Subject: [PATCH] cmake: Add shared library conditonnal build
When BUILD_SHARED_LIBS is off, you don't want to build the shared
library.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[Dario: make the patch to be applied with fuzz factor 0]
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
src/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 99cf9e9..9e9c77d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -38,6 +38,7 @@ SET(LIBRARY_OUTPUT_PATH ${libDir})
ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl)
+IF(BUILD_SHARED_LIBS)
ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
#### setup shared library version number
@@ -52,6 +53,7 @@ IF(APPLE)
SET_TARGET_PROPERTIES(yajl PROPERTIES
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF(APPLE)
+ENDIF(BUILD_SHARED_LIBS)
#### build up an sdk as a post build step
@@ -78,10 +80,12 @@ INCLUDE_DIRECTORIES(${incDir}/..)
# at build time you may specify the cmake variable LIB_SUFFIX to handle
# 64-bit systems which use 'lib64'
+IF(BUILD_SHARED_LIBS)
INSTALL(TARGETS yajl
RUNTIME DESTINATION lib${LIB_SUFFIX}
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ENDIF(BUILD_SHARED_LIBS)
INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)
INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl)
--
2.7.0

View File

@@ -0,0 +1,127 @@
From 425b25993ef58d07aa18c5d4938876a90e22c47a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
Date: Sat, 9 Apr 2016 23:24:27 +0200
Subject: [PATCH] Link with shared libyajl in a shared build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Building yajl in a static context fails in a parallel build:
[ 21%] Linking C executable gen-extra-close
[ 26%] Building C object src/CMakeFiles/yajl_s.dir/yajl_buf.c.o
/home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bfin-uclinux/bfin-uclinux/bin/ld.real: cannot find -lyajl
Fix this issue by linking against the shared libyail in a shared build. Apply
this fix also to all other build targets who are linking against the library.
Upstream status: Pending
https://github.com/lloyd/yajl/pull/187
[Update: align with commit 302563539dacb284576a443401cdfd061eb2e1e8 and remove
linking with libm from test/api/CMakeLists.txt]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
example/CMakeLists.txt | 7 ++++++-
perf/CMakeLists.txt | 6 +++++-
reformatter/CMakeLists.txt | 6 +++++-
test/api/CMakeLists.txt | 6 +++++-
test/parsing/CMakeLists.txt | 6 +++++-
verify/CMakeLists.txt | 6 +++++-
6 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index 0a7f622..8cfcef8 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -20,4 +20,9 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
ADD_EXECUTABLE(parse_config ${SRCS})
-TARGET_LINK_LIBRARIES(parse_config yajl_s)
+IF(BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(parse_config yajl)
+ELSE()
+ TARGET_LINK_LIBRARIES(parse_config yajl_s)
+ENDIF()
+
diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt
index b438d7a..40ba363 100644
--- a/perf/CMakeLists.txt
+++ b/perf/CMakeLists.txt
@@ -20,4 +20,8 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
ADD_EXECUTABLE(perftest ${SRCS})
-TARGET_LINK_LIBRARIES(perftest yajl_s)
+IF(BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(perftest yajl)
+ELSE()
+ TARGET_LINK_LIBRARIES(perftest yajl_s)
+ENDIF()
diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt
index 52a9bee..7629094 100644
--- a/reformatter/CMakeLists.txt
+++ b/reformatter/CMakeLists.txt
@@ -26,7 +26,11 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
ADD_EXECUTABLE(json_reformat ${SRCS})
-TARGET_LINK_LIBRARIES(json_reformat yajl_s)
+IF(BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(json_reformat yajl)
+ELSE()
+ TARGET_LINK_LIBRARIES(json_reformat yajl_s)
+ENDIF()
# In some environments, we must explicitly link libm (like qnx,
# thanks @shahbag)
diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt
index cd65a54..0c9debf 100644
--- a/test/api/CMakeLists.txt
+++ b/test/api/CMakeLists.txt
@@ -21,5 +21,9 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib)
FOREACH (test ${TESTS})
GET_FILENAME_COMPONENT(testProg ${test} NAME_WE)
ADD_EXECUTABLE(${testProg} ${test})
- TARGET_LINK_LIBRARIES(${testProg} yajl)
+ IF(BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(${testProg} yajl)
+ ELSE()
+ TARGET_LINK_LIBRARIES(${testProg} yajl_s)
+ ENDIF()
ENDFOREACH()
diff --git a/test/parsing/CMakeLists.txt b/test/parsing/CMakeLists.txt
index c22a388..285f048 100644
--- a/test/parsing/CMakeLists.txt
+++ b/test/parsing/CMakeLists.txt
@@ -20,4 +20,8 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib)
ADD_EXECUTABLE(yajl_test ${SRCS})
-TARGET_LINK_LIBRARIES(yajl_test yajl_s)
+IF(BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(yajl_test yajl)
+ELSE()
+ TARGET_LINK_LIBRARIES(yajl_test yajl_s)
+ENDIF()
diff --git a/verify/CMakeLists.txt b/verify/CMakeLists.txt
index 967fca1..06cb2dc 100644
--- a/verify/CMakeLists.txt
+++ b/verify/CMakeLists.txt
@@ -26,7 +26,11 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
ADD_EXECUTABLE(json_verify ${SRCS})
-TARGET_LINK_LIBRARIES(json_verify yajl_s)
+IF(BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(json_verify yajl)
+ELSE()
+ TARGET_LINK_LIBRARIES(json_verify yajl_s)
+ENDIF()
# copy in the binary
GET_TARGET_PROPERTY(binPath json_verify LOCATION)
--
2.8.0

View File

@@ -0,0 +1,64 @@
From b47f6a50925efb8c8707b1faed5561a4b66ffdb1 Mon Sep 17 00:00:00 2001
From: Samuel Martin <s.martin49@gmail.com>
Date: Sun, 24 Apr 2016 18:45:27 +0200
Subject: [PATCH] Link libyajl{,_s} with libm when isnan is not brought by the
libc
Check whether isnan is provided by the libc library, otherwise make sure
yajl libraries are link against libm.
Note that setting libm as PUBLIC link libraries enable the transitivity
[1, 2]; therefore it will be automatically passed to target linking
against libyajl{,_s}.
This patch also makes sure the link libraries will appear in the yajl.pc
file.
[1] https://cmake.org/cmake/help/v3.5/command/target_link_libraries.html
[2] https://cmake.org/cmake/help/v3.5/manual/cmake-buildsystem.7.html#target-usage-requirements
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
src/CMakeLists.txt | 10 ++++++++++
src/yajl.pc.cmake | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b487bfd..a88698f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -35,11 +35,21 @@ SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig)
# set the output path for libraries
SET(LIBRARY_OUTPUT_PATH ${libDir})
+SET(yajl_lib_link)
+INCLUDE(CheckLibraryExists)
+CHECK_LIBRARY_EXISTS(c isnan "" HAVE_LIBC_ISNAN)
+
+IF(NOT HAVE_LIBC_ISNAN)
+ LIST(APPEND yajl_lib_link "-lm")
+ENDIF(NOT HAVE_LIBC_ISNAN)
+
ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl)
+TARGET_LINK_LIBRARIES(yajl_s PUBLIC ${yajl_lib_link})
IF(BUILD_SHARED_LIBS)
ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
+TARGET_LINK_LIBRARIES(yajl PUBLIC ${yajl_lib_link})
#### setup shared library version number
SET_TARGET_PROPERTIES(yajl PROPERTIES
diff --git a/src/yajl.pc.cmake b/src/yajl.pc.cmake
index 6eaca14..4681dd4 100644
--- a/src/yajl.pc.cmake
+++ b/src/yajl.pc.cmake
@@ -6,4 +6,4 @@ Name: Yet Another JSON Library
Description: A Portable JSON parsing and serialization library in ANSI C
Version: ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}
Cflags: -I${dollar}{includedir}
-Libs: -L${dollar}{libdir} -lyajl
+Libs: -L${dollar}{libdir} -lyajl ${yajl_lib_link}
--
2.8.0

View File

@@ -0,0 +1,68 @@
From dd88e2ea2fc3f045722f6fee362af2643b5394f5 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Fri, 28 Mar 2025 09:31:40 +0000
Subject: [PATCH] Allow build with CMake 4.0.0
fixes deprecated cmake option and uses cmake 2.8.0 TARGET_FILE
update cmake supported minimum versions to 2.8.0...3.10
ref:
- https://cmake.org/cmake/help/latest/policy/CMP0026.html
CMake Error at .../CMakeLists.txt: (GET_TARGET_PROPERTY):
The LOCATION property may not be read from target "json_...". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Fixes: https://autobuild.buildroot.org/results/0b6/0b6ada93f45c16cc8c558ec23a0eb56da2aa86e9
Upstream: https://github.com/lloyd/yajl/pull/256
---
CMakeLists.txt | 2 +-
reformatter/CMakeLists.txt | 4 +---
verify/CMakeLists.txt | 4 +---
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 471eee13..deba3a40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0...3.10)
PROJECT(YetAnotherJSONParser C)
diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt
index 52a9bee8..267d02e2 100644
--- a/reformatter/CMakeLists.txt
+++ b/reformatter/CMakeLists.txt
@@ -39,9 +39,7 @@ IF (NOT WIN32)
ENDIF (NOT WIN32)
# copy the binary into the output directory
-GET_TARGET_PROPERTY(binPath json_reformat LOCATION)
-
ADD_CUSTOM_COMMAND(TARGET json_reformat POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:json_reformat> ${binDir})
INSTALL(TARGETS json_reformat RUNTIME DESTINATION bin)
diff --git a/verify/CMakeLists.txt b/verify/CMakeLists.txt
index 967fca16..2f390082 100644
--- a/verify/CMakeLists.txt
+++ b/verify/CMakeLists.txt
@@ -33,9 +33,7 @@ ELSE()
ENDIF()
# copy in the binary
-GET_TARGET_PROPERTY(binPath json_verify LOCATION)
-
ADD_CUSTOM_COMMAND(TARGET json_verify POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:json_verify> ${binDir})
INSTALL(TARGETS json_verify RUNTIME DESTINATION bin)

8
package/yajl/Config.in Normal file
View File

@@ -0,0 +1,8 @@
config BR2_PACKAGE_YAJL
bool "yajl"
help
Yet Another JSON Library. YAJL is a small event-driven
(SAX-style) JSON parser written in ANSI C, and a small
validating JSON generator.
http://lloyd.github.com/yajl/

3
package/yajl/yajl.hash Normal file
View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a yajl-2.1.0.tar.gz
sha256 054bf2c11686c5442850b1da58ad592e3d1d2a236a362e67279b957f8e662f5a COPYING

14
package/yajl/yajl.mk Normal file
View File

@@ -0,0 +1,14 @@
################################################################################
#
# yajl
#
################################################################################
YAJL_VERSION = 2.1.0
YAJL_SITE = $(call github,lloyd,yajl,refs/tags/$(YAJL_VERSION))
YAJL_INSTALL_STAGING = YES
YAJL_LICENSE = ISC
YAJL_LICENSE_FILES = COPYING
YAJL_CPE_ID_VALID = YES
$(eval $(cmake-package))