Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
From 3d198be196bdc59ba332b87d8c2959de0b9160d2 Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
Date: Sat, 20 Jan 2024 13:29:28 +0100
|
||||
Subject: [PATCH] Provide replacement function for strerror_l()
|
||||
|
||||
strerror_l() is not implemented in some C libraries, such as uClibc,
|
||||
so let's provide a simple replacement define that falls back on
|
||||
strerror() in utils.h header and include it where missing.
|
||||
|
||||
Upstream: N/A since it's due uclibc only
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
[Giulio: ported to version 3.0, 3.1 and 3.5]
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
src/utils/dev_utils.c | 1 +
|
||||
src/utils/module.c | 1 +
|
||||
src/utils/utils.h | 4 ++++
|
||||
4 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e5d65d8b..507fa854 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -123,6 +123,8 @@ AC_CHECK_HEADERS([dlfcn.h string.h unistd.h sys/fcntl.h sys/ioctl.h linux/random
|
||||
[LIBBLOCKDEV_SOFT_FAILURE([Header file $ac_header not found.])],
|
||||
[])
|
||||
|
||||
+AC_CHECK_FUNCS([strerror_l])
|
||||
+
|
||||
AC_ARG_WITH([escrow],
|
||||
AS_HELP_STRING([--with-escrow], [support escrow @<:@default=yes@:>@]),
|
||||
[],
|
||||
diff --git a/src/utils/dev_utils.c b/src/utils/dev_utils.c
|
||||
index 89a54b4c..b4be5b44 100644
|
||||
--- a/src/utils/dev_utils.c
|
||||
+++ b/src/utils/dev_utils.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "dev_utils.h"
|
||||
+#include "utils.h"
|
||||
|
||||
/**
|
||||
* bd_utils_dev_utils_error_quark: (skip)
|
||||
diff --git a/src/utils/module.c b/src/utils/module.c
|
||||
index 11e139f8..c8b124e0 100644
|
||||
--- a/src/utils/module.c
|
||||
+++ b/src/utils/module.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "module.h"
|
||||
#include "exec.h"
|
||||
#include "logging.h"
|
||||
+#include "utils.h"
|
||||
|
||||
|
||||
/**
|
||||
diff --git a/src/utils/utils.h b/src/utils/utils.h
|
||||
index 801a8b6e..b2bdf0d0 100644
|
||||
--- a/src/utils/utils.h
|
||||
+++ b/src/utils/utils.h
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "dbus.h"
|
||||
#include "logging.h"
|
||||
|
||||
+#if !defined(HAVE_STRERROR_L)
|
||||
+#define strerror_l(errnum, locale) strerror(errnum)
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* SECTION: utils
|
||||
* @short_description: library providing utility functions used by the blockdev library and its plugins
|
||||
--
|
||||
2.47.3
|
||||
|
||||
106
package/libblockdev/Config.in
Normal file
106
package/libblockdev/Config.in
Normal file
@@ -0,0 +1,106 @@
|
||||
config BR2_PACKAGE_LIBBLOCKDEV
|
||||
bool "libblockdev"
|
||||
depends on !BR2_STATIC_LIBS # kmod
|
||||
depends on BR2_USE_WCHAR # libglib2
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
|
||||
depends on BR2_USE_MMU # libglib2
|
||||
depends on BR2_PACKAGE_HAS_UDEV
|
||||
depends on BR2_ENABLE_LOCALE
|
||||
select BR2_PACKAGE_KMOD
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
|
||||
help
|
||||
libblockdev is a C library supporting GObject introspection
|
||||
for manipulation of block devices. It has a plugin-based
|
||||
architecture where each technology (like LVM, Btrfs, MD RAID,
|
||||
Swap,...) is implemented in a separate plugin, possibly with
|
||||
multiple implementations.
|
||||
|
||||
https://github.com/storaged-project/libblockdev/
|
||||
|
||||
if BR2_PACKAGE_LIBBLOCKDEV
|
||||
|
||||
comment "plugins"
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
|
||||
bool "crypto"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c
|
||||
select BR2_PACKAGE_CRYPTSETUP
|
||||
select BR2_PACKAGE_KEYUTILS
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_FS
|
||||
bool "filesystem"
|
||||
depends on BR2_ENABLE_LOCALE # parted
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # parted
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
|
||||
select BR2_PACKAGE_PARTED
|
||||
select BR2_PACKAGE_E2FSPROGS
|
||||
|
||||
comment "filesystem plugin needs a toolchain w/ locale, gcc >= 5"
|
||||
depends on !BR2_ENABLE_LOCALE || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_LOOP
|
||||
bool "loop"
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_LVM2
|
||||
bool "lvm2"
|
||||
depends on BR2_ENABLE_LOCALE # parted
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # parted
|
||||
select BR2_PACKAGE_JSON_GLIB
|
||||
select BR2_PACKAGE_PARTED
|
||||
select BR2_PACKAGE_LIBYAML
|
||||
select BR2_PACKAGE_LVM2
|
||||
|
||||
comment "lvm2 support needs a toolchain w/ locale, gcc >= 5"
|
||||
depends on !BR2_ENABLE_LOCALE || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_MDRAID
|
||||
bool "mdraid"
|
||||
select BR2_PACKAGE_LIBBYTESIZE
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_NVME
|
||||
bool "nvme"
|
||||
depends on BR2_USE_MMU # libnvme
|
||||
select BR2_PACKAGE_LIBNVME
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_PART
|
||||
bool "part"
|
||||
depends on BR2_ENABLE_LOCALE # parted
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # parted
|
||||
select BR2_PACKAGE_PARTED
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
|
||||
|
||||
comment "part plugin needs a toolchain w/ locale, gcc >= 5"
|
||||
depends on !BR2_ENABLE_LOCALE || !BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_SMART
|
||||
bool "smart"
|
||||
depends on BR2_PACKAGE_HAS_UDEV # libatasmart
|
||||
select BR2_PACKAGE_LIBATASMART
|
||||
|
||||
comment "smart support needs udev /dev management"
|
||||
depends on !BR2_PACKAGE_HAS_UDEV
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_SMARTMONTOOLS
|
||||
bool "smartmontools"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # smartmontools
|
||||
depends on BR2_USE_MMU # smartmontools
|
||||
select BR2_PACKAGE_JSON_GLIB
|
||||
select BR2_PACKAGE_SMARTMONTOOLS # runtime
|
||||
|
||||
comment "smartmontools support needs a toolchain w/ C++"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_LIBBLOCKDEV_SWAP
|
||||
bool "swap"
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
|
||||
|
||||
endif
|
||||
|
||||
comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library, locale"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_PACKAGE_HAS_UDEV || BR2_STATIC_LIBS || \
|
||||
!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_ENABLE_LOCALE
|
||||
3
package/libblockdev/libblockdev.hash
Normal file
3
package/libblockdev/libblockdev.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 bccd30e6b5d11504de60d9889ff6a2a25b07a4ec8f04070f2387e168301b3e3a libblockdev-3.5.0.tar.gz
|
||||
sha256 97bdc721d875501b6243a456333fdfdb1ab64d31c4da2554de845caf4674b946 LICENSE
|
||||
98
package/libblockdev/libblockdev.mk
Normal file
98
package/libblockdev/libblockdev.mk
Normal file
@@ -0,0 +1,98 @@
|
||||
################################################################################
|
||||
#
|
||||
# libblockdev
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBBLOCKDEV_VERSION = 3.5.0
|
||||
LIBBLOCKDEV_SITE = https://github.com/storaged-project/libblockdev/releases/download/$(LIBBLOCKDEV_VERSION)
|
||||
LIBBLOCKDEV_LICENSE = LGPL-2.1
|
||||
LIBBLOCKDEV_LICENSE_FILES = LICENSE
|
||||
LIBBLOCKDEV_INSTALL_STAGING = YES
|
||||
LIBBLOCKDEV_DEPENDENCIES = host-pkgconf libglib2 kmod udev
|
||||
# 0001-Provide-replacement-function-for-strerror_l.patch
|
||||
LIBBLOCKDEV_AUTORECONF = YES
|
||||
|
||||
LIBBLOCKDEV_CONF_OPTS = \
|
||||
--disable-introspection \
|
||||
--with-loop \
|
||||
--without-btrfs \
|
||||
--without-dm \
|
||||
--without-escrow \
|
||||
--without-lvm_dbus \
|
||||
--without-mpath \
|
||||
--without-nvdimm \
|
||||
--without-python3 \
|
||||
--without-s390 \
|
||||
--without-tools
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_CRYPTO),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += cryptsetup keyutils
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-crypto
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-crypto
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_FS),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += e2fsprogs parted util-linux
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-fs
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-fs
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_LOOP),y)
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-loop
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-loop
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_LVM2),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += json-glib libyaml lvm2 parted
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-lvm
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-lvm
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_MDRAID),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += libbytesize
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-mdraid
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-mdraid
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_PART),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += parted util-linux
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-part
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-part
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_SMART),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += libatasmart
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-smart
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-smart
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_SMARTMONTOOLS),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += json-glib
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-smartmontools
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-smartmontools
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_SWAP),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += util-linux
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-swap
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-swap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_NVME),y)
|
||||
LIBBLOCKDEV_DEPENDENCIES += libnvme
|
||||
LIBBLOCKDEV_CONF_OPTS += --with-nvme
|
||||
else
|
||||
LIBBLOCKDEV_CONF_OPTS += --without-nvme
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user