summaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-utils/ufs-utils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-12-15 01:16:48 -0800
committerKhem Raj <raj.khem@gmail.com>2019-12-15 21:08:54 -0800
commit0e5d85318dbf52434952ed09d5f8ae43320fed09 (patch)
treef1947d9959df62b44720890c5a59953bbd430717 /meta-filesystems/recipes-utils/ufs-utils
parente18d8c957034908f27350e6ffcae2a3d05a4387b (diff)
downloadmeta-openembedded-0e5d85318dbf52434952ed09d5f8ae43320fed09.tar.gz
ufs-utils: Renames from ufs-tool
Add a patch to fix build with musl/mips64 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-filesystems/recipes-utils/ufs-utils')
-rw-r--r--meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch54
-rw-r--r--meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb32
2 files changed, 86 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch b/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch
new file mode 100644
index 000000000..e69a3cf1f
--- /dev/null
+++ b/meta-filesystems/recipes-utils/ufs-utils/ufs-utils/0001-Replace-u_intXX_t-with-kernel-typedefs.patch
@@ -0,0 +1,54 @@
1From 6cf6f5b9c39dfd0d46f2069c3baeab92ae980367 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 15 Dec 2019 00:58:13 -0800
4Subject: [PATCH] Replace u_intXX_t with kernel typedefs
5
6u_intXX_t requires including sys/types.h which might not work in kernel
7code, if this header is used in a kernel module
8
9Fixes
10| In file included from ufs.c:16:
11| In file included from ./ufs.h:9:
12| ./scsi_bsg_util.h:131:2: error: unknown type name 'u_int16_t'; did you mean 'uint16_t'?
13| u_int16_t result;
14| ^~~~~~~~~
15
16Upstream-Status: Submitted [https://github.com/westerndigitalcorporation/ufs-utils/pull/23]
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 scsi_bsg_util.h | 18 +++++++++---------
21 1 file changed, 9 insertions(+), 9 deletions(-)
22
23diff --git a/scsi_bsg_util.h b/scsi_bsg_util.h
24index 3f8a482..497c3ae 100644
25--- a/scsi_bsg_util.h
26+++ b/scsi_bsg_util.h
27@@ -121,15 +121,15 @@ struct ufs_bsg_reply {
28 #endif /* SCSI_BSG_UFS_H.*/
29
30 struct rpmb_frame {
31- u_int8_t stuff[196];
32- u_int8_t key_mac[32];
33- u_int8_t data[256];
34- u_int8_t nonce[16];
35- u_int32_t write_counter;
36- u_int16_t addr;
37- u_int16_t block_count;
38- u_int16_t result;
39- u_int16_t req_resp;
40+ __u8 stuff[196];
41+ __u8 key_mac[32];
42+ __u8 data[256];
43+ __u8 nonce[16];
44+ __u32 write_counter;
45+ __u16 addr;
46+ __u16 block_count;
47+ __u16 result;
48+ __u16 req_resp;
49 };
50
51 #define BSG_REPLY_SZ (sizeof(struct ufs_bsg_reply))
52--
532.24.1
54
diff --git a/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb b/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb
new file mode 100644
index 000000000..5fdd089ae
--- /dev/null
+++ b/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Tool to access UFS (Universal Flash Storage) devices"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
4
5PV = "1.6+git${SRCPV}"
6
7BRANCH ?= "dev"
8
9SRCREV = "a3cf93b66f4606a46354cf884d24aa966661f848"
10
11SRC_URI = "git://github.com/westerndigitalcorporation/ufs-utils.git;protocol=git;branch=${BRANCH} \
12 file://0001-Replace-u_intXX_t-with-kernel-typedefs.patch \
13"
14
15S = "${WORKDIR}/git"
16
17EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" CFLAGS="${CFLAGS}""
18
19CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__ -D_GNU_SOURCE"
20
21do_configure() {
22 sed -i -e "s|-static$||g" ${S}/Makefile
23}
24
25do_install() {
26 install -D -m 755 ${S}/ufs-utils ${D}${bindir}/ufs-utils
27}
28
29PROVIDES += "ufs-tool"
30
31RPROVIDES_${PN} += "ufs-tool"
32