diff options
Diffstat (limited to 'meta-openembedded/meta-filesystems/recipes-utils')
5 files changed, 86 insertions, 103 deletions
diff --git a/meta-openembedded/meta-filesystems/recipes-utils/ufs-tool/ufs-tool_git.bb b/meta-openembedded/meta-filesystems/recipes-utils/ufs-tool/ufs-tool_git.bb deleted file mode 100644 index 208ac3c58b..0000000000 --- a/meta-openembedded/meta-filesystems/recipes-utils/ufs-tool/ufs-tool_git.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Tool to access UFS (Universal Flash Storage) devices" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -PV = "1.3+git${SRCPV}" - -BRANCH ?= "dev" - -SRCREV = "8b00e33003b57d7071943f63863fcf8cc48d5be9" - -SRC_URI = "git://github.com/westerndigitalcorporation/ufs-tool.git;protocol=git;branch=${BRANCH}" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" CFLAGS="${CFLAGS}"" - -do_configure() { - sed -i -e "s|-static$||g" ${S}/Makefile -} -do_install() { - install -d ${D}${bindir}/ - install -c -m 755 ${S}/ufs-tool ${D}${bindir}/ -} diff --git a/meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch b/meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch new file mode 100644 index 0000000000..e69a3cf1ff --- /dev/null +++ b/meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch @@ -0,0 +1,54 @@ +From 6cf6f5b9c39dfd0d46f2069c3baeab92ae980367 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Dec 2019 00:58:13 -0800 +Subject: [PATCH] Replace u_intXX_t with kernel typedefs + +u_intXX_t requires including sys/types.h which might not work in kernel +code, if this header is used in a kernel module + +Fixes +| In file included from ufs.c:16: +| In file included from ./ufs.h:9: +| ./scsi_bsg_util.h:131:2: error: unknown type name 'u_int16_t'; did you mean 'uint16_t'? +| u_int16_t result; +| ^~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/westerndigitalcorporation/ufs-utils/pull/23] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + scsi_bsg_util.h | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/scsi_bsg_util.h b/scsi_bsg_util.h +index 3f8a482..497c3ae 100644 +--- a/scsi_bsg_util.h ++++ b/scsi_bsg_util.h +@@ -121,15 +121,15 @@ struct ufs_bsg_reply { + #endif /* SCSI_BSG_UFS_H.*/ + + struct rpmb_frame { +- u_int8_t stuff[196]; +- u_int8_t key_mac[32]; +- u_int8_t data[256]; +- u_int8_t nonce[16]; +- u_int32_t write_counter; +- u_int16_t addr; +- u_int16_t block_count; +- u_int16_t result; +- u_int16_t req_resp; ++ __u8 stuff[196]; ++ __u8 key_mac[32]; ++ __u8 data[256]; ++ __u8 nonce[16]; ++ __u32 write_counter; ++ __u16 addr; ++ __u16 block_count; ++ __u16 result; ++ __u16 req_resp; + }; + + #define BSG_REPLY_SZ (sizeof(struct ufs_bsg_reply)) +-- +2.24.1 + diff --git a/meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb b/meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb new file mode 100644 index 0000000000..5fdd089aef --- /dev/null +++ b/meta-openembedded/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb @@ -0,0 +1,32 @@ +SUMMARY = "Tool to access UFS (Universal Flash Storage) devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +PV = "1.6+git${SRCPV}" + +BRANCH ?= "dev" + +SRCREV = "a3cf93b66f4606a46354cf884d24aa966661f848" + +SRC_URI = "git://github.com/westerndigitalcorporation/ufs-utils.git;protocol=git;branch=${BRANCH} \ + file://0001-Replace-u_intXX_t-with-kernel-typedefs.patch \ +" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" CFLAGS="${CFLAGS}"" + +CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__ -D_GNU_SOURCE" + +do_configure() { + sed -i -e "s|-static$||g" ${S}/Makefile +} + +do_install() { + install -D -m 755 ${S}/ufs-utils ${D}${bindir}/ufs-utils +} + +PROVIDES += "ufs-tool" + +RPROVIDES_${PN} += "ufs-tool" + diff --git a/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-build-Check-for-sync_file_range-libc-function.patch b/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-build-Check-for-sync_file_range-libc-function.patch deleted file mode 100644 index b5071aea6a..0000000000 --- a/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/0001-build-Check-for-sync_file_range-libc-function.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 1a4c9ebbb8731f2e3631d77b7eeaf3c373141d88 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 31 Jan 2018 21:28:53 -0800 -Subject: [PATCH] build: Check for sync_file_range libc function - -glibc 2.27 now has sync_file_range() - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - include/builddefs.in | 1 + - io/Makefile | 5 ++++- - io/io.h | 2 +- - io/sync_file_range.c | 3 +++ - 4 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/include/builddefs.in b/include/builddefs.in -index d38dc7e..706eca6 100644 ---- a/include/builddefs.in -+++ b/include/builddefs.in -@@ -94,6 +94,7 @@ HAVE_FIEMAP = @have_fiemap@ - HAVE_PREADV = @have_preadv@ - HAVE_PWRITEV2 = @have_pwritev2@ - HAVE_COPY_FILE_RANGE = @have_copy_file_range@ -+HAVE_NR_COPY_FILE_RANGE = @have_nr_copy_file_range@ - HAVE_SYNC_FILE_RANGE = @have_sync_file_range@ - HAVE_SYNCFS = @have_syncfs@ - HAVE_READDIR = @have_readdir@ -diff --git a/io/Makefile b/io/Makefile -index 484e2b5..2751dcb 100644 ---- a/io/Makefile -+++ b/io/Makefile -@@ -53,10 +53,13 @@ else - LSRCFILES += fiemap.c - endif - --ifeq ($(HAVE_COPY_FILE_RANGE),yes) -+ifeq ($(HAVE_NR_COPY_FILE_RANGE),yes) - CFILES += copy_file_range.c -+LCFLAGS += -DHAVE_NR_COPY_FILE_RANGE -+ifeq ($(HAVE_COPY_FILE_RANGE),yes) - LCFLAGS += -DHAVE_COPY_FILE_RANGE - endif -+endif - - ifeq ($(HAVE_SYNC_FILE_RANGE),yes) - CFILES += sync_file_range.c -diff --git a/io/io.h b/io/io.h -index 6469179..678b3d7 100644 ---- a/io/io.h -+++ b/io/io.h -@@ -146,7 +146,7 @@ extern void fiemap_init(void); - #define fiemap_init() do { } while (0) - #endif - --#ifdef HAVE_COPY_FILE_RANGE -+#if defined(HAVE_NR_COPY_FILE_RANGE) && !defined(HAVE_COPY_FILE_RANGE) - extern void copy_range_init(void); - #else - #define copy_range_init() do { } while (0) -diff --git a/io/sync_file_range.c b/io/sync_file_range.c -index 30bbc93..6c49d73 100644 ---- a/io/sync_file_range.c -+++ b/io/sync_file_range.c -@@ -4,6 +4,7 @@ - * All Rights Reserved. - */ - -+#ifndef HAVE_COPY_FILE_RANGE - #include "command.h" - #include "input.h" - #include "init.h" -@@ -92,3 +93,5 @@ sync_range_init(void) - - add_command(&sync_range_cmd); - } -+ -+#endif diff --git a/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_5.2.1.bb b/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_5.2.1.bb index 5ab1d028fc..34b3386405 100644 --- a/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_5.2.1.bb +++ b/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_5.2.1.bb @@ -8,7 +8,6 @@ LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=74274e8a218423e49eefdea80bc55038 DEPENDS = "util-linux util-linux-native" SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \ file://remove_flags_from_build_flags.patch \ - file://0001-build-Check-for-sync_file_range-libc-function.patch \ file://0001-Check-for-MAP_SYNC-in-sys-mman.h.patch \ file://0002-include-include-xfs-linux.h-after-sys-mman.h.patch \ file://0001-support-usrmerge.patch \ |