public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] ubifs-img: Force cross-compile usage
@ 2021-07-07 16:46 Anton Mikanovich
  2021-09-07 12:32 ` Anton Mikanovich
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Mikanovich @ 2021-07-07 16:46 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

mkfs.ubifs creates an empty image at armhf target with error:

>Value too large for defined data type

This error is throwed by readdir(glibc 2.28+) inside 32-bit QEMU on
64-bit kernel with ext4 filesystem. It happens because of incorrect
filesystem metadata storage if _FILE_OFFSET_BITS=64 is not set.

Upstream bugs
QEMU: https://gitlab.com/qemu-project/qemu/-/issues/263
glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=23960
kernel: https://bugzilla.kernel.org/show_bug.cgi?id=205957
maillist: https://lkml.org/lkml/2018/12/27/155

It was already fixed in mtd-utils v2.1.3 by enabling LFS
(commit e91700286ff531f344f4d9a1f1c96c501bfeadad), but until this
version will be released and backported to Debian we need a hotfix to
make Isar to use host arch mkfs.ubifs.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/ubifs-img.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/ubifs-img.bbclass b/meta/classes/ubifs-img.bbclass
index e422b46..7d78a79 100644
--- a/meta/classes/ubifs-img.bbclass
+++ b/meta/classes/ubifs-img.bbclass
@@ -12,6 +12,10 @@ UBIFS_IMAGE_FILE ?= "${IMAGE_FULLNAME}.ubifs.img"
 
 IMAGER_INSTALL += "mtd-utils"
 
+# glibc bug 23960 https://sourceware.org/bugzilla/show_bug.cgi?id=23960
+# should not use QEMU on armhf target with mkfs.ubifs < v2.1.3
+ISAR_CROSS_COMPILE_armhf = "1"
+
 # Generate ubifs filesystem image
 do_ubifs_image() {
     rm -f '${DEPLOY_DIR_IMAGE}/${UBIFS_IMAGE_FILE}'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-08  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:46 [PATCH] ubifs-img: Force cross-compile usage Anton Mikanovich
2021-09-07 12:32 ` Anton Mikanovich
2021-09-08  9:28   ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox