-
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
aarch64 support: efi stub and devicetree selection #722
base: master
Are you sure you want to change the base?
Conversation
4b60c5c
to
0ec4a20
Compare
Go go gadget force push |
0ec4a20
to
b64815c
Compare
generate-zbm now understands the EFI.DeviceTree key. This key can contain one of three possible values: 1) /absolute/path/%{kernel}/to/device-tree-file.dtb 2) /absolute/path/to/device-tree-file.dtb 3) partial/path/device-tree-file.dtb If found, %{kernel} is replaced with the kernel version being built in to the EFI asset. Partial paths are appended to /boot/dtbs/dtb-$kernel/, a well-known path for device tree files used by Void Linux. Inside ZFSBootMenu, the org.zfsbootmenu:devicetree property is read. The value of this property are handled in the same order/priority as EFI.DeviceTree. %{kernel} is replaced with the kernel version that kexec is loading / executing.
b64815c
to
cccb2b0
Compare
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 works exactly as I'd expect. I offer only some trivial comments, take or leave them as you like.
We need documentation on the config.yaml
options and the ZFS property.
if ( has_value $dtb_try && -f $dtb_try ) { | ||
$uki_offset = addBundleSection( \@cmd, ".dtb", $dtb_try, $uki_offset, $uki_alignment ); | ||
} else { | ||
if ( has_value $dtb_try ) { | ||
printf "EFI.DeviceTree key set to '%s', file not found at '%s'\n", $config{EFI}{DeviceTree}, $dtb_try; | ||
exit 1; | ||
} else { | ||
printf "EFI.DeviceTree key set to '%s', file not found\n", $config{EFI}{DeviceTree}; | ||
exit 1; | ||
} | ||
} |
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.
if ( has_value $dtb_try && -f $dtb_try ) { | |
$uki_offset = addBundleSection( \@cmd, ".dtb", $dtb_try, $uki_offset, $uki_alignment ); | |
} else { | |
if ( has_value $dtb_try ) { | |
printf "EFI.DeviceTree key set to '%s', file not found at '%s'\n", $config{EFI}{DeviceTree}, $dtb_try; | |
exit 1; | |
} else { | |
printf "EFI.DeviceTree key set to '%s', file not found\n", $config{EFI}{DeviceTree}; | |
exit 1; | |
} | |
} | |
if ( has_value $dtb_try) { | |
if ( -f $dtb_try ) { | |
$uki_offset = addBundleSection( \@cmd, ".dtb", $dtb_try, $uki_offset, $uki_alignment ); | |
} else { | |
printf "EFI.DeviceTree key set to '%s', file not found at '%s'\n", $config{EFI}{DeviceTree}, $dtb_try; | |
exit 1; | |
} | |
} else { | |
printf "EFI.DeviceTree key set to '%s', but no DeviceTree file could be found\n", $config{EFI}{DeviceTree}; | |
exit 1; | |
} |
if [ -n "${dtb_prop}" ] && [ "${dtb_prop}" != '-' ] ; then | ||
zdebug "devicetree property set to '${dtb_prop}'" | ||
|
||
# this is cursed |
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 isn't really cursed, it's how we map kernels to initramfs images as well.
generate-zbm now understands the
EFI.DeviceTree
key. This key can contain one of three possible values:If found, %{kernel} is replaced with the kernel version being built in to the EFI asset. Partial paths are appended to
/boot/dtbs/dtb-$kernel/
, a well-known path for device tree files used by Void Linux.Inside ZFSBootMenu, the
org.zfsbootmenu:devicetree
property is read. The values of this property are handled in the same order/priority asEFI.DeviceTree
.Documentation will be written and appended to this PR once the overall design of this support is accepted.