summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2021-01-06 09:01:55 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-01-06 09:01:55 +0100
commiteda23cf61abfd8ca1ab64730e6b901653e3b90ac (patch)
treeb7df9040471d79a1312595a4b3e788f8197ef3ae /patches
parentaf5dc42ed0415765e4cc50b9c3b0c0e8884e4395 (diff)
downloadptxdist-eda23cf61abfd8ca1ab64730e6b901653e3b90ac.tar.gz
ptxdist-eda23cf61abfd8ca1ab64730e6b901653e3b90ac.tar.xz
rauc: add upstream patch to build with old kernel headers
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/rauc-1.5/0001-src-mount.c-fix-build-with-kernel-4.14.patch38
-rw-r--r--patches/rauc-1.5/series4
2 files changed, 42 insertions, 0 deletions
diff --git a/patches/rauc-1.5/0001-src-mount.c-fix-build-with-kernel-4.14.patch b/patches/rauc-1.5/0001-src-mount.c-fix-build-with-kernel-4.14.patch
new file mode 100644
index 000000000..fa870776b
--- /dev/null
+++ b/patches/rauc-1.5/0001-src-mount.c-fix-build-with-kernel-4.14.patch
@@ -0,0 +1,38 @@
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 22 Dec 2020 11:52:31 +0100
+Subject: [PATCH] src/mount.c: fix build with kernel < 4.14
+
+Build with kernel headers < 4.14 fails since version 1.5.0 and
+https://github.com/rauc/rauc/commit/527bf2f7f746e0253f7843542e19cb0fa0c7c869:
+
+src/mount.c: In function 'r_setup_loop':
+src/mount.c:201:25: error: 'LOOP_SET_BLOCK_SIZE' undeclared (first use in this function)
+ looprc = ioctl(loopfd, LOOP_SET_BLOCK_SIZE, 4096);
+ ^
+
+Indeed, LOOP_SET_BLOCK_SIZE is only defined since
+https://github.com/torvalds/linux/commit/89e4fdecb51cf5535867026274bc97de9480ade5
+
+Fixes:
+ - http://autobuild.buildroot.org/results/829ae7ed66686c11a941ac99bd08a06f754affb4
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/mount.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/mount.c b/src/mount.c
+index 2e593ca85f2b..75acf4963780 100644
+--- a/src/mount.c
++++ b/src/mount.c
+@@ -11,6 +11,10 @@
+ #include "mount.h"
+ #include "utils.h"
+
++#ifndef LOOP_SET_BLOCK_SIZE
++#define LOOP_SET_BLOCK_SIZE 0x4C09
++#endif
++
+ gboolean r_mount_bundle(const gchar *source, const gchar *mountpoint, GError **error)
+ {
+ const unsigned long flags = MS_NODEV | MS_NOSUID | MS_RDONLY;
diff --git a/patches/rauc-1.5/series b/patches/rauc-1.5/series
new file mode 100644
index 000000000..a858c05a5
--- /dev/null
+++ b/patches/rauc-1.5/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-src-mount.c-fix-build-with-kernel-4.14.patch
+# 2b3e4a2d47a9d09e94d2a2d75e69f11c - git-ptx-patches magic