Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From fce6b611e2530602c44fd914222529028173c509 Mon Sep 17 00:00:00 2001
|
||||
From: Edgar Bonet <bonet@grenoble.cnrs.fr>
|
||||
Date: Wed, 19 Aug 2026 18:15:25 +0200
|
||||
Subject: [PATCH] build: do not require a C++ compiler if it is not needed
|
||||
|
||||
Languages specified in the meson project() function are considered hard
|
||||
dependencies. When trying to build libgpiod in an environment lacking a
|
||||
C++ compiler, the build fails with an obscure error message ("ERROR:
|
||||
Unable to get gcc pre-processor defines").
|
||||
|
||||
As the C++ compiler is only needed for building the C++ bindings, do not
|
||||
require it unless the option bindings-cxx is enabled.
|
||||
|
||||
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
|
||||
Upstream: https://lore.kernel.org/linux-gpio/0eb5c26d-731c-4ebb-be34-76466cf57720@grenoble.cnrs.fr/
|
||||
---
|
||||
meson.build | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index c030b50..fed612f 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# SPDX-FileCopyrightText: 2026 Qualcomm Technologies, Inc. and/or its subsidiaries
|
||||
|
||||
-project('libgpiod', ['c', 'cpp'],
|
||||
+project('libgpiod', 'c',
|
||||
version: '2.3.1',
|
||||
license: 'LGPL-2.1-or-later',
|
||||
default_options: [
|
||||
@@ -56,6 +56,10 @@ opt_dbus = get_option('dbus')
|
||||
opt_introspection = get_option('introspection')
|
||||
opt_systemd = get_option('systemd')
|
||||
|
||||
+if opt_bindings_cxx.allowed()
|
||||
+ add_languages('cpp')
|
||||
+endif
|
||||
+
|
||||
if get_option('profiling')
|
||||
profiling_c_args = ['-fprofile-arcs', '-ftest-coverage']
|
||||
profiling_link_args = ['-lgcov']
|
||||
--
|
||||
2.43.0
|
||||
|
||||
48
package/libgpiod2/Config.in
Normal file
48
package/libgpiod2/Config.in
Normal file
@@ -0,0 +1,48 @@
|
||||
config BR2_PACKAGE_LIBGPIOD2
|
||||
bool "libgpiod2"
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
|
||||
depends on !BR2_PACKAGE_LIBGPIOD
|
||||
help
|
||||
This is a C library that abstracts the GPIO character
|
||||
device operations on linux.
|
||||
|
||||
This package is the continuation of the libgpiod package
|
||||
for versions 2.0 and above.
|
||||
|
||||
Note that a kernel of 5.10 or above is required for the
|
||||
ioctls to work.
|
||||
|
||||
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
|
||||
|
||||
if BR2_PACKAGE_LIBGPIOD2
|
||||
|
||||
config BR2_PACKAGE_LIBGPIOD2_DBUS
|
||||
bool "install dbus-server and client"
|
||||
depends on BR2_PACKAGE_HAS_UDEV # libgudev
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libgudev
|
||||
depends on BR2_USE_MMU # libgudev
|
||||
depends on BR2_USE_WCHAR # libgudev
|
||||
select BR2_PACKAGE_LIBGUDEV
|
||||
help
|
||||
Include dbus-server and client for managing GPIOs.
|
||||
|
||||
comment "libgpiod2 dbus needs udev /dev management"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_PACKAGE_HAS_UDEV
|
||||
|
||||
comment "libgpiod2 dbus needs a toolchain w/ threads, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_LIBGPIOD2_TOOLS
|
||||
bool "install tools"
|
||||
help
|
||||
Include a set of command-line tools for managing GPIOs.
|
||||
|
||||
endif
|
||||
|
||||
comment "libgpiod2 needs kernel headers >= 5.10"
|
||||
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
|
||||
|
||||
comment "libgpiod2 is incompatible with libgpiod"
|
||||
depends on BR2_PACKAGE_LIBGPIOD
|
||||
4
package/libgpiod2/libgpiod2.hash
Normal file
4
package/libgpiod2/libgpiod2.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From https://www.kernel.org/pub/software/libs/libgpiod/sha256sums.asc
|
||||
sha256 e3a358a90a9204ff16f92b6f4028ed91460b1926f10589eb54b3566484650a30 libgpiod-2.3.1.tar.xz
|
||||
# Hash for license file
|
||||
sha256 f646ad5159efb51c1130a4b43c31f0759750b1e254d2acf510f368ee2e2085c3 COPYING
|
||||
47
package/libgpiod2/libgpiod2.mk
Normal file
47
package/libgpiod2/libgpiod2.mk
Normal file
@@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
#
|
||||
# libgpiod2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Be careful when bumping versions.
|
||||
# Dependency on kernel header versions may change.
|
||||
LIBGPIOD2_VERSION = 2.3.1
|
||||
LIBGPIOD2_SOURCE = libgpiod-$(LIBGPIOD2_VERSION).tar.xz
|
||||
LIBGPIOD2_SITE = https://www.kernel.org/pub/software/libs/libgpiod
|
||||
LIBGPIOD2_LICENSE = LGPL-2.1+
|
||||
LIBGPIOD2_LICENSE_FILES = COPYING
|
||||
LIBGPIOD2_INSTALL_STAGING = YES
|
||||
LIBGPIOD2_DEPENDENCIES = host-pkgconf
|
||||
LIBGPIOD2_CONF_OPTS = \
|
||||
-Dbindings-python=disabled \
|
||||
-Dexamples=disabled \
|
||||
-Dtests=disabled
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGPIOD2_DBUS),y)
|
||||
LIBGPIOD2_CONF_OPTS += -Ddbus=enabled
|
||||
LIBGPIOD2_DEPENDENCIES += libgudev
|
||||
else
|
||||
LIBGPIOD2_CONF_OPTS += -Ddbus=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGPIOD2_TOOLS),y)
|
||||
LIBGPIOD2_CONF_OPTS += -Dtools=enabled
|
||||
else
|
||||
LIBGPIOD2_CONF_OPTS += -Dtools=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBEDIT),y)
|
||||
LIBGPIOD2_DEPENDENCIES += libedit
|
||||
LIBGPIOD2_CONF_OPTS += -Dgpioset-interactive=enabled
|
||||
else
|
||||
LIBGPIOD2_CONF_OPTS += -Dgpioset-interactive=disabled
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
||||
LIBGPIOD2_CONF_OPTS += -Dbindings-cxx=enabled
|
||||
else
|
||||
LIBGPIOD2_CONF_OPTS += -Dbindings-cxx=disabled
|
||||
endif
|
||||
|
||||
$(eval $(meson-package))
|
||||
Reference in New Issue
Block a user