Skip to content

Conversation

@lool
Copy link
Contributor

@lool lool commented Mar 31, 2025

Splits image generation in two steps, and generate images for 512B and 4096B sector sizes.

lool added 2 commits March 31, 2025 13:51
This reduces the time under QEMU and paves the way to generating multiple
images.

Signed-off-by: Loïc Minier <[email protected]>
@lool lool changed the title DRAFT: Generate images for 512B and 4096B sector sizes Generate images for 512B and 4096B sector sizes Apr 2, 2025
@lool
Copy link
Contributor Author

lool commented Apr 7, 2025

We discussed this with Nicolas, he suggested using 4Kn to name the image with a 4k sector size, inspired by Advanced Format, and I've proposed calling the two images -sdcard and -ufs which he is ok with.

lool added 3 commits April 7, 2025 12:10
Update docs and drop workaround script.

Signed-off-by: Loïc Minier <[email protected]>
Signed-off-by: Loïc Minier <[email protected]>
Improve logging with set -x in all shells; lose an useless subshell and
a level of indentation.

Signed-off-by: Loïc Minier <[email protected]>
@lool
Copy link
Contributor Author

lool commented Apr 7, 2025

I've manually downloaded and checked the resulting disk images as the build output didn't make it clear whether 4k or 512B sector size was being used. The resulting files were correct

$ fdisk -b 512 -l disk-sdcard.img
Disk disk-sdcard.img: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 784CEFE1-B4B7-484B-9EE6-8BF49866E064

Device             Start     End Sectors  Size Type
disk-sdcard.img1    8192 1056767 1048576  512M EFI System
disk-sdcard.img2 1064960 8388574 7323615  3.5G Linux root (ARM-64)


$ fdisk -b 4096 -l disk-ufs.img
Disk disk-ufs.img: 4 GiB, 4294967296 bytes, 1048576 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 8DFCB174-46FF-471F-BB4F-3A971BBCDF78

Device         Start     End Sectors  Size Type
disk-ufs.img1   1024  132095  131072  512M EFI System
disk-ufs.img2 133120 1048570  915451  3.5G Linux root (ARM-64)

@lool lool merged commit 52574b5 into qualcomm-linux:main Apr 8, 2025
3 checks passed
@lool lool deleted the image-gen branch May 28, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants