Advertisement
Guest User

Untitled

a guest
Feb 11th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.58 KB | None | 0 0
  1. #!/bin/bash
  2. set -ex
  3. FIP_TARGET=libretech_cc
  4. U_BOOT_TARGET=libretech-cc_defconfig
  5. U_BOOT_AMLOGIC_TARGET=libretech_cc_defconfig
  6.  
  7. GCC_DIR=../../../gcc
  8. export PATH=`readlink -f $GCC_DIR/gcc-arm-none-eabi`/bin:`readlink -f $GCC_DIR/gcc-linaro-aarch64-none-elf`/bin:`readlink -f $GCC_DIR/gcc-linaro-aarch64-elf`/bin:$PATH
  9.  
  10. cd src-amlogic-openlinux
  11. ./mk $FIP_TARGET
  12. export FIPDIR=$PWD/fip
  13.  
  14. cd src
  15. mkdir -p fip
  16. cp $FIPDIR/gxl/bl2.bin fip/
  17. cp $FIPDIR/gxl/acs.bin fip/
  18. cp $FIPDIR/gxl/bl21.bin fip/
  19. cp $FIPDIR/gxl/bl30.bin fip/
  20. cp $FIPDIR/gxl/bl301.bin fip/
  21. cp $FIPDIR/gxl/bl31.img fip/
  22.  
  23. CROSS_COMPILE=aarch64-elf- make $U_BOOT_TARGET
  24.  
  25. CROSS_COMPILE=aarch64-elf- make
  26.  
  27. cp u-boot.bin fip/bl33.bin
  28.  
  29. $FIPDIR/blx_fix.sh \
  30.     fip/bl30.bin \
  31.     fip/zero_tmp \
  32.     fip/bl30_zero.bin \
  33.     fip/bl301.bin \
  34.     fip/bl301_zero.bin \
  35.     fip/bl30_new.bin \
  36.     bl30
  37.  
  38. $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
  39.  
  40. $FIPDIR/blx_fix.sh \
  41.     fip/bl2_acs.bin \
  42.     fip/zero_tmp \
  43.     fip/bl2_zero.bin \
  44.     fip/bl21.bin \
  45.     fip/bl21_zero.bin \
  46.     fip/bl2_new.bin \
  47.     bl2
  48.  
  49. $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin
  50. $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img
  51. $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin
  52. $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig
  53. $FIPDIR/gxl/aml_encrypt_gxl --bootmk \
  54.         --output fip/u-boot.bin \
  55.         --bl2 fip/bl2.n.bin.sig \
  56.         --bl30 fip/bl30_new.bin.enc \
  57.         --bl31 fip/bl31.img.enc \
  58.         --bl33 fip/bl33.bin.enc
  59.  
  60.  
  61. cp src/fip/u-boot.bin.sd.bin output/sd.bin
  62. cp src/fip/u-boot.bin output/emmc.bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement