-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add recipe for balena bootloader #1097
Open
mtoman
wants to merge
1
commit into
master
Choose a base branch
from
mtoman/add-bootloader-kernel
base: master
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.
Open
Changes from all commits
Commits
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
50 changes: 50 additions & 0 deletions
50
layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-balena-bootloader_6.1.bb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
LINUX_VERSION ?= "6.1.64" | ||
LINUX_RPI_BRANCH ?= "rpi-6.1.y" | ||
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1" | ||
|
||
SRCREV_machine = "dad5d57939cfae7af363e7c9862b59d33d96794b" | ||
SRCREV_meta = "f845a7f37d7114230d6609e2bd630070f2f6cd9b" | ||
|
||
KMETA = "kernel-meta" | ||
|
||
SRC_URI = " \ | ||
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ | ||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ | ||
" | ||
SRC_URI:remove = "file://initramfs-image-bundle.cfg" | ||
SRC_URI:remove = "file://vc4graphics.cfg" | ||
|
||
require recipes-kernel/linux/linux-raspberrypi.inc | ||
|
||
inherit balena-bootloader | ||
|
||
BALENA_DEFCONFIG_NAME = "${KBUILD_DEFCONFIG}" | ||
|
||
BALENA_CONFIGS:append = " \ | ||
rpisense \ | ||
" | ||
|
||
BALENA_CONFIGS[rpisense] = " \ | ||
CONFIG_MFD_RPISENSE_CORE=n \ | ||
CONFIG_FB_RPISENSE=n \ | ||
" | ||
|
||
do_deploy:append () { | ||
BOOTENV_FILE="${DEPLOYDIR}/${KERNEL_PACKAGE_NAME}/bootenv" | ||
grub-editenv "${BOOTENV_FILE}" create | ||
grub-editenv "${BOOTENV_FILE}" set "resin_root_part=A" | ||
grub-editenv "${BOOTENV_FILE}" set "bootcount=0" | ||
grub-editenv "${BOOTENV_FILE}" set "upgrade_available=0" | ||
} | ||
|
||
do_deploy[depends] += " grub-native:do_populate_sysroot" | ||
|
||
KERNEL_DTC_FLAGS += "-@ -H epapr" | ||
|
||
INITRAMFS_IMAGE = "balena-image-bootloader-initramfs" | ||
|
||
KERNEL_PACKAGE_NAME = "balena-bootloader" | ||
|
||
KERNEL_DEVICETREE = "${RPI_KERNEL_DEVICETREE}" | ||
|
||
PROVIDES = "virtual/balena-bootloader" | ||
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.
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.
why not "virtual/bootloader"?
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.
This is used to pull balena bootloader into the image without using the specific package name:
https://github.com/balena-os/balena-raspberrypi/pull/1091/files#diff-abca8cd7f0af2e032dfdeec9e689532b73da44e8b689133f6d02617cec7fb5f9R79
But I am not sure whether it is particularly useful since the package name will be per-device-repo anyway. That is the only place where it is used. I think it is
virtual/balena-bootloader
because it wasvirtual/linux-kboot
in the old dev branches and I just changedlinux-kboot
tobalena-bootloader
everywhere.I have no strong opinion either way, do you think we should provide
virtual/bootloader
here and pulllinux-balena-bootloader
into the image?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.
@mtoman I think it's cleaner to use
virtual/bootloader
as currently that will build u-boot. Not introducing a second virtual target simplifies things.On other platforms where we might use u-boot as vendor bootloader and then the balena-bootloader we might need to use different virtual targets - so this might be a reason to also use separate targets here.
Just give it a thought and let me know what you prefer - I tend to prefer just using
virtual/bootloader
as it's either u-boot or balena bootloader in this case, but I can see both.