On 4/11/25 18:00, Jan Kiszka wrote:
On 04.11.25 17:27, Philippe Mathieu-Daudé wrote:
On 4/11/25 15:45, Jan Kiszka wrote:
From: Jan Kiszka <[email protected]>
As an eMMC block device image may consist of more than just the user
data partition, provide a helper script that can compose the image from
boot partitions, an RPMB partition and the user data image. The script
also does the required size validation and/or rounding.
Signed-off-by: Jan Kiszka <[email protected]>
---
Still:
$ dash scripts/mkemmc.sh -b firmware.img -r /dev/zero:2MB os.img emmc.img
^^
User error ;-). This must be just "...:2M".
Per the doc:
+.. code-block:: console
+
+ scripts/mkemmc.sh -b firmware.img -r /dev/zero:2MB os.img emmc.img
(I'll update it)
Invalid value '2MB' specified for /dev/zero image size.
scripts/mkemmc.sh: 170: [: Illegal number:
Creating eMMC image
Boot partition 1 and 2: 128K each
scripts/mkemmc.sh: 192: [: Illegal number:
User data: 4 bytes
$ bash scripts/mkemmc.sh -b firmware.img -r /dev/zero:2MB os.img emmc.img
Invalid value '2MB' specified for /dev/zero image size.
scripts/mkemmc.sh: line 170: [: : integer expression expected
Creating eMMC image
Boot partition 1 and 2: 128K each
scripts/mkemmc.sh: line 192: [: : integer expression expected
User data: 4 bytes
But now the file is generated :)
...which is actually a bug as well: We are not terminating the script
inside the process_size function when calling "exit" there. Deviates
from the behavior under Linux. Sigh.
If you have a diff I can test & squash.