armoon

odroid n1 spl tpl build

Oct 12th, 2019
114
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. set +x
  3. export CFLAGS=
  4. export CXXFLAGS=
  5. export CPPFLAGS=
  6. export CROSS_COMPILE=aarch64-linux-gnu-
  7. export PATH=/opt/toolchains/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:$PATH
  8. export GCC_COLORS=auto
  9.  
  10. rm idbloader.img
  11. rm trust.img
  12. rm u-boot.itb
  13.  
  14. cd ../arm-trusted-firmware
  15. make clean
  16. git clean -d -f -x
  17. git pull origin
  18. make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
  19. cd -
  20.  
  21. export ARCH=arm64
  22. export CROSS_COMPILE=aarch64-linux-gnu-
  23. make distclean
  24. git pull origin
  25. cp -v ../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf ./bl31.elf
  26. make rock960-rk3399_defconfig all u-boot.itb
  27.  
  28. cd ../rkbin
  29. tools/trust_merger RKTRUST/RK3399TRUST.ini
  30. cd -
  31.  
  32. cp -v ../rkbin/trust.img .
  33.  
  34. # sudo dd if=idbloader.img of=/dev/mmcblk0 bs=1k seek=32
  35. # sudo dd if=u-boot.itb of=/dev/mmcblk0 bs=1k seek=8192
  36. # sudo dd if=trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc
  37.  
  38. FILE=/dev/mmcblk0p1
  39. if [ -b "$FILE" ]; then
  40. echo "$FILE exist"
  41. sudo dd if=idbloader.img of=/dev/mmcblk0 seek=32
  42. sudo dd if=u-boot.itb of=/dev/mmcblk0 seek=8192
  43. sudo dd if=trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc
  44. else
  45. echo "$FILE does not exist"
  46. fi
RAW Paste Data