diff --git a/rpi-convert-stage-5.sh b/rpi-convert-stage-5.sh index c772ec1..a7eb870 100755 --- a/rpi-convert-stage-5.sh +++ b/rpi-convert-stage-5.sh @@ -66,8 +66,13 @@ build_uboot_files() { fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs run mender_setup mmc dev ${mender_uboot_dev} - load ${mender_uboot_root} ${kernel_addr_r} /boot/zImage - bootz ${kernel_addr_r} - ${fdt_addr} + if load ${mender_uboot_root} ${kernel_addr_r} /boot/zImage; then + bootz ${kernel_addr_r} - ${fdt_addr} + elif load ${mender_uboot_root} ${kernel_addr_r} /boot/uImage; then + bootm ${kernel_addr_r} - ${fdt_addr} + else + echo "No bootable Kernel found." + fi run mender_try_to_recover EOF