Message ID | 1553761801-2489-1-git-send-email-jun.nie@linaro.org |
---|---|
Headers | show |
Series | pico-imx7d: Add support for BL33 case | expand |
On Thu, Mar 28, 2019 at 5:30 AM Jun Nie <jun.nie@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?
Otavio Salvador <otavio.salvador@ossystems.com.br> 于2019年3月28日周四 下午8:57写道: > > On Thu, Mar 28, 2019 at 5:30 AM Jun Nie <jun.nie@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
Hi Otavio, And for the file name pico-imx7d_bl33_defconfig, pico-pi-imx7d_bl33_defconfig should be better in my later thought. Because a concrete device tree source file should be specified in defconfig file, so that public key can be stored in u-boot FDT blob for kernel/initramfs FIT signature verification. What's your comments? Thanks! Jun
On Wed, Apr 3, 2019 at 9:00 AM Jun Nie <jun.nie@linaro.org> wrote: > And for the file name pico-imx7d_bl33_defconfig, > pico-pi-imx7d_bl33_defconfig should be better in my later thought. > Because a concrete device tree source file should be specified in > defconfig file, so that public key can be stored in u-boot FDT blob > for kernel/initramfs FIT signature verification. What's your comments? The FIT image might have them all, no? It would allow a single binary to work on all baseboards, giving a very nice user experience.
Otavio Salvador <otavio.salvador@ossystems.com.br> 于2019年4月4日周四 下午8:40写道: > > On Wed, Apr 3, 2019 at 9:00 AM Jun Nie <jun.nie@linaro.org> wrote: > > And for the file name pico-imx7d_bl33_defconfig, > > pico-pi-imx7d_bl33_defconfig should be better in my later thought. > > Because a concrete device tree source file should be specified in > > defconfig file, so that public key can be stored in u-boot FDT blob > > for kernel/initramfs FIT signature verification. What's your comments? > > The FIT image might have them all, no? It would allow a single binary > to work on all baseboards, giving a very nice user experience. The FIT image have all device trees. I mean the device tree for u-boot should be specified. As device trees are copied from kernel, while there is no dts file for pico-imx7d. It is a bit peculiar if you specify device tree as pico-pi-imx7d in pico-imx7d_bl33_defconfig. > > -- > 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