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,30 @@
From aaa0a5cd4e401bde4fb3691dd4e6c70a5c61e031 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Mon, 13 Apr 2020 20:12:11 +0200
Subject: [PATCH] include: Declare gVERSION global as 'extern'.
Fixes build with '-fno-common'.
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
[Retrieved from:
https://github.com/eclipse/mraa/commit/aaa0a5cd4e401bde4fb3691dd4e6c70a5c61e031]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
include/version.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/version.h b/include/version.h
index 47366ef6f..3a567a1d5 100644
--- a/include/version.h
+++ b/include/version.h
@@ -11,8 +11,8 @@
extern "C" {
#endif
-const char* gVERSION;
-const char* gVERSION_SHORT;
+extern const char* gVERSION;
+extern const char* gVERSION_SHORT;
#ifdef __cplusplus
}

View File

@@ -0,0 +1,45 @@
From 47c3850cddd63cebd9dc48e411963314449118f1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 31 Dec 2023 19:16:35 -0800
Subject: [PATCH] mraa: Use posix basename
Musl has removed the declaration from string.h [1] which exposes the
problem especially with clang-17+ compiler where implicit function
declaration is flagged as error. Use posix basename and make a copy of
string to operate on to emulate GNU basename behaviour.
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream: https://github.com/eclipse/mraa/commit/47c3850cddd63cebd9dc48e411963314449118f1
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
src/mraa.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mraa.c b/src/mraa.c
index 653ea1fa7..b556d0455 100644
--- a/src/mraa.c
+++ b/src/mraa.c
@@ -12,6 +12,7 @@
#endif
#include <dlfcn.h>
+#include <libgen.h>
#include <pwd.h>
#include <sched.h>
#include <stddef.h>
@@ -341,9 +342,11 @@ static int
mraa_count_iio_devices(const char* path, const struct stat* sb, int flag, struct FTW* ftwb)
{
// we are only interested in files with specific names
- if (fnmatch(IIO_DEVICE_WILDCARD, basename(path), 0) == 0) {
+ char* tmp = strdup(path);
+ if (fnmatch(IIO_DEVICE_WILDCARD, basename(tmp), 0) == 0) {
num_iio_devices++;
}
+ free(tmp);
return 0;
}

View File

@@ -0,0 +1,46 @@
From 92a1337e110464bbb3aaba2b3ede77dc13b3f175 Mon Sep 17 00:00:00 2001
From: Alex T <alext.mkrs@gmail.com>
Date: Sun, 2 Nov 2025 19:06:06 +0100
Subject: [PATCH] cmake: bump minimum version to address a deprecation warning
This fixes the following warning shown while configuring:
[cmake] CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
[cmake] Compatibility with CMake < 3.10 will be removed from a future version of
[cmake] CMake.
We don't have a clearly defined supported distro/versions list, so I
took Ubuntu 22.04 as arguably the oldest one we'd want to support for
the reference point. It has CMake 3.22, released in July 2022.
Signed-off-by: Alex T <alext.mkrs@gmail.com>
Upstream: https://github.com/eclipse/mraa/commit/92a1337e110464bbb3aaba2b3ede77dc13b3f175
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
CMakeLists.txt | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a13eeb81..34ded2b75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,15 +1,9 @@
-cmake_minimum_required (VERSION 2.8.11)
+cmake_minimum_required (VERSION 3.22)
project (mraa C)
FIND_PACKAGE (Threads REQUIRED)
-if (CMAKE_VERSION VERSION_LESS "3.1")
- if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
- endif ()
-else ()
- set (CMAKE_C_STANDARD 99)
-endif ()
+set (CMAKE_C_STANDARD 99)
option (BUILDCPP "Enable C++ (needed by FTDI4222 and tests)" ON)

23
package/mraa/Config.in Normal file
View File

@@ -0,0 +1,23 @@
config BR2_PACKAGE_MRAA_ARCH_SUPPORTS
bool
default y if BR2_aarch64 || BR2_aarch64_be
default y if BR2_arm || BR2_armeb
default y if BR2_i386 || BR2_x86_64
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
config BR2_PACKAGE_MRAA
bool "mraa"
depends on BR2_PACKAGE_MRAA_ARCH_SUPPORTS
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
help
mraa is a C/C++ library with bindings to javascript & python
to interface with the IO on Galileo, Edison & other
platforms, with a structured and sane API where port
names/numbering matches the board that you are on.
http://iotdk.intel.com/docs/master/mraa
comment "mraa needs a toolchain w/ threads, dynamic library"
depends on BR2_PACKAGE_MRAA_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

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

@@ -0,0 +1,3 @@
# Locally calculated
sha256 076669bee8423ffef3065735b293a329020be86630fea457174dbfcc67a0554a mraa-2.2.0.tar.gz
sha256 fac52622ed3badd86b34857b21777ab90296d6ccbc2ac0fd457c09fdeefa9ef1 COPYING

44
package/mraa/mraa.mk Normal file
View File

@@ -0,0 +1,44 @@
################################################################################
#
# mraa
#
################################################################################
MRAA_VERSION = 2.2.0
MRAA_SITE = $(call github,eclipse,mraa,v$(MRAA_VERSION))
MRAA_LICENSE = MIT
MRAA_LICENSE_FILES = COPYING
MRAA_INSTALL_STAGING = YES
ifeq ($(BR2_i386),y)
MRAA_ARCH = i386
else ifeq ($(BR2_x86_64),y)
MRAA_ARCH = x86_64
else ifeq ($(BR2_arm)$(BR2_armeb),y)
MRAA_ARCH = arm
else ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)
MRAA_ARCH = aarch64
else ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
MRAA_ARCH = mips
endif
# USBPLAT only makes sense with FTDI4222, which requires the ftd2xx library,
# which doesn't exist in buildroot
# Disable C++ as it is used only by FTDI4222 and tests
MRAA_CONF_OPTS += \
-DBUILDARCH=$(MRAA_ARCH) \
-DBUILDCPP=OFF \
-DBUILDSWIG=OFF \
-DUSBPLAT=OFF \
-DFTDI4222=OFF \
-DENABLEEXAMPLES=OFF \
-DBUILDTESTS=OFF
ifeq ($(BR2_PACKAGE_JSON_C),y)
MRAA_CONF_OPTS += -DJSONPLAT=ON
MRAA_DEPENDENCIES += json-c
else
MRAA_CONF_OPTS += -DJSONPLAT=OFF
endif
$(eval $(cmake-package))