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,46 @@
From 4664b8dd3bc124c27b160720113339c1da97c2c4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 20 May 2024 17:50:51 -0700
Subject: [PATCH] nbd-client: Fix build on musl + gcc14
GCC-14 has promoted incompatible-pointer-types warning into error which is
now flagged especially with when building on musl
Fixes following error
| ../nbd-3.26.1/nbd-client.c: In function 'openunix':
| ../nbd-3.26.1/nbd-client.c:345:27: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types]
| 345 | if (connect(sock, &un_addr, sizeof(un_addr)) == -1) {
| | ^~~~~~~~
| | |
| | struct sockaddr_un *
| In file included from ../nbd-3.26.1/nbd-client.c:25:
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/nbd/3.26.1/recipe-sysroot/usr/include/sys/socket.h:386:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *'
| 386 | int connect (int, const struct sockaddr *, socklen_t);
| | ^~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream: https://github.com/NetworkBlockDevice/nbd/commit/4664b8dd3bc124c27b160720113339c1da97c2c4
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
nbd-client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nbd-client.c b/nbd-client.c
index f4e120f..bc79bdf 100644
--- a/nbd-client.c
+++ b/nbd-client.c
@@ -342,7 +342,7 @@ int openunix(const char *path) {
return -1;
};
- if (connect(sock, &un_addr, sizeof(un_addr)) == -1) {
+ if (connect(sock, (struct sockaddr*)&un_addr, sizeof(un_addr)) == -1) {
err_nonfatal("CONNECT failed");
close(sock);
return -1;
--
2.47.3

View File

@@ -0,0 +1,56 @@
From f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c Mon Sep 17 00:00:00 2001
From: Dave Jones <dave.jones@canonical.com>
Date: Thu, 14 Mar 2024 11:13:05 +0000
Subject: [PATCH] Fix the check & no cases of enable_manpages
Currently, running "configure --disable-manpages" while docbook2man *is*
installed results in the error "don't know what to do here" when it
should disable manpages.
There also appears to be a missing conditional at the start of the line;
there's closing un-matched ]) at the end of the line. Still, at this
point the check can be done in pure shell; no need for AC macros. I've
also removed the confusing m4_divert_text call on the check case. Not
sure why that was there, but it appears unnecessary.
Upstream: https://github.com/NetworkBlockDevice/nbd/commit/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
configure.ac | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5e1b53c..0dccafd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,7 +328,7 @@ AC_MSG_CHECKING([whether man pages are requested])
AC_ARG_ENABLE([manpages],
AS_HELP_STRING([--disable-manpages], [Do not install man pages]),
[],
- [: m4_divert_text([DEFAULTS], [enable_manpages=check])]
+ [enable_manpages=check]
)
AC_MSG_RESULT([$enable_manpages])
@@ -337,9 +337,14 @@ AS_IF([test "x$enable_manpages" != "xno"], [
])
AS_IF([test "x$enable_manpages" = "xyes" -a "x$DB2M" = "x"], [
AC_MSG_ERROR([docbook2man not found, but is required to build manpages])
- ],
- [test "x$DB2M" != "x"], [enable_manpages=yes],
- [AC_MSG_ERROR([don't know what to do here])])
+ ])
+if test "x$enable_manpages" = "xcheck"; then
+ if test "x$DB2M" = "x"; then
+ enable_manpages=no
+ else
+ enable_manpages=yes
+ fi
+fi
AC_MSG_CHECKING([whether to build manpages])
AC_MSG_RESULT([$enable_manpages])
--
2.47.3

View File

@@ -0,0 +1,56 @@
From f8d7d3dbf1ef2ef84c92fe375ebc8674a79e25c2 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Mon, 4 Mar 2024 11:24:57 +0100
Subject: [PATCH] fix generation of systemd service
The shell template is no longer required to generate man pages, so more
it to systemd/ and ship it in tarball.
Signed-off-by: Wouter Verhelst <w@uter.be>
Upstream: https://github.com/NetworkBlockDevice/nbd/commit/f8d7d3dbf1ef2ef84c92fe375ebc8674a79e25c2
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Bernd: rebased for 3.26.1 tarball which does not contain man/sh.tmpl]
---
systemd/Makefile.am | 6 +++---
systemd/sh.tmpl | 7 +++++++
3 files changed, 10 insertions(+), 10 deletions(-)
delete mode 100644 man/sh.tmpl
create mode 100644 systemd/sh.tmpl
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index f771dce..204f06f 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -5,11 +5,11 @@
noinst_DATA = nbd@.service
DISTCLEANFILES = nbd@.service
-EXTRA_DIST=nbd@.service.tmpl
+EXTRA_DIST=nbd@.service.tmpl sh.tmpl
nbd@.service: nbd@.service.sh
sh nbd@.service.sh > nbd@.service
-nbd@.service.sh.in: nbd@.service.tmpl ../man/sh.tmpl
- cat ../man/sh.tmpl nbd@.service.tmpl > nbd@.service.sh.in
+nbd@.service.sh.in: nbd@.service.tmpl sh.tmpl
+ cat sh.tmpl nbd@.service.tmpl > nbd@.service.sh.in
echo EOF >> nbd@.service.sh.in
diff --git a/systemd/sh.tmpl b/systemd/sh.tmpl
new file mode 100644
index 0000000..d97aa3f
--- /dev/null
+++ b/systemd/sh.tmpl
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+sysconfdir=@sysconfdir@
+
+cat <<EOF
--
2.47.3

35
package/nbd/Config.in Normal file
View File

@@ -0,0 +1,35 @@
config BR2_PACKAGE_NBD
bool "nbd"
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU
select BR2_PACKAGE_LIBGLIB2
help
NBD is a set of utilities to configure network block devices,
allowing access to remote block devices over TCP/IP network.
http://nbd.sf.net/
if BR2_PACKAGE_NBD
config BR2_PACKAGE_NBD_CLIENT
bool "nbd client"
default y
help
The client part of NBD.
config BR2_PACKAGE_NBD_SERVER
bool "nbd server"
help
The server part of NBD.
config BR2_PACKAGE_NBD_TRDUMP
bool "nbd trdump"
help
Utility to dump server logs in human-readable form.
endif
comment "nbd needs a toolchain w/ wchar, threads"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

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

@@ -0,0 +1,3 @@
# Locally calculated
sha256 f0cf509fa5b20b1a07f7904eb637e9b47d3e30b6ed6f00075af5d8b701c78fef nbd-3.26.1.tar.xz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

47
package/nbd/nbd.mk Normal file
View File

@@ -0,0 +1,47 @@
################################################################################
#
# nbd
#
################################################################################
NBD_VERSION = 3.26.1
NBD_SOURCE = nbd-$(NBD_VERSION).tar.xz
NBD_SITE = https://github.com/NetworkBlockDevice/nbd/releases/download/nbd-$(NBD_VERSION)
NBD_CONF_OPTS = --enable-lfs
NBD_DEPENDENCIES = host-bison host-pkgconf libglib2
# 0002-Fix-the-check-no-cases-of-enable_manpages.patch
# 0003-fix-generation-of-systemd-service.patch
NBD_AUTORECONF = YES
# needed for autoreconf
NBD_DEPENDENCIES += host-autoconf-archive
NBD_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
NBD_LICENSE = GPL-2.0
NBD_LICENSE_FILES = COPYING
NBD_CPE_ID_VENDOR = network_block_device_project
NBD_CPE_ID_PRODUCT = network_block_device
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# We have linux/falloc.h
# but uClibc lacks fallocate(2) which is a glibc-ism
NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no
endif
ifneq ($(BR2_PACKAGE_NBD_CLIENT),y)
NBD_TOREMOVE += /usr/sbin/nbd-client
endif
ifneq ($(BR2_PACKAGE_NBD_SERVER),y)
NBD_TOREMOVE += /usr/bin/nbd-server
endif
ifneq ($(BR2_PACKAGE_NBD_TRDUMP),y)
NBD_TOREMOVE += /usr/bin/nbd-trdump
endif
define NBD_CLEANUP_AFTER_INSTALL
rm -f $(addprefix $(TARGET_DIR), $(NBD_TOREMOVE))
endef
NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL
$(eval $(autotools-package))