Skip to content

Conversation

@lool
Copy link
Contributor

@lool lool commented Sep 23, 2025

Consolidate logic for boards in a single place:

  • fix(ci): Don't hardcode list of boards in debos
  • feat(debos): Include all dtbs

Fixes: #144

@lool lool force-pushed the consolidate-board-support branch 5 times, most recently from aeb0d4a to 8c27119 Compare September 24, 2025 14:44
@lool
Copy link
Contributor Author

lool commented Sep 24, 2025

Another part that will be missing to be a bit more generic is to detect which boards (device trees) a kernel carries, and only build flat images for these boards. But that can land separately, this PR is already helping consolidating board definitions in a single place.

The flash debos recipe creates flash-ufs and flash-emmc files, use these
to select the artifacts to include in the UFS and eMMC tarballs.

Signed-off-by: Loïc Minier <[email protected]>
Having all dtbs available makes development easier and board support
filtering can happen when generating flashable assets.

Signed-off-by: Loïc Minier <[email protected]>
@lool lool force-pushed the consolidate-board-support branch from 8c27119 to 9554158 Compare September 24, 2025 16:01
@github-actions
Copy link

Test jobs for commit 8c27119

@github-actions
Copy link

Test Results

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

Results for commit 9554158. ± Comparison against base commit d82008d.

@github-actions
Copy link

Test jobs for commit 9554158

Copy link
Contributor

@basak-qcom basak-qcom left a comment

Choose a reason for hiding this comment

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

I checked the dtbs.tar.gz, flash-emmc.tar.gz and flash-ufs.tar.gz output artifacts and they all look fine. One minor comment inline (no need to change or re-review).

-C "${latest_kernel}" \
--transform='s|^\./||' \
-cvzf "$ARTIFACTDIR/dtbs.tar.gz" \
.
Copy link
Contributor

Choose a reason for hiding this comment

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

This leads to an ugly ./ directory as a tar entry, which seems barely worth the --transform. I guess this is because --transform won't eliminate something entirely.

I'm not sure why you want to strip out ./, but given that you do and assuming you don't mind about missing dotfiles, maybe (cd "${latest_kernel}" && tar -cvzf ... *) instead? To include dotfiles there's either shopt -s dotfiles (but I think that's bash only) or something like (cd "${latest_kernel}" && find -mindepth 1 -print0|cut -zd/ -f2-|tar --verbatim-files-from --files-from=- --null -cvzf ...)

This is probably not worth adjusting unless you want to :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As you guessed, I added the transform to avoid ./ in pathnames in the tar archive. This is to preserve the same path structure as in the previous version, were specific relative dtb files were specified (without ./).

The dtb pathnames are specified in a different file, flash.yaml, as part of the board specific metadata; it would be ugly to have ./ names in there, but I guess I could also prepend it when calling tar -x. The ./ felt like gratuitous pollution of dtbs.tar.gz, so I found this --transform way of stripping them.

I can switch to cd $dir && tar instead of -C + --transform, I guess this is easier to read but I wanted to avoid relying on globing in case for a weird reason a kernel comes with no dtb (which isn't really an use case, and then perhaps the directory wouldn't exist either).

I don't think there are dotfiles in there to grab; the find | cut | tar would be painful to read.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the glob is empty, then it will remain by default and the tar will then fail I think - perhaps that's what we want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, trying to move to cd, the two things that scratch me with these few lines are:

  • ARTIFACTDIR not being documented as absolute in the debos docs (probably it is and will be forever)
  • my desire to use linux-version to list kernel versions (as captured in dtbs.tar.gz should use linux-version list #22), but that requires running a command in chroot: true mode and that prevents access to ARTIFACTDIR and I don't really want to break this sequence in 3 actions

So if you don't mind, I'd prefer keeping tar in the current directory with the slightly unusual --transform, it's confirmed to work by you.

@lool lool merged commit 3c9e3ea into qualcomm-linux:main Sep 29, 2025
13 checks passed
@lool lool deleted the consolidate-board-support branch October 17, 2025 20:02
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.

Consolidate logic for new boards

2 participants