-
Notifications
You must be signed in to change notification settings - Fork 17
Dev/roliver/zero2w #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev/roliver/zero2w #113
Conversation
…ruft, remove DEMO_MODE," This partially reverts commit 8cf3e66.
'-s' causes img2simg to read its input in the SPARSE_READ_MODE_HOLE mode. SEEK_DATA / SEEK_HOLE are used to determine the location of any holes in the input file as these can be regarded as 'don't care' bytes rather than a run of 0s.
'oem led PWR 0' fails on 2W as there is only a single LED on the device.
@@ -249,7 +261,7 @@ fi | |||
mkdir -p /var/log/rpi-sb-provisioner/"${TARGET_DEVICE_SERIAL}"/ | |||
|
|||
# Fast path: If we've already generated the assets, just move to flashing. | |||
if [ ! -e "${RPI_SB_WORKDIR}/bootfs-temporary.simg" ] || | |||
if [ ! -e "${RPI_SB_WORKDIR}/bootfs-temporary.img" ] || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not sparse this one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We create the rootfs with mkfs.ext4 so the resulting file is sparse on the filesystem and we expect it to have lots of holes as the image has been up-sized to fill EMMC.
The bootfs goes through no such process as we're simply extracting the partition from the GOLD_MASTER_OS_FILE, mounting it, making some changes, unmounting it. The only gains from sparsing it would be to detect runs of zeros.
@@ -541,7 +541,7 @@ if [ ! -e "${RPI_SB_WORKDIR}/bootfs-temporary.simg" ] || | |||
|
|||
umount "${META_BOOTIMG_MOUNT_PATH}" | |||
rm -rf "${META_BOOTIMG_MOUNT_PATH}" | |||
img2simg "${TMP_DIR}"/bootfs-temporary.img "${RPI_SB_WORKDIR}"/bootfs-temporary.simg | |||
img2simg -s "${TMP_DIR}"/bootfs-temporary.img "${RPI_SB_WORKDIR}"/bootfs-temporary.simg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could swap from the dd/mkfs.fat combo above to mkfs.fat -C [dev] [block count], and get a sparse-layout file that would play nicely here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this should be possible to do.
It's whether or not we want to try to re-create pi-gen's FAT16/FAT32 policy and other filesystem settings that's the issue.
No description provided.