mcbin

mcbin.git
git clone git://git.lenczewski.org/mcbin.git
Log | Files | Refs | README

build.sh (1071B)


      1 #!/bin/sh
      2 
      3 export CROSS_COMPILE=aarch64-linux-gnu-
      4 
      5 USE_EDK2=false
      6 
      7 set -ex
      8 
      9 if $USE_EDK2; then
     10 
     11 # build edk2
     12 export WORKSPACE="$PWD"
     13 export PACKAGES_PATH="$PWD/edk2:$PWD/edk2-platforms:$PWD/edk2-non-osi"
     14 
     15 . edk2/edksetup.sh
     16 
     17 make -C edk2/BaseTools
     18 
     19 export GCC5_AARCH64_PREFIX=$CROSS_COMPILE
     20 build -a AARCH64 -t GCC5 -b RELEASE -D X64EMU_ENABLE -D INCLUDE_TFTP_COMMAND -p Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc
     21 export BL33=$PWD/Build/Armada80x0McBin-AARCH64/RELEASE_GCC5/FV/ARMADA_EFI.fd
     22 
     23 else
     24 
     25 # build u-boot
     26 make -C u-boot mvebu_mcbin-88f8040_defconfig
     27 make -C u-boot
     28 
     29 export BL33=$PWD/u-boot/u-boot.bin
     30 
     31 fi
     32 
     33 # build arm-trusted-firmware
     34 export SCP_BL2=$PWD/mv-bin/mrvl_scp_bl2.img
     35 #export SCP_BL2=$PWD/mrvl_scp_bl2_pm.img # TODO: find real pm-enabled blob
     36 export MV_DDR_PATH=$PWD/mv-ddr
     37 
     38 make -C tfa USE_COHERENT_MEM=0 LOG_LEVEL=20 PLAT=a80x0_mcbin all fip mrvl_flash
     39 
     40 cp tfa/build/a80x0_mcbin/release/flash-image.bin flash-image.bin
     41 
     42 # build boot.scr
     43 u-boot/tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr