Skip to content

Conversation

mkopec
Copy link
Member

@mkopec mkopec commented Jul 25, 2025

Extract the config from the capsule itself, to avoid depending on .config existing and being up to date.

This depends on edk2 basetools, these can be taken from the edk2 build tree, or specified as an env variable.

@mkopec mkopec force-pushed the lvfs_script branch 4 times, most recently from 2f8cae4 to 225254c Compare July 25, 2025 14:27
@mkopec mkopec changed the title Capsule scripts: Make them work independently of buildsystem state Make capsule_cabinet work independently of buildsystem state Jul 25, 2025
@mkopec mkopec force-pushed the lvfs_script branch 3 times, most recently from dc4919d to 02b92e1 Compare July 25, 2025 14:39
@mkopec mkopec requested a review from filipleple July 25, 2025 14:44
@mkopec mkopec self-assigned this Jul 25, 2025
@mkopec mkopec marked this pull request as ready for review July 25, 2025 14:44
Extract the coreboot config from the capsule itself, in order to be able
to use the script on any coreboot capsules.

Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I49f2fb91423b912d98d55ca5e0e008b483d1322c
Signed-off-by: Michał Kopeć <[email protected]>
Copy link
Member

@SergiiDmytruk SergiiDmytruk left a comment

Choose a reason for hiding this comment

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

Unless I misunderstand the intend, the changes are incomplete. The script can't be used without .config in the current directory and it will mix configuration from .config and coreboot's config extracted from a capsule's payload.


if [ ! -f .config ]; then
die "No '.config' file in current directory"
fi
Copy link
Member

Choose a reason for hiding this comment

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

Existence of .config is checked here.


capsule=$1
date=$(stat -c %w $capsule | cut -d ' ' -f 1)
vendor=$(cat .config | grep -e "CONFIG_VENDOR_.*=y" | cut -d '=' -f 1 | cut -d '_' -f 3- | awk '{ print tolower($0) }')
Copy link
Member

Choose a reason for hiding this comment

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

.config is used here.

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