From 3721bfc9be5084ae31267d2d77df5f6e25d04bcc 2018-11-10 21:18:33 From: Unknown Date: 2018-11-10 21:18:33 Subject: [PATCH] correcting wrong logic while selecting architecture --- diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 8f56c5e..3fb9b8f 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -207,7 +207,7 @@ if [ -n "$SET_ARCH" ] ; then ################################## # 64 bit config ################################## - if [ "$SET_ARCH" = 64 ] && ([ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]); then + if [ "$SET_ARCH" = 64 ] ; then echo "64 bit mode selected - Setting up enviroment" # 64 bit depended settings QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} @@ -217,15 +217,17 @@ if [ -n "$SET_ARCH" ] ; then CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64" - # RPI 3 serie specific settings - DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} + if ([ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ]) ; then + # RPI 3 serie specific settings + DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} - KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} - KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} - else - echo "error: Only Raspberry PI 3 and 3B+ support 64bit" - exit 1 + KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} + KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} + else + echo "error: At the moment Raspberry PI 3 and 3B+ are the only Models which support 64bit" + exit 1 + fi fi ##################################