diff --git a/bootstrap.d/41-uboot.sh b/bootstrap.d/41-uboot.sh index 67c4657..940d317 100644 --- a/bootstrap.d/41-uboot.sh +++ b/bootstrap.d/41-uboot.sh @@ -65,6 +65,16 @@ if [ "$ENABLE_UBOOT" = true ] ; then printf "\nbootz \${kernel_addr_r} - \${fdt_addr_r}" >> "${BOOT_DIR}/uboot.mkimage" fi fi + + if [ "$KERNEL_ARCH" = "arm64" ] ; then + echo "Setting up config.txt to boot 64bit uboot" + + printf "\n# 64bit-mode" >> "${BOOT_DIR}/config.txt" + printf "\n# arm_control=0x200 is deprecated https://www.raspberrypi.org/documentation/configuration/config-txt/misc.md" >> "${BOOT_DIR}/config.txt" + printf "\narm_64bit=1" >> "${BOOT_DIR}/config.txt" + #in 64bit uboot booti is used instead of bootz [like in KERNEL_BIN_IMAGE=zImage (armv7)|| Image(armv8)] + sed -i "s|bootz|booti|g" "${BOOT_DIR}/uboot.mkimage" + fi # Set mkfile to use the correct dtb file sed -i "s/^\(setenv dtbfile \).*/\1${DTB_FILE}/" "${BOOT_DIR}/uboot.mkimage"