Browse Source
Merge pull request #163 from kacf/dtb_and_grub_fix
Fix DTB boot issue and switch back to GRUB 2.04
2.0.x
Kristian Amlie
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
13 additions and
1 deletions
-
configs/mender_grub_config
-
mender-convert-modify
|
|
@ -32,4 +32,4 @@ MENDER_GRUB_KERNEL_IMAGETYPE="" |
|
|
|
# if was not possible to auto-detect |
|
|
|
MENDER_GRUB_INITRD_IMAGETYPE="" |
|
|
|
|
|
|
|
MENDER_GRUB_BINARY_STORAGE_URL="${MENDER_STORAGE_URL}/mender-convert/grub-efi/2.04" |
|
|
|
MENDER_GRUB_BINARY_STORAGE_URL="${MENDER_STORAGE_URL}/mender-convert/grub-efi/2.02" |
|
|
|
|
|
@ -164,6 +164,18 @@ EOF |
|
|
|
|
|
|
|
run_and_log_cmd "sudo mkdir -p work/boot/EFI/BOOT" |
|
|
|
run_and_log_cmd "sudo cp work/${efi_name} -P work/boot/EFI/BOOT/${efi_target_name}" |
|
|
|
|
|
|
|
# Copy dtb directory to the boot partition for use by the bootloader. |
|
|
|
if [ -d work/rootfs/boot/dtbs ]; then |
|
|
|
# Look for the first directory that has dtb files. First check the base |
|
|
|
# folder, then any subfolders in versioned order. |
|
|
|
for candidate in work/rootfs/boot/dtbs $(find work/rootfs/boot/dtbs/ -maxdepth 1 -type d | sort -V -r); do |
|
|
|
if [ $(find $candidate -maxdepth 1 -name '*.dtb' | wc -l) -gt 0 ]; then |
|
|
|
run_and_log_cmd "cp -r $candidate work/boot/dtb" |
|
|
|
break |
|
|
|
fi |
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
run_and_log_cmd "sudo mkdir -p work/rootfs/data/mender" |
|
|
|