diff --git a/arch/arm/mach-rockchip/make_fit_args.sh b/arch/arm/mach-rockchip/make_fit_args.sh index 7712d6e21b..2e35cd63f9 100755 --- a/arch/arm/mach-rockchip/make_fit_args.sh +++ b/arch/arm/mach-rockchip/make_fit_args.sh @@ -21,8 +21,10 @@ function help() echo " arg type output variable description" echo "--------------------------------------------------------------------------------------------" echo " -c [comp] ==> COMPRESSION set compression: \"none\", \"gzip\"" - echo " -m [offset] ==> MCU_LOAD_ADDR set mcu.bin offset address" - echo " -t [offset] ==> TEE_LOAD_ADDR set tee.bin offset address" + echo " -m [offset] ==> MCU_LOAD_ADDR set mcu.bin load address" + echo " -t [offset] ==> TEE_LOAD_ADDR set tee.bin load address" + echo " (none) ==> UBOOT_LOAD_ADDR set U-Boot load address" + echo " (none) ==> ARCH set arch: \"arm\", \"arm64\"" echo } @@ -61,6 +63,11 @@ fi # Base DARM_BASE=`sed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" ${srctree}/include/autoconf.mk|tr -d '\r'` UBOOT_LOAD_ADDR=`sed -n "/CONFIG_SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" ${srctree}/include/autoconf.mk|tr -d '\r'` +if grep -q '^CONFIG_ARM64=y' .config ; then + ARCH="arm64" +else + ARCH="arm" +fi # tee if [ ! -z "${TEE_OFFSET}" ]; then diff --git a/arch/arm/mach-rockchip/make_fit_boot.sh b/arch/arm/mach-rockchip/make_fit_boot.sh index 69a72348ed..0c5993e455 100755 --- a/arch/arm/mach-rockchip/make_fit_boot.sh +++ b/arch/arm/mach-rockchip/make_fit_boot.sh @@ -8,6 +8,10 @@ # Process args and auto set variables source ./${srctree}/arch/arm/mach-rockchip/make_fit_args.sh +if [ ! -f ${srctree}/images/ramdisk ]; then + touch ${srctree}/images/ramdisk +fi + if [ "${COMPRESSION}" == "gzip" ]; then gzip -k -f -9 ${srctree}/images/kernel gzip -k -f -9 ${srctree}/images/ramdisk @@ -35,7 +39,7 @@ cat << EOF fdt { data = /incbin/("./images/rk-kernel.dtb"); type = "flat_dt"; - arch = "arm"; + arch = "${ARCH}"; compression = "none"; load = <0xffffff00>; hash { @@ -49,7 +53,7 @@ echo " data = /incbin/(\"./images/kernel${SUFFIX}\");" echo " compression = \"${COMPRESSION}\";" cat << EOF type = "kernel"; - arch = "arm"; + arch = "${ARCH}"; os = "linux"; entry = <0xffffff01>; load = <0xffffff01>; @@ -64,7 +68,7 @@ echo " data = /incbin/(\"./images/ramdisk${SUFFIX}\");" echo " compression = \"${COMPRESSION}\";" cat << EOF type = "ramdisk"; - arch = "arm"; + arch = "${ARCH}"; os = "linux"; load = <0xffffff02>; hash { @@ -75,7 +79,7 @@ cat << EOF resource { data = /incbin/("./images/resource"); type = "multi"; - arch = "arm"; + arch = "${ARCH}"; compression = "none"; hash { algo = "sha256";