Skip to content

Instantly share code, notes, and snippets.

@damex
Last active May 10, 2020 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damex/cc5f15f322dcf282c23e62b642634991 to your computer and use it in GitHub Desktop.
Save damex/cc5f15f322dcf282c23e62b642634991 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
atf_version="2.3"
if [[ ! -f "atf-${atf_version}.tar.gz" ]] ; then
curl -L https://github.com/ARM-software/arm-trusted-firmware/archive/v${atf_version}.tar.gz -o atf-${atf_version}.tar.gz
tar xvpf atf-${atf_version}.tar.gz
pushd arm-trusted-firmware-${atf_version}
make PLAT=rk3328 bl31
popd
fi
if [[ ! -d "u-boot" ]] ; then
git clone --depth 1 https://github.com/u-boot/u-boot.git
pushd u-boot
make roc-cc-rk3328_defconfig
BL31="../arm-trusted-firmware-${atf_version}/build/rk3328/release/bl31/bl31.elf" make
popd
fi
# dd if=u-boot/idbloader.img of=/dev/mmcblk1 seek=64
# dd if=u-boot/u-boot.itb of=/dev/mmcblk1 seek=16384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment