cmake-tool: add ARM_PLAT aliases to elfloader binary_list - #268
Closed
ShankaradityaNS wants to merge 1 commit into
Closed
ShankaradityaNS wants to merge 1 commit into
ShankaradityaNS wants to merge 1 commit into
Conversation
ApplyData61ElfLoaderSettings() is called by some projects with
${KernelARMPlatform} rather than ${KernelPlatform}. The kernel sets
these to different values for four platforms: bcm2837/rpi3,
bcm2711/rpi4, bcm2712/rpi5 and rk3568/rock3b. Those boards therefore
fall through to ElfloaderImage=elf, and U-Boot's `go` aborts on the
ELF header.
Adding the ARM_PLAT names alongside the existing entries fixes the
four affected boards without changing behaviour for any other.
Signed-off-by: Shankaraditya N S <shankaradi1511@gmail.com>
Contributor
|
Was this PR written by AI? |
Contributor
This is the real bug, please fix that instead of working around it here. |
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
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.
ApplyData61ElfLoaderSettings()takes a platform name and checks it againstbinary_list,efi_listanduimage_list. Some projects call it with${KernelARMPlatform}rather than${KernelPlatform}—camkes-vm-examples/settings.cmake:73, for instance.For most platforms those two variables are identical, but the kernel sets them differently for four boards:
binary_listcontains only theKernelPlatformnames, so when called with the ARM_PLAT name these four fall through toElfloaderImage=elf. U-Boot'sgothen executes the ELF header and aborts.This adds the ARM_PLAT aliases next to their existing twins. Purely additive — nothing removed or reordered, and no other platform's behaviour changes.
Verified on a Raspberry Pi 4B: before,
ElfloaderImage:STRING=elfand the board aborted on7f45 4c46; after,binary, and it boots. I don't have rpi3, rpi5 or rock3b hardware, so those are fixed by the same reasoning rather than by test.