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

Refactor UEFI capsule generation #1527

Merged
merged 6 commits into from
May 29, 2024

Conversation

igoropaniuk
Copy link
Contributor

Refactor UEFI capsule generation. Drop BUP-specific recipes and move all logic to UEFI capsule
generation recipe, as suggested in [1]

[1] #1492

@ichergui
Copy link
Member

Thanks @igoropaniuk for the PR. I will check the changes and get back to you.

@ichergui ichergui requested a review from madisongh April 11, 2024 14:47
Copy link
Member

@ichergui ichergui left a comment

Choose a reason for hiding this comment

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

LGTM.
Did you try any update mechanism ?

@igoropaniuk
Copy link
Contributor Author

@ichergui not really, I've verified only that cap files (with the same size as without these changes) are generated and deployed. I can test update mechanism if needed, but I haven't touched anything in the way how that capsule updates are processed in runtime

@ichergui
Copy link
Member

@igoropaniuk Please do

Copy link
Member

@madisongh madisongh left a comment

Choose a reason for hiding this comment

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

Looks like a good start on this, thanks!

A couple of additional cleanups: the tegra-bup bbclass can be removed with these changes, and the bup_dependency() function reference could just be replaced with a dependency on the do_image_complete task for the initrd if the build is using a separate initrd image.

Also, the oe_make_bup_payload() function could be moved out of image_types_tegra.bbclass and directly into the do_compile function of the capsules recipe, as this would be the only user of it.

recipes-bsp/uefi/tegra-uefi-capsules_35.5.0.bb Outdated Show resolved Hide resolved
recipes-bsp/uefi/tegra-uefi-capsules_35.5.0.bb Outdated Show resolved Hide resolved
recipes-bsp/uefi/tegra-uefi-capsules_35.5.0.bb Outdated Show resolved Hide resolved
@madisongh madisongh requested a review from kekiefer April 14, 2024 11:30
@madisongh
Copy link
Member

@Lexmark-chad It would be good for you to review this as well, if you can

@ichergui
Copy link
Member

@igoropaniuk Any update about this PR ?

@igoropaniuk
Copy link
Contributor Author

@ichergui I'm currently traveling, will get back to it when I'm back (in a week)

@ichergui
Copy link
Member

Hi @igoropaniuk
Please update this PR when you have chance.
Let us know if you need help.

@igoropaniuk igoropaniuk changed the title [RFC] Refactor UEFI capsule generation Refactor UEFI capsule generation May 27, 2024
@ichergui
Copy link
Member

Hi @igoropaniuk
Thanks for the updates.
Could you please rebase your banch on top of master then push again ?

@igoropaniuk
Copy link
Contributor Author

@ichergui I've pushed rebased version, but looks like sanity checks are still failing (and issues reported are not related to my changes):

ERROR: /scratch/buildworker/meta-tegra-master-checklayer/build/poky/meta-tegra/recipes-devtools/cuda/nativesdk-cuda-environment_1.0.bb: Using S = ${WORKDIR} is no longer supported
ERROR: /scratch/buildworker/meta-tegra-master-checklayer/build/poky/meta-tegra/recipes-bsp/tegra-binaries/tegra-helper-scripts-native_35.5.0.bb: Using S = ${WORKDIR} is no longer supported
ERROR: Parsing halted due to errors, see error messages above

@madisongh
Copy link
Member

Yeah, the changes for disallowing `S = "${WORKDIR}" have gone into OE-Core master... I'll try and make some time to work on that today.

@madisongh
Copy link
Member

@igoropaniuk Try rebasing on master latest, should work better now.

@igoropaniuk igoropaniuk force-pushed the uefi-capsule-updates branch 2 times, most recently from f14798f to a344f15 Compare May 28, 2024 16:58
Copy link
Member

@madisongh madisongh left a comment

Choose a reason for hiding this comment

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

See in-line

Fix indentation in task definitions (use spaces instead of tabs).

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Rename variable holding Capsule install dir in the final rootfs,
so it's more generic TEGRA_UEFI_CAPSULE_INSTALL_DIR and set
a weak default value, so it can be adjusted if needed.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Drop bup-payload image type from TEGRA_INITRAMFS_FSTYPES, as it's
planned to generate BUP image inside UEFI capsule generation
recipes.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Drop bup-payload image type CONVERSION_CMD, as it's planned to generate
BUP image inside UEFI capsule generation recipes, as suggested in
[1].

[1] OE4T#1492
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Use ${B} for storing generated capsules instead of hacking
with ${DEPLOY_DIR_IMAGE}.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Drop BUP-specific recipes and move all logic to UEFI capsule
generation recipe, as suggested in [1].

[1] OE4T#1492
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
@igoropaniuk
Copy link
Contributor Author

@ichergui @madisongh @Lexmark-chad @kekiefer do you have any additional comments/objections/suggestions? thanks

@madisongh
Copy link
Member

I think we're good. I'm running a couple of build tests in preparation for merging. Thanks!

Copy link
Member

@ichergui ichergui left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @igoropaniuk

Copy link
Contributor

@Lexmark-chad Lexmark-chad left a comment

Choose a reason for hiding this comment

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

New changes look good.

@madisongh madisongh merged commit 3b28f68 into OE4T:master May 29, 2024
1 check passed
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.

None yet

5 participants