summaryrefslogtreecommitdiff
path: root/build_atf.sh
blob: 65e62faa6cc7a3ae6c9e5770245f853d08c7e573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

set -e

if [ -d build ]; then
    rm -rf build
fi

manual_config() {
    sed -i.bak001 '/#include <platform_def.h>/a #define IMX8MP_FIP_MMAP' plat/imx/imx8m/imx8mp/imx8mp_io_storage.c
}

restore_manual_config() {
    if [ -e plat/imx/imx8m/imx8mp/imx8mp_io_storage.c.bak001 ]; then
	mv -f plat/imx/imx8m/imx8mp/imx8mp_io_storage.c.bak001 \
	   plat/imx/imx8m/imx8mp/imx8mp_io_storage.c
    fi
}

restore_manual_config

manual_config

make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- PLAT=imx8mp \
     IMX_BOOT_UART_BASE=0x30880000 \
     SPD=opteed NEED_BL2=yes NEED_BL32=yes NEED_BL33=yes \
     LOG_LEVEL=50 \
     USE_TBBR_DEFS=1 GENERATE_COT=1 TRUSTED_BOARD_BOOT=1 \
     MBEDTLS_DIR=../mbedtls \
     BL32=../optee_os/build.mx8mpevk/core/tee-header_v2.bin \
     BL32_EXTRA1=../optee_os/build.mx8mpevk/core/tee-pager_v2.bin \
     BL32_EXTRA2=../optee_os/build.mx8mpevk/core/tee-pageable_v2.bin \
     BL33=/tmp/uboot-imx8mp/u-boot.bin \
     fip bl2 bl31

restore_manual_config