* [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
* Re: [PATCH] ubifs-img: Force cross-compile usage 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 0 siblings, 1 reply; 3+ messages in thread From: Anton Mikanovich @ 2021-09-07 12:32 UTC (permalink / raw) To: isar-users 07.07.2021 19:46, Anton Mikanovich wrote: > 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}' Applied to next. -- Anton Mikanovich Promwad Ltd. External service provider of ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn, Germany +49 (89) 122 67 24-0 Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ubifs-img: Force cross-compile usage 2021-09-07 12:32 ` Anton Mikanovich @ 2021-09-08 9:28 ` Henning Schild 0 siblings, 0 replies; 3+ messages in thread From: Henning Schild @ 2021-09-08 9:28 UTC (permalink / raw) To: Anton Mikanovich; +Cc: isar-users Am Tue, 7 Sep 2021 15:32:46 +0300 schrieb Anton Mikanovich <amikan@ilbers.de>: > 07.07.2021 19:46, Anton Mikanovich wrote: > > 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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fqemu-project%2Fqemu%2F-%2Fissues%2F263&data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7C58544763b9674583e74f08d971fb9f1b%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637666147790473401%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QGBXXojbDLbnFeHpmmL1eYLYfAh%2BBSi85qVeQ3o6KWY%3D&reserved=0 > > glibc: > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D23960&data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7C58544763b9674583e74f08d971fb9f1b%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637666147790483360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Mkdr%2Be%2F9BM6oZ8dexp8LPCfGl7kej67DPSUeRTGu6oE%3D&reserved=0 > > kernel: > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.kernel.org%2Fshow_bug.cgi%3Fid%3D205957&data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7C58544763b9674583e74f08d971fb9f1b%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637666147790483360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=aRHpKJw66su0djScsmDbTXh%2BJWzaN63UQ%2F64iHU2IBA%3D&reserved=0 > > maillist: > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2018%2F12%2F27%2F155&data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7C58544763b9674583e74f08d971fb9f1b%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637666147790483360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CPF6DmK8n3jGmXBChFxWjYhZpKc2K1Im4%2F5GVnb0Xhc%3D&reserved=0 > > > > 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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D23960&data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7C58544763b9674583e74f08d971fb9f1b%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637666147790483360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Mkdr%2Be%2F9BM6oZ8dexp8LPCfGl7kej67DPSUeRTGu6oE%3D&reserved=0 > > +# 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}' > > Applied to next. This is in fact super hacky and seems to assume that isar will not be running on an arm host. It further assumes that one can not possibly have mtd-utils >= 2.1.3 (which is wrong for bookworm, which we will add soon i assume). A cleaner solution would have been to backport the fix and rebuild mkfs.ubifs. Henning ^ 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