* [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14
@ 2020-12-22 11:10 Fabrice Fontaine
2020-12-23 9:09 ` Peter Korsgaard
2020-12-24 8:50 ` Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-12-22 11:10 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/829ae7ed66686c11a941ac99bd08a06f754affb4
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...c-mount.c-fix-build-with-kernel-4.14.patch | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 package/rauc/0001-src-mount.c-fix-build-with-kernel-4.14.patch
diff --git a/package/rauc/0001-src-mount.c-fix-build-with-kernel-4.14.patch b/package/rauc/0001-src-mount.c-fix-build-with-kernel-4.14.patch
new file mode 100644
index 0000000000..9604e8878a
--- /dev/null
+++ b/package/rauc/0001-src-mount.c-fix-build-with-kernel-4.14.patch
@@ -0,0 +1,43 @@
+From f73eefdbc0577b125f7d36f54a27d8e95af831dd Mon Sep 17 00:00:00 2001
+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>
+[Upstream status: https://github.com/rauc/rauc/pull/673]
+---
+ src/mount.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/mount.c b/src/mount.c
+index 2e593ca..75acf49 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;
+--
+2.29.2
+
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14
2020-12-22 11:10 [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14 Fabrice Fontaine
@ 2020-12-23 9:09 ` Peter Korsgaard
2020-12-23 12:15 ` Peter Korsgaard
2020-12-24 8:50 ` Peter Korsgaard
1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2020-12-23 9:09 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fixes:
> - http://autobuild.buildroot.org/results/829ae7ed66686c11a941ac99bd08a06f754affb4
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Thanks. I see that upstream mentions that this code will fail at runtime
with old kernels, so that is no good. Looking at the code I do see that
it explicitly ignores a failure to set the block size though.
I am not sure why it is so important to set to block size to 4k, and if
this is only for the new dm-verity based format.
I'll give upstream a bit of time to reply before handling this patch.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14
2020-12-23 9:09 ` Peter Korsgaard
@ 2020-12-23 12:15 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2020-12-23 12:15 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
>> Fixes:
>> - http://autobuild.buildroot.org/results/829ae7ed66686c11a941ac99bd08a06f754affb4
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> Thanks. I see that upstream mentions that this code will fail at runtime
> with old kernels, so that is no good. Looking at the code I do see that
> it explicitly ignores a failure to set the block size though.
> I am not sure why it is so important to set to block size to 4k, and if
> this is only for the new dm-verity based format.
> I'll give upstream a bit of time to reply before handling this patch.
Seems upstream was just confused and the fix is good, so:
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14
2020-12-22 11:10 [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14 Fabrice Fontaine
2020-12-23 9:09 ` Peter Korsgaard
@ 2020-12-24 8:50 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2020-12-24 8:50 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fixes:
> - http://autobuild.buildroot.org/results/829ae7ed66686c11a941ac99bd08a06f754affb4
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2020.02.x, 2020.08.x and 2020.11.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-24 8:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 11:10 [Buildroot] [PATCH 1/1] package/rauc: fix build with headers < 4.14 Fabrice Fontaine
2020-12-23 9:09 ` Peter Korsgaard
2020-12-23 12:15 ` Peter Korsgaard
2020-12-24 8:50 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.