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
CM4 secure boot #3357
Merged
Merged
CM4 secure boot #3357
Conversation
This file contains 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
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
6 times, most recently
from
February 23, 2024 12:53
a398049
to
966d03a
Compare
@resin-jenkins retest this please |
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
2 times, most recently
from
February 28, 2024 19:57
d916599
to
cf278b3
Compare
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
March 5, 2024 19:13
889d405
to
c14c0ba
Compare
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
March 6, 2024 13:53
c14c0ba
to
75224d4
Compare
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
2 times, most recently
from
March 8, 2024 13:46
2938e7d
to
b6a7e77
Compare
|
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
2 times, most recently
from
March 11, 2024 10:58
66a1790
to
b1cd831
Compare
Passed tests:
|
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
March 14, 2024 13:31
b1cd831
to
9cc28cb
Compare
@resin-jenkins retest this please |
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
March 15, 2024 11:45
9cc28cb
to
cbdc402
Compare
lgtm |
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
March 16, 2024 15:41
cbdc402
to
70afb38
Compare
@resin-jenkins retest this please |
The balena bootloader needs to mount encrypted disks to kexec the final kernel which is stored in the encrypted root partitions. It also needs to run the data partition expander twice on boot, once in the balena bootloader that expands the disk, and later on the final initramfs to expand the file system. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Even though the balena bootloader kernel has no module support, kernel module dependencies are pulled in via PREFERRED_PROVIDER_virtual/kernel. This commit excludes kernel modules from the image. Changelog-entry: exclude kernel modules from balena-bootloader initramfs image Signed-off-by: Alex Gonzalez <alexg@balena.io>
The fatal() function is only defined while running in the initramfs while fail() is provided by the OS helper logging which is available in both the OS and flasher image. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Remounting filesystems is done on systems with a broken clock in order to prevent tune2fs from bailing out when the last mounted time is in the future. This resets the last mounted time to now. However, the filesystem is immediately unmounted again without being utilized, and the mount and unmount process is time consuming. Instead, use `-e continue` to tell tune2fs to continue after an error, which achieves the same result with less time and complexity. Change-type: patch Signed-off-by: Joseph Kogut <joseph@balena.io>
This function waits until a file is removed or times out - useful to implement basic file based mutexes. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
May 3, 2024 11:58
e2d63d9
to
7cad0cb
Compare
@resin-jenkins retest this please |
Passed local tests:
Passed tests:
|
As soon as the UUID is modified udev re-runs the rules for the partition. However, the rule expects the new root UUID to be cached in a file, and if the udev rule gets there before the file is created it fails. This commit waits on a lock file mutex before accessing said file. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
As soon as the UUID is regenerated udev runs the correspondign rules. However, the rules expect the new UUID to be cached in a file, so there is a race condition between the creation of the file and the udev rule. This commit avoid the race condition by using a file mutex that the udev rule can wait on. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
…luding The `os-helpers-sb` file is only included for signed builds. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
The abroot script sources balena-config-defaults so let's make sure it's included in the build. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Add a hook for boards to initialize boot partition configuration. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
The migrate module is currently only enabled if specified in config.json. This commit introduces a command line argument override for board integration layers to use. This allows for example for non-flasher device types to force the migration. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
This function will be re-used as it's called from the HUP hooks and from the flasher image for secure boot devices that split boot partitions. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
On secure boot devices with split partitions we cannot just deploy the fingerprint generated for resin-boot as it does not take the split into account. Make the hook script re-generate the fingerprint files instead as this will work both for split and non-split boot partitions. Also, boot partition fingerprint files use relatvie path so change the script to take that into account. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io> SQ 1-bootfiles
Ideally we would re-use the function is the target os-helpers-fs file, but Yocto's recipe bash support is not completely compatible with POSIX syntax. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Remove some of the low-risk linter warnings. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
alexgg
force-pushed
the
alexgg/bb-signed-images
branch
from
May 11, 2024 15:45
e5d6de1
to
241caa3
Compare
Ran Manually merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #3408
Contributor checklist
Change-type
present on at least one commitSigned-off-by
is presentReviewer Guidelines