From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v2 2/2] rpi-sdimg: Limit volume id value
Date: Tue, 15 Mar 2022 21:40:06 +0300 [thread overview]
Message-ID: <20220315184006.2479-3-amikan@ilbers.de> (raw)
In-Reply-To: <20220315184006.2479-1-amikan@ilbers.de>
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..b13611b 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}" | cut -c -11)
+
+ 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
prev parent reply other threads:[~2022-03-15 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 18:40 [PATCH v2 0/2] Fix rpi targets build on Bullseye Anton Mikanovich
2022-03-15 18:40 ` [PATCH v2 1/2] Revert "Revert "isar-init-build-env: Add /sbin to PATH"" Anton Mikanovich
2022-03-16 5:06 ` Jan Kiszka
2022-03-16 5:10 ` Jan Kiszka
2022-03-16 8:41 ` Baurzhan Ismagulov
[not found] ` <3cca4fe9-d13c-2555-ea34-f52eb3d113ee@siemens.com>
2022-03-16 11:19 ` Jan Kiszka
2022-03-15 18:40 ` Anton Mikanovich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220315184006.2479-3-amikan@ilbers.de \
--to=amikan@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox