1#!/bin/sh 2 3BOARD_DIR="$(dirname "$0")" 4 5support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg" 6 7AMLOGIC_DIR=${BINARIES_DIR}/amlogic-boot-fip 8FIP_DIR=${BINARIES_DIR}/fip 9 10mkdir -p "${FIP_DIR}" 11 12(cd "${AMLOGIC_DIR}" && \ 13 ./build-fip.sh khadas-vim3 \ 14 "${BINARIES_DIR}"/u-boot.bin \ 15 "${FIP_DIR}") 16 17dd if="${FIP_DIR}"/u-boot.bin.sd.bin \ 18 of="${BINARIES_DIR}"/sdcard.img \ 19 conv=fsync,notrunc bs=1 count=444 20 21dd if="${FIP_DIR}"/u-boot.bin.sd.bin \ 22 of="${BINARIES_DIR}"/sdcard.img \ 23 conv=fsync,notrunc bs=512 skip=1 seek=1 24