0024-mmc-tools-new-version.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. diff --git a/package/mmc-utils/0001-fix-mmc-h-includes.patch b/package/mmc-utils/0001-fix-mmc-h-includes.patch
  2. deleted file mode 100644
  3. index 8d0b2eb..0000000
  4. --- a/package/mmc-utils/0001-fix-mmc-h-includes.patch
  5. +++ /dev/null
  6. @@ -1,41 +0,0 @@
  7. -mmc-utils: fix mmc.h includes
  8. -
  9. -Some toolchains include asm-generic/int-l64.h from their asm/types.h
  10. -file for certain 64-bit architectures. This causes a conflict between
  11. -types like this one:
  12. -
  13. -asm-generic/int-l64.h:28:25: error: conflicting types for '__s64'
  14. - typedef __signed__ long __s64;
  15. - ^
  16. -In file included from mmc.h:17:0,
  17. - from mmc_cmds.c:30:
  18. -asm-generic/int-ll64.h:29:44: note: previous declaration of '__s64' was
  19. -here
  20. - __extension__ typedef __signed__ long long __s64;
  21. -
  22. -[Ryan: added include of linux/types.h because mmc/ioctl.h does not
  23. - include it in kernel version before 3.4]
  24. -
  25. -Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  26. -Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
  27. ----
  28. - mmc.h | 4 +++-
  29. - 1 files changed, 3 insertions(+), 1 deletions(-)
  30. -diff --git a/mmc.h b/mmc.h
  31. -index 9871d62..2d54ec5 100644
  32. ---- a/mmc.h
  33. -+++ b/mmc.h
  34. -@@ -14,9 +14,12 @@
  35. - * Boston, MA 021110-1307, USA.
  36. - */
  37. -
  38. --#include <asm-generic/int-ll64.h>
  39. -+#include <linux/types.h>
  40. - #include <linux/mmc/ioctl.h>
  41. - #include <stdio.h>
  42. -+#ifndef _ASM_GENERIC_INT_L64_H
  43. -+#include <asm-generic/int-ll64.h>
  44. -+#endif
  45. -
  46. - #define CHECK(expr, msg, err_stmt) { if (expr) { fprintf(stderr, msg); err_stmt; } }
  47. -
  48. diff --git a/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch b/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch
  49. new file mode 100644
  50. index 0000000..7725f9c
  51. --- /dev/null
  52. +++ b/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch
  53. @@ -0,0 +1,37 @@
  54. +From 6208cc78f6efd1fafc4f5bc6a487247a383df80f Mon Sep 17 00:00:00 2001
  55. +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  56. +Date: Sat, 28 Sep 2019 20:44:52 +0200
  57. +Subject: [PATCH] mmc_cmds.c: fix build with gcc 4.9
  58. +
  59. +Fix following error with gcc 4.9:
  60. +
  61. +mmc_cmds.c:1918:9: error: missing braces around initializer [-Werror=missing-braces]
  62. + struct rpmb_frame frame_status = {0};
  63. +
  64. +Fixes:
  65. + - http://autobuild.buildroot.org/results/bf3b6f9f6ef39b99842b3c92495b7bf359c68158
  66. +
  67. +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  68. +[Upstream status: sent to linux-mmc@vger.kernel.org]
  69. +---
  70. + mmc_cmds.c | 4 +++-
  71. + 1 file changed, 3 insertions(+), 1 deletion(-)
  72. +
  73. +diff --git a/mmc_cmds.c b/mmc_cmds.c
  74. +index fb37189..6b09f26 100644
  75. +--- a/mmc_cmds.c
  76. ++++ b/mmc_cmds.c
  77. +@@ -1915,7 +1915,9 @@ static int do_rpmb_op(int fd,
  78. + u_int16_t rpmb_type;
  79. + struct mmc_ioc_multi_cmd *mioc;
  80. + struct mmc_ioc_cmd *ioc;
  81. +- struct rpmb_frame frame_status = {0};
  82. ++ struct rpmb_frame frame_status;
  83. ++
  84. ++ memset(&frame_status, 0, sizeof(frame_status));
  85. +
  86. + if (!frame_in || !frame_out || !out_cnt)
  87. + return -EINVAL;
  88. +--
  89. +2.23.0
  90. +
  91. diff --git a/package/mmc-utils/mmc-utils.hash b/package/mmc-utils/mmc-utils.hash
  92. new file mode 100644
  93. index 0000000..86c644f
  94. --- /dev/null
  95. +++ b/package/mmc-utils/mmc-utils.hash
  96. @@ -0,0 +1,3 @@
  97. +# Locally computed
  98. +sha256 df8876e0e671f502bb8872cecca3cc6d1055253fa314f3544d22829e129e024e mmc-utils-d40ec535b9d4e4c974e8c2fbfb422cd0348cc5e8.tar.gz
  99. +sha256 c3165393bcd710624e2909327a6fbeb736c47bdbe66de1c1a364ac7324d3e4d6 mmc.h
  100. diff --git a/package/mmc-utils/mmc-utils.mk b/package/mmc-utils/mmc-utils.mk
  101. index 7473a1b..8c264a4 100644
  102. --- a/package/mmc-utils/mmc-utils.mk
  103. +++ b/package/mmc-utils/mmc-utils.mk
  104. @@ -4,16 +4,21 @@
  105. #
  106. ################################################################################
  107. -MMC_UTILS_VERSION = 2cb6695e8dec00d887bdd5309d1b57d836fcd214
  108. +MMC_UTILS_VERSION = d40ec535b9d4e4c974e8c2fbfb422cd0348cc5e8
  109. MMC_UTILS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
  110. -MMC_UTILS_LICENSE = GPLv2
  111. +MMC_UTILS_LICENSE = GPL-2.0
  112. +MMC_UTILS_LICENSE_FILES = mmc.h
  113. +# override AM_CFLAGS as the project Makefile uses it to pass
  114. +# -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2, and the latter conflicts
  115. +# with the _FORTIFY_SOURCE that we pass when hardening options are
  116. +# enabled.
  117. define MMC_UTILS_BUILD_CMDS
  118. - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
  119. + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) AM_CFLAGS=
  120. endef
  121. define MMC_UTILS_INSTALL_TARGET_CMDS
  122. - $(INSTALL) -D -m 0755 $(@D)/mmc $(TARGET_DIR)/usr/bin/mmc
  123. + $(MAKE) -C $(@D) prefix=/usr DESTDIR=$(TARGET_DIR) install
  124. endef
  125. $(eval $(generic-package))