[U-Boot] [PATCH v2 0/6] pico-imx7d: Add support for BL33 case

Jun Nie jun.nie at linaro.org
Wed Apr 3 11:47:18 UTC 2019


Otavio Salvador <otavio.salvador at ossystems.com.br> 于2019年3月28日周四 下午8:57写道:
>
> On Thu, Mar 28, 2019 at 5:30 AM Jun Nie <jun.nie at linaro.org> wrote:
> >
> > Add configuration to boot U-boot as BL33 case. The boot flow
> > is ATF -> OPTEE -> U-boot.
>
> Could you add a README explaining how to use / test it?

Hi Otavio,

Below is draft of README. some of command may not be accurate because I am
on travel and cannot access latest code in my PC in home. If you are
OK with idea
in it, I will polish it later. The SPL is built but not used because
the BL33 is loaded
by ATF while ATF exist in SRAM. ATF cannot load SPL into SRAM to
override itself.


README.pico-imx7d_BL33
This document describes the instruction to build ATF/OPTEE and flash eMMC on
pico-imx7d board.  U-Boot is loaded by ATF/OPTEE in this setup.

- Build u-boot
    # set environment variable of CROSS_COMPILE for your toolchain and ARCH=arm
    make pico-pi-imx7d-mbl_defconfig
    make all

- Download and build OPTEE
    git clone https://git.linaro.org/landing-teams/working/mbl/optee_os.git
-b linaro-pico
    make PLATFORM=imx PLATFORM_FLAVOR=mx7dpico_mbl ARCH=arm

- Download and build ATF, create FIP image
    git clone https://git.linaro.org/landing-teams/working/mbl/arm-trusted-firmware.git
-b linaro-imx7
    make DEBUG=1 PLAT=picopi ARCH=aarch32 ARM_ARCH_MAJOR=7
CROSS_COMPILE=arm-linux-gnueabihf- LOG_LEVEL=50 V=1 CRASH_REPORTING=1
AARCH32_SP=optee all
    wget http://git.linaro.org/landing-teams/working/mbl/u-boot.git/tree/board/technexion/pico-imx7d/pico-imx7d.cfg?h=linaro-imx
    mkimage -n pico-imx7d.cfg -T imximage -e 0x87800000 -d -d
build/picopi/debug/bl2.bin bl2.imx
    # create a  fiptool_images/ folder under atf folder, copy
u-boot.bin in u-boot folder and tee*.bin in optee core/tee/ folder to
fiptool_images. Run below command to generate FIP image.
    tools/fiptool/fiptool create --tos-fw fiptool_images/tee-header_v2.bin \
    --tos-fw-extra1 fiptool_images/tee-pager_v2.bin \
    --tos-fw-extra2 fiptool_images/tee-pageable_v2.bin \
    --nt-fw fiptool_images/u-boot.bin \
    fip.bin

- Burn the images to eMMC for test.
    # Run below command in atf folder:
    dd if=build/picopi/debug/bl2.bin.imx of=/dev/disk/by-id/usb-<your
device>  bs=1024 seek=1;sync
    dd if=fip.bin of=/dev/disk/by-id/usb-<your device>  bs=1024 seek=1;sync

- Test
    Just boot up your board and wait for u-boot start up after ATF's
log. For booting Linux in FIT image, please reference the FIT files in
u-boot doc/uImage.FIT/ folder.


>
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


More information about the U-Boot mailing list