-
Notifications
You must be signed in to change notification settings - Fork 5
feat(genericx86-64): secure-boot support #573
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
Open
mlilien
wants to merge
8
commits into
omnect:main
Choose a base branch
from
mlilien:scarthgap_meta-secure-core
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+192
−289
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8e382e2
feat: secure-boot for x86
mlilien d92796f
refactored
mlilien a5931be
test: increase size of boot part
mlilien 9de8991
revert increased boot part size
mlilien e840e39
bootloader-versioned
mlilien ef6b9d4
fix non meta-secure-boot devices
mlilien 6cf71ce
fix u-boot boot
mlilien bb318d3
refactored grub.cfg
mlilien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'efi-secure-boot', 'user-key-store', '', d)} | ||
|
||
fakeroot python sign() { | ||
import re | ||
|
||
if (d.expand('${TARGET_ARCH}') != 'x86_64') and (not re.match('i.86', d.expand('${TARGET_ARCH}'))): | ||
return | ||
|
||
if d.expand('${UEFI_SB}') != '1': | ||
return | ||
|
||
import shutil | ||
|
||
initramfs = d.expand('${IMGDEPLOYDIR}/${IMAGE_NAME}.${OMNECT_INITRAMFS_FSTYPE}') | ||
bb.note("initramfs: \"%s\"" % (initramfs)) | ||
shutil.copy(initramfs, initramfs + '.unsigned') | ||
uks_bl_sign(initramfs, d) | ||
} | ||
IMAGE_POSTPROCESS_COMMAND:append = "${@bb.utils.contains('DISTRO_FEATURES', 'efi-secure-boot', 'check_deploy_keys;sign;', '', d)}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
diff --git a/meta-efi-secure-boot/conf/layer.conf b/meta-efi-secure-boot/conf/layer.conf | ||
index 0efef32..1ebddf7 100644 | ||
--- a/meta-efi-secure-boot/conf/layer.conf | ||
+++ b/meta-efi-secure-boot/conf/layer.conf | ||
@@ -20,3 +20,4 @@ LAYERDEPENDS_efi-secure-boot = "\ | ||
" | ||
|
||
LAYERSERIES_COMPAT_efi-secure-boot = "scarthgap" | ||
+LAYERDIR_efi-secure-boot = "${LAYERDIR}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be discussed: mv meta-perl to kas/distro/omnect-os.yaml for convenience vs. it's definitely currently only a dependency of meta-secure-core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would favor to leave it here until also other platforms need it for one or another reason.
the "convenience" argument is not really clear to me, though. I only see that we would have another layer seemingly taking part in image builds when it actually does not but for genericx86-64.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "convenience" argument is that you don't have to care about meta-openembedded twice.
it's not only another layer. meta-perl is part of meta-openembedded.
in this PR we configure meta-openembedded in
kas/distro/omnect-os.yaml
vskas/machine/x86_64/genericx86-64.yaml
. in theory you could've mismatching revisions for this occurences.