Skip to content
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

scripts/cmake: Set SOF_MICRO to 99 on main branch #9874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SurajSonawane2415
Copy link

Set SOF_MICRO to 99 on the main branch

This change ensures that SOF_MICRO is set to 99 when on the main branch, similar to Zephyr’s approach for never-released branches. For other branches, it remains 0 to maintain consistency with xtensa-build-zephyr.py.

Fixes the TODO:

"default this to .99 on the main, never released branch like zephyr does"

Changes:

Detect the current Git branch using git rev-parse --abbrev-ref HEAD
Set SOF_MICRO to 99 if on main, otherwise 0

Testing:

Verified SOF_MICRO = 99 on main, 0 on other branches by running:

 cmake -DSOF_ROOT_SOURCE_DIRECTORY=$(pwd) -P scripts/cmake/version.cmake

I would appreciate your review and any suggestions for improvement. Thank you!

@sofci
Copy link
Collaborator

sofci commented Mar 5, 2025

Can one of the admins verify this patch?

reply test this please to run this test once

@lgirdwood
Copy link
Member

test this please

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

No objections from me, aligning with Zephyr makes sense.

This ensures SOF_MICRO is set to 99 when on the main branch, aligning with Zephyr's approach for never-released branches. For other branches, it remains 0 to maintain consistency with xtensa-build-zephyr.py.

Signed-off-by: Suraj Sonawane <surajsonawane0215@gmail.com>
@SurajSonawane2415
Copy link
Author

Two checks previously failed due to:

  • WARNING: Missing commit description - Add an appropriate one
  • ERROR: Missing Signed-off-by: line(s)

I have amended the commit to include the commit description and Signed-off-by line to resolve these issues.

@SurajSonawane2415
Copy link
Author

No objections from me, aligning with Zephyr makes sense.

Thank you for your review!

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Thank you @SurajSonawane2415 for the pull request!

Some comment inline, I'm not sure how relevant the TODO entry is, please see my comment.

# TODO: default this to .99 on the main, never released branch like zephyr does
# Keep this default SOF_MICRO the same as the one in xtensa-build-zephyr.py
set(SOF_MICRO 0)
# Detect if the current branch is "main"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, I think this TODO predates our move to have 99 set in versions.json in SOF main (just like Zephyr has a VERSION file and sets 99 as micro/patchlevel in Zephyr main). Not sure we need this check and whether it has any impact now...? Or am I missing something?

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.

4 participants