Skip to content

Makefile: add flash target#339

Merged
lool merged 3 commits intoqualcomm-linux:mainfrom
gagath:makefile-flash-target
Mar 26, 2026
Merged

Makefile: add flash target#339
lool merged 3 commits intoqualcomm-linux:mainfrom
gagath:makefile-flash-target

Conversation

@gagath
Copy link
Copy Markdown
Contributor

@gagath gagath commented Mar 26, 2026

Thanks to @abickett for the idea, this should allow Docker support for calling the flash recipe. README is updated to use the new target.

@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 26, 2026

One shortcoming is that the flash target depends on both UFS and sdcard images as we do not have a clear way to determine what we need for the target hardware. The dependency can be removed if we want to rely on users to generate the proper image themselves to win build time, but at the cost of more manual steps (for now).

This is needed either way to allow docker users to generate the flash artifacts.

@gagath gagath requested a review from lool March 26, 2026 08:53
Makefile Outdated
$(DEBOS_CMD) -t imagetype:sdcard $<

.PHONY: flash
flash: debos-recipes/qualcomm-linux-debian-flash.yaml dtbs.tar.gz disk-sdcard.img1 disk-ufs.img1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in practice, one doesn't need disk-sdcard and disk-ufs to build the flash assets, and I find it convenient to run the flash recipe with just dtbs.tar.gz around when working on that part of the recipes. Is there a way we could reconcile both goals of:

  • using make to build everything up to flash images
  • using make to build just the flash assets

Perhaps two targets?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree that only dtbs.tar.gz in needed to run the recipe as the images are required when flashing and not generating the files. I will just drop the image dependency as I was not happy with it in the first place either and only keep the dtb dependency.

gagath added 3 commits March 26, 2026 10:09
The *.img1 and *.img2 intermediate files are produced by the image
recipe but currently not properly tracked in the Makefile. Add proper
targets so that other recipes like the flash recipe can depend on img1
and have them generated if missing or accidentally removed.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
Track which recipe produces the dtbs.tar.gz artefact for consumption by
other targets.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
Introduce a new target that depends on previous artefacts to generate
call the flash recipe with proper arguments and docker support.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
@gagath gagath force-pushed the makefile-flash-target branch from 58decc0 to 238297b Compare March 26, 2026 09:10
@gagath gagath marked this pull request as ready for review March 26, 2026 09:11
@github-actions
Copy link
Copy Markdown

Test jobs for commit 58decc0

@github-actions
Copy link
Copy Markdown

Test Results

 2 files  ±0   6 suites  ±0   4m 12s ⏱️ ±0s
20 tests ±0  20 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 238297b. ± Comparison against base commit ddd8dc5.

@github-actions
Copy link
Copy Markdown

Test jobs for commit 238297b

@gagath gagath requested a review from lool March 26, 2026 11:16
@lool lool merged commit 58f0f76 into qualcomm-linux:main Mar 26, 2026
17 checks passed
@lool
Copy link
Copy Markdown
Contributor

lool commented Mar 26, 2026

Can we change the github workflow to call this?

@gagath
Copy link
Copy Markdown
Contributor Author

gagath commented Mar 26, 2026

Can we change the github workflow to call this?

#342

@gagath gagath deleted the makefile-flash-target branch March 26, 2026 12:55
@gagath gagath mentioned this pull request Apr 9, 2026
3 tasks
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