Skip to content

Conversation

bjdooks-ct
Copy link

Add the ability to build to an file for use with qemu and possibly other testing.
Set the uboot partition size to make it easier to then add a user partition after it

If we want to use the rest of the card for something else, like a filesystem
then pin the uImage at around 32M of size (the current loader isn't going
to try and load anything bigger anyway)

Signed-off-by: Ben Dooks <[email protected]>
sgdisk --clear -g --new=1:$(FWPAYLOAD_SECTORSTART):$(FWPAYLOAD_SECTOREND) --new=2:$(UIMAGE_SECTORSTART):0 --typecode=1:3000 --typecode=2:8300 $(SDDEVICE)
sgdisk --clear -g --new=1:$(FWPAYLOAD_SECTORSTART):$(FWPAYLOAD_SECTOREND) --new=2:$(UIMAGE_SECTORSTART):${UIMAGE_SECTOREND} --typecode=1:3000 --typecode=2:8300 $(SDDEVICE)

# flash-file and format-file are basically the same as the sdcard ones but aum to use a file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# flash-file and format-file are basically the same as the sdcard ones but aum to use a file
# flash-file and format-file are basically the same as the sdcard ones but aim to use a file

Being able to make an file of the output for testing under
qemu or similar is useful. Copy the card flashing and just
target an IMGFILE= parameteter.

Example:

dd if=/dev/zero of=output.img bs=1G count=8
make IMGFILE=output.img flash-file

Signed-off-by: Ben Dooks <[email protected]>
@bjdooks-ct bjdooks-ct force-pushed the bjdooks/allow-building-to-imgfile2 branch from 33dae76 to 228c52f Compare May 19, 2025 15:22
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