[RFC,2/2] configs/ti_am62x_sk_defconfig: create the bmap image

Message ID 20240421095353.208034-3-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • Add support to genimage.sh for creating a bmap image
Related show

Commit Message

Dario Binacchi April 21, 2024, 9:53 a.m. UTC
The use of a bmap image allows for speeding up the writing of the
image to the SD card, as can be seen from the following results:

$time sudo dd if=output/images/sdcard.img of=/dev/sda
[sudo] password for dario:
655361+0 records in
655361+0 records out
335544832 bytes (336 MB, 320 MiB) copied, 49,1122 s, 6,8 MB/s

real	0m52,177s
user	0m0,022s
sys	0m0,017s

$time sudo bmaptool copy output/images/sdcard.img.gz /dev/sda
bmaptool: info: discovered bmap file 'sdcard.img.bmap'
bmaptool: info: block map format version 2.0
bmaptool: info: 81921 blocks of size 4096 (320.0 MiB), mapped 29339 blocks (114.6 MiB or 35.8%)
bmaptool: info: copying image 'sdcard.img.gz' to block device '/dev/sda' using bmap file 'sdcard.img.bmap'
bmaptool: info: 100% copied
bmaptool: info: synchronizing '/dev/sda'
bmaptool: info: copying time: 11.8s, copying speed 9.7 MiB/sec

real	0m11,885s
user	0m0,004s
sys	0m0,011s

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 configs/ti_am62x_sk_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index 5c7b97b3b0b1..708cb98f22d5 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -5,7 +5,7 @@  BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/common/am6xx/post-build.sh"
 BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -l am62x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg"
+BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg -b"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18"
@@ -44,6 +44,7 @@  BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
 BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_BMAP_TOOLS=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y