Thanks Michal! This is awesome. I can certainly use this. Please review my assumptions below...
> On Jun 12, 2019, at 07:39, Michal Simek <michal.si...@xilinx.com> wrote: > > Create bif like this. > Image - one partition load addr 0x80000 as data > dtb - one partition load addr 0x100000000 as data > > ATF - one partition (as today) EL3 > Trampoline code below() EL2-ns with filled kernel start to 0x80000 and > dtb at 0x100000000 > > fsbl starts ATF and it will pass handoff structure and primary program > will be trampoline executed in EL2 which will just pass proper arguments > to kernel. So in essence, the program below becomes a standalone binary file which essentially replaces "u-boot.bin" correct? Let's call it linux-boot.bin (inspired by comment in code below). This would mean that boot.bin file must contain linux-boot.bin so FSBL loads it to RAM prior to passing execution to ATF. If correct, linux-boot.bin must be loaded at 0xfffc8000 (if following the example below), correct? If I understand all this correctly, I could either use FSBL with a boot.bin containing basically everything needed to boot up to the kernel, including linux-boot.bin. Or I could use SPL inside an u-boot's mkimage made boot.bin configured to load a FIT image containing atf, linux-boot.bin,kernelImage,dtb ? If I understand FIT correctly, it is basically a "better", more straight forward way to load multiples binaries into RAM rather than messing with CONFIG_SPL_FS_LOAD_ARGS_NAME, CONFIG_SYS_SPL_ARGS_ADDR, CONFIG_SPL_FS_LOAD_KERNEL_NAME and CONFIG_SPL_FS_LOAD_PAYLOAD_NAME... correct? > > And that should be it. > > /* > * (C) Copyright 2015 - 2019, Xilinx, Inc > * > * Drops EL from 3 down to 2 and sets up the CPU for AArch64 execution. > * > * The kernel start address and DTB location can easily be patched at > runtime > * before jumping to this code-snippet if needed. > * > * To for example build and link to 0xfffc8000: > * aarch64-none-elf-gcc -nostartfiles -nodefaultlibs \ > * -Wl,--build-id=none,-Ttext=0xfffc8000 > linux-boot.s -o linux-boot > * > * Written by Edgar E. Iglesias and Jason Wu. > */ > .section .text > .global _start > _start: > ldr x17, kernel_start > ldr x0, kernel_dts > mov x1, xzr > mov x2, xzr > mov x3, xzr > blr x17 > .balign 8 > kernel_start: > .dword ${kernel_start} > kernel_dts: > .dword ${kernel_dts} Thanks again for taking the time. I shall submit a patch in README.booting.md if my endeavour looks upstreamable. -- _______________________________________________ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx