#!/bin/sh # Build SD card image BOARD_ID="${1}" # For example "bananapi" CHIP_ID="${2}" # For example "allwinner-a10" DEFCONFIG="${3}" # For example "Bananapi_defconfig" TUPLE="${4}" # For example "arm-linux-gnueabihf" set -ex case "${CHIP_ID}" in rk3328|rk3368|rk3399) build-atf "${CHIP_ID}" "${TUPLE}" export BL31="$(pwd)/arm-trusted-firmware/build/${CHIP_ID}/debug/bl31/bl31.elf" ;; *) ;; esac build-u_boot "${DEFCONFIG}" "${TUPLE}" # Copy U-Boot to 64 sectors from start dd if=u-boot/u-boot-rockchip.bin of=tmp.img seek=64 conv=notrunc