Skip to content

Conversation

@lool
Copy link
Contributor

@lool lool commented Mar 28, 2025

No description provided.

@lool
Copy link
Contributor Author

lool commented Mar 28, 2025

This is immediately useful for people that have read access to the fileserver as to download a fresh daily image, or a test image for a pull request.

This does beg the question of how we're going to manage the two sector sizes we're trying to support, or rather when.

Quick reminder that:

  • 512B sector size is the default output of debos, and suitable for SD cards and older eMMC based boards
  • 4096B sector size is what one wants for newer UFS based boards

We could:

  1. do multiple debos runs with different sector sizes (wasteful IMO)
  2. generate an image for the other sector size at the end of a debos build, and always publish both
  3. defer the conversion to flashing time / end-users and keep building only one image

There's also a side question of generating the other assets needed for flashing, but that is a larger topic.

# copy output files
cp -v disk.img "${dir}"
# instruct fileserver to publish this directory
url="${FILESERVER_URL}/${GITHUB_RUN_ID}/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

GITHUB_RUN_ID is unique within the repo. We seem to publish builds from this repo at the same level as builds from meta-qcom. that could clash no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah indeed, I assumed the run ids were globally unique, but the doc says unique per repo.

There's also the case for reruns, so a run id is actually not a unique build id; so we should also use GITHUB_RUN_ATTEMPT to have unique build ids.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no globally unique run id provided by GitHub, so some repo id needs to be used. There is a repository id as a number, and there is the repository name which is the nicest IMO, but it's controller by the submitter of pull request.

I've found some non-official repositories outlining the GitHub user/org naming rules, and these explanations in the GitHub docs about user names:
https://docs.github.com/en/enterprise-cloud@latest/admin/managing-iam/iam-configuration-reference/username-considerations-for-external-authentication

Basically usernames are alphanumeric and can contain hyphens and underscores, but never two hyphens or start with an hyphen, so that should be safe to use in directory names and URLs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@doanac , FYI.

Copy link
Contributor

Choose a reason for hiding this comment

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

ugh. i think this is going to wind up forcing a change in backend logic. the code is treating it as unique per github org and not repository. I think we have move to a format:
${FILESERVER_URL}/${GITHUB_REPOSITORY}/${GITHUB_RUN_ID}/

I'll need to deploy something that's temporarily backward compatible while I work through all the places we do uploads.

Copy link
Contributor

Choose a reason for hiding this comment

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

n/m - this works well. i like it.

@ndechesne
Copy link
Collaborator

We could:

  1. do multiple debos runs with different sector sizes (wasteful IMO)
  2. generate an image for the other sector size at the end of a debos build, and always publish both
  3. defer the conversion to flashing time / end-users and keep building only one image

I think we should publish working (and tested) images, so we cannot defer to the user to do the final conversion. We can do either 1 or 2 above, but I would prefer 1. it seems safer, in case debos ends up doing something 'more' with the sector size than what a custom/local script could do.

Could debos be split into 2 steps, first to prepare the rootfs, and then to create the image ? so that we 'waste' less?

There's also a side question of generating the other assets needed for flashing, but that is a larger topic.

Right now most of the boot assets , qdl xml files, .. are managed/integrated in meta-qcom, and 'tied' to our Yocto builds, but it's not ideal. We would like to have them in https://github.com/qualcomm-linux/qcom-ptool instead, so that they are managed independently of meta-qcom.

@lool
Copy link
Contributor Author

lool commented Mar 31, 2025

We could:

  1. do multiple debos runs with different sector sizes (wasteful IMO)
  2. generate an image for the other sector size at the end of a debos build, and always publish both
  3. defer the conversion to flashing time / end-users and keep building only one image

I think we should publish working (and tested) images, so we cannot defer to the user to do the final conversion. We can do either 1 or 2 above, but I would prefer 1. it seems safer, in case debos ends up doing something 'more' with the sector size than what a custom/local script could do.

Could debos be split into 2 steps, first to prepare the rootfs, and then to create the image ? so that we 'waste' less?

Yes, if we want to use debos to do the conversion, then it's a good idea to architect it in two steps.

There's also a side question of generating the other assets needed for flashing, but that is a larger topic.

Right now most of the boot assets , qdl xml files, .. are managed/integrated in meta-qcom, and 'tied' to our Yocto builds, but it's not ideal. We would like to have them in https://github.com/qualcomm-linux/qcom-ptool instead, so that they are managed independently of meta-qcom.

Is there a place where this is discussed/being spec-ed that I can tune into?

lool added 2 commits March 31, 2025 13:28
Create an unique id based on repository, workflow run id, and workflow
run attempt.

Repository name is under the control of the submitter, but GitHub
restricts organization and repository names to safe characters.

Signed-off-by: Loïc Minier <[email protected]>
@ndechesne
Copy link
Collaborator

There's also a side question of generating the other assets needed for flashing, but that is a larger topic.

Right now most of the boot assets , qdl xml files, .. are managed/integrated in meta-qcom, and 'tied' to our Yocto builds, but it's not ideal. We would like to have them in https://github.com/qualcomm-linux/qcom-ptool instead, so that they are managed independently of meta-qcom.

Is there a place where this is discussed/being spec-ed that I can tune into?

We have qualcomm-linux/meta-qcom#714. but really not much was done so far.

@lool lool merged commit 24f3168 into qualcomm-linux:main Apr 2, 2025
3 checks passed
@lool lool deleted the fileserver-upload 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.

3 participants