public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix rpi targets build on Bullseye
@ 2022-03-15 16:11 Anton Mikanovich
  2022-03-15 16:11 ` [PATCH 1/2] Revert "Revert "isar-init-build-env: Add /sbin to PATH"" Anton Mikanovich
  2022-03-15 16:11 ` [PATCH 2/2] rpi-sdimg: Limit volume id value Anton Mikanovich
  0 siblings, 2 replies; 3+ messages in thread
From: Anton Mikanovich @ 2022-03-15 16:11 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Fix mkfs.vfat related build issues reported by Vijai.

Anton Mikanovich (2):
  Revert "Revert "isar-init-build-env: Add /sbin to PATH""
  rpi-sdimg: Limit volume id value

 isar-init-build-env                 | 4 ++++
 meta-isar/classes/rpi-sdimg.bbclass | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

-- 
2.17.1


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

* [PATCH 1/2] Revert "Revert "isar-init-build-env: Add /sbin to PATH""
  2022-03-15 16:11 [PATCH 0/2] Fix rpi targets build on Bullseye Anton Mikanovich
@ 2022-03-15 16:11 ` Anton Mikanovich
  2022-03-15 16:11 ` [PATCH 2/2] rpi-sdimg: Limit volume id value Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2022-03-15 16:11 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Image prepare tools like parted and mkfs.vfat from rpi-sdimg bbclass
can't be found in bullseye chroot because /sbin is not exported into
PATH by default. Add /sbin manually to fix the issue.

This should be reverted after replaced rpi-sdimg.bbclass by WIC.

This reverts commit d0bc682ee81da11f4b939165a4d4383af7ed99de.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 isar-init-build-env | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/isar-init-build-env b/isar-init-build-env
index 85fb82f..f3d1b6b 100755
--- a/isar-init-build-env
+++ b/isar-init-build-env
@@ -57,4 +57,8 @@ export ISARROOT
 }
 unset ISARROOT
 
+# wic executes mkdosfs
+PATH=/sbin:$PATH
+export PATH
+
 [ -z "$BUILDDIR" ] || cd "$BUILDDIR"
-- 
2.17.1


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

* [PATCH 2/2] rpi-sdimg: Limit volume id value
  2022-03-15 16:11 [PATCH 0/2] Fix rpi targets build on Bullseye Anton Mikanovich
  2022-03-15 16:11 ` [PATCH 1/2] Revert "Revert "isar-init-build-env: Add /sbin to PATH"" Anton Mikanovich
@ 2022-03-15 16:11 ` Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2022-03-15 16:11 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

The volume name should be up to 11 characters long.
It is longer for some rpi targets and fails with the following error:

| mkfs.vfat: Label can be no longer than 11 characters
| mkfs.fat 4.2 (2021-01-31)
| WARNING: exit code 1 from a shell command.

Limit volume name length to fix the issue.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta-isar/classes/rpi-sdimg.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-isar/classes/rpi-sdimg.bbclass b/meta-isar/classes/rpi-sdimg.bbclass
index 1efc1c4..0b5a2a8 100644
--- a/meta-isar/classes/rpi-sdimg.bbclass
+++ b/meta-isar/classes/rpi-sdimg.bbclass
@@ -46,7 +46,11 @@ do_rpi_sdimg () {
     # Create a vfat image with boot files
     BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
     rm -f ${WORKDIR}/boot.img
-    mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
+
+    # Limit volume name length to be 11 characters long
+    VOLUME_NAME=$(echo "${BOOTDD_VOLUME_ID}" | sed 's/^\(.\{11\}\).*/\1/g')
+
+    mkfs.vfat -n "$VOLUME_NAME" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
     mcopy -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}/boot/* ::/
 
     # Burn Partitions
-- 
2.17.1


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

end of thread, other threads:[~2022-03-15 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15 16:11 [PATCH 0/2] Fix rpi targets build on Bullseye Anton Mikanovich
2022-03-15 16:11 ` [PATCH 1/2] Revert "Revert "isar-init-build-env: Add /sbin to PATH"" Anton Mikanovich
2022-03-15 16:11 ` [PATCH 2/2] rpi-sdimg: Limit volume id value Anton Mikanovich

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