initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
From c93ad13ecd8ddfbb8bb3e4d5d5ad7f3f2c633db6 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 14 Nov 2021 12:37:16 +0100
|
||||
Subject: [PATCH] src/sg_dd.c: fix musl build
|
||||
|
||||
Fix the following build failure on musl raised since version 1.47 and
|
||||
https://github.com/doug-gilbert/sg3_utils/commit/f0195003bb0c66ba55084b2f7e0fe982f08c5675:
|
||||
|
||||
sg_dd.c: In function 'main':
|
||||
sg_dd.c:2402:17: error: unknown type name 'uint'; did you mean 'int'?
|
||||
2402 | uint off;
|
||||
| ^~~~
|
||||
| int
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/9ead59ffefefe2a4e3b94a153b3d23231736d882
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/doug-gilbert/sg3_utils/pull/7]
|
||||
---
|
||||
src/sg_dd.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/sg_dd.c b/src/sg_dd.c
|
||||
index 9d05c93..35e2423 100644
|
||||
--- a/src/sg_dd.c
|
||||
+++ b/src/sg_dd.c
|
||||
@@ -2399,7 +2399,7 @@ main(int argc, char * argv[])
|
||||
res = blocks * blk_sz;
|
||||
if (iflag.zero && iflag.ff && (blk_sz >= 4)) {
|
||||
uint32_t pos = (uint32_t)skip;
|
||||
- uint off;
|
||||
+ uint32_t off;
|
||||
|
||||
for (k = 0, off = 0; k < blocks; ++k, off += blk_sz, ++pos) {
|
||||
for (j = 0; j < (blk_sz - 3); j += 4)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 1e95d5b8c507a49f6d15d2795dc46d82b4d1ded0 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 16 Nov 2021 08:41:48 +0100
|
||||
Subject: [PATCH] configure.ac: fix uclibc-ng build
|
||||
|
||||
Fix the following build failure with uclibc-ng raised because SG_IO is
|
||||
not defined:
|
||||
|
||||
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: sg_dd.o: in function `sg_read_low.constprop.0':
|
||||
sg_dd.c:(.text+0xc6c): undefined reference to `sg_chk_n_print3'
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/38a0dfc70a21ce574368b7a485deb231f778b3e7
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/doug-gilbert/sg3_utils/pull/8]
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0a65d94..23378ad 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -107,7 +107,7 @@ case "${host}" in
|
||||
AC_DEFINE_UNQUOTED(HAVE_NVME, 1, [Found NVMe])
|
||||
check_for_getrandom
|
||||
CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO";;
|
||||
- *-*-linux-gnu* | *-*-linux*)
|
||||
+ *-*-linux-gnu* | *-*-linux* | *-*-uclinux-gnu* | *-*-uclinux*)
|
||||
AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux])
|
||||
check_for_linux_sg_v4_hdr
|
||||
check_for_getrandom
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
config BR2_PACKAGE_SG3_UTILS
|
||||
bool "sg3-utils"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
Low level utilities for devices that use a SCSI command set.
|
||||
This option install only libsgutils2 library not programs.
|
||||
|
||||
http://sg.danny.cz/sg/sg3_utils.html
|
||||
|
||||
if BR2_PACKAGE_SG3_UTILS
|
||||
|
||||
config BR2_PACKAGE_SG3_UTILS_PROGS
|
||||
bool "install programs"
|
||||
|
||||
endif
|
||||
|
||||
comment "sg3-utils needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
@@ -0,0 +1,6 @@
|
||||
# Locally calculated from download (no sig, hash)
|
||||
sha256 ddb0cab85fedd8b0db020f3e3f02f6967a055616bf16ea9d5c7408cde41472b2 sg3_utils-1.47.tar.xz
|
||||
|
||||
# Hash for license files
|
||||
sha256 d212debdb0a5d7754c977f6dc53bb6c88b4ace7ab784ddbccd06bb970adb1a37 COPYING
|
||||
sha256 8ddd1d82f2be2f5cbd5b5c3b5c2ee94a90d2ca7112958448da74dd78384fd96a BSD_LICENSE
|
||||
@@ -0,0 +1,58 @@
|
||||
################################################################################
|
||||
#
|
||||
# sg3_utils
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SG3_UTILS_VERSION = 1.47
|
||||
SG3_UTILS_SOURCE = sg3_utils-$(SG3_UTILS_VERSION).tar.xz
|
||||
SG3_UTILS_SITE = http://sg.danny.cz/sg/p
|
||||
SG3_UTILS_LICENSE = BSD-2-Clause (library)
|
||||
# Some utils progs are GPL-2.0+ licensed while others are BSD-3-Clause
|
||||
ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),y)
|
||||
SG3_UTILS_LICENSE += , GPL-2.0+ (programs), BSD-2-Clause (programs)
|
||||
endif
|
||||
SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE
|
||||
# We're patching configure.ac
|
||||
SG3_UTILS_AUTORECONF = YES
|
||||
|
||||
# install the libsgutils2 library
|
||||
SG3_UTILS_INSTALL_STAGING = YES
|
||||
|
||||
# Uses __atomic_fetch_add_4
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
SG3_UTILS_CONF_ENV += LIBS="-latomic"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
|
||||
define SG3_UTILS_REMOVE_PROGS
|
||||
for prog in \
|
||||
compare_and_write copy_results dd decode_sense \
|
||||
emc_trespass format get_config \
|
||||
get_lba_status ident inq logs luns map26 \
|
||||
map sgm_dd modes opcodes sgp_dd persist prevent \
|
||||
raw rbuf rdac read readcap read_block_limits \
|
||||
read_attr read_buffer read_long reassign referrals \
|
||||
rep_zones requests reset reset_wp rmsn rtpg safte sanitize \
|
||||
sat_identify sat_phy_event sat_read_gplog sat_set_features \
|
||||
scan senddiag ses ses_microcode start stpg sync test_rwbuf \
|
||||
timestamp turs unmap verify vpd write_buffer write_long \
|
||||
write_same write_verify wr_mode xcopy zone; do \
|
||||
$(RM) $(TARGET_DIR)/usr/bin/sg_$${prog} ; \
|
||||
done
|
||||
for prog in \
|
||||
logging_level mandat readcap ready satl start stop \
|
||||
temperature; do \
|
||||
$(RM) $(TARGET_DIR)/usr/bin/scsi_$${prog} ; \
|
||||
done
|
||||
for prog in \
|
||||
sginfo sgm_dd sgp_dd; do \
|
||||
$(RM) $(TARGET_DIR)/usr/bin/$${prog}; \
|
||||
done
|
||||
endef
|
||||
|
||||
SG3_UTILS_POST_INSTALL_TARGET_HOOKS += SG3_UTILS_REMOVE_PROGS
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user