I am trying to use upstream atf on the p3518 devkit. But it just causes boot hangs. The same atf build works on p2972, the agx xavier devkit. I have a short reproduction sequence.
Set up a L4T r32.6.1 t194 bsp.
Flash the qspi using ./flash.sh jetson-xavier-nx-devkit-qspi mmcblk0p1. See it completes properly.
Build atf, tag v2.6 was used for this experiment, but master has the same results.
Package it into a tos image using python2 nv_tegra/tos-scripts/gen_tos_part_img.py --monitor=/path/to/bl31.bin bootloader/tos-mon-only_t194-upstream.img
Change tos symlink using ln -sf tos-mon-only_t194-upstream.img bootloader/tos_t194.img
Re-run flash using ./flash.sh jetson-xavier-nx-devkit-qspi mmcblk0p1. Note that this hangs.
The same build of atf works on the agx xavier devkits. I can also build upstream atf for t210 and t186 and those work on all consumer jetson devkits, including p3509+p3636. It would be good to fix upstream to also support p3518. I tried to look at the nvidia source release of atf, but with no git commit history, it is nigh impossible to compare back to upstream 1.3 and apply to upstream 2.6 or master.
just want to figure out your complete steps,
did you download the public release sources, (i.e. L4T Driver Package (BSP) Sources) to build the ATF source code, and using the bl31.bin ATF image for generating the tos.img ?
or, may I know where did you download (or, commands for syncing to upstream) the resources.
BTW,
this flash options, jetson-xavier-nx-devkit-qspi, it’s only updating the QSPI.
the actual flash commands for Xavier NX DevKit is, jetson-xavier-nx-devkit.
thanks
Upstream atf can be synced from the github mirror by: git clone https://github.com/ARM-software/arm-trusted-firmware
The tag most recent official tag/release can then be checked out in the working directory by: git checkout v2.6
And I’m building with the command (using the toolchain provided by my distro): CROSS_COMPILE=aarch64-linux-gnu- make -j33 PLAT=tegra TARGET_SOC=t194 bl31
Tegra support in upstream atf is handled by Varun Wadekar, or at least he’s the one with an @nvidia.com email that pushes the commits and communicates on the gerrit instance.
And yes, I understand the qspi target only updates the qspi. I’m just trying to give the shortest reproduction steps I can.
The only operable difference in that build command is the secure dispatcher type, everything else is the default setting or build time cosmetics. I need to be able to run without trusty. But I ran a build using:
make DEBUG=0 LOG_LEVEL=20 V=0 CROSS_COMPILE=aarch64-linux-gnu- -j33 PLAT=tegra TARGET_SOC=t194 SPD=trusty --output-sync=target
Then packaged a self-built trusty bin into a tos image, dropped it into the l4t 32.6.1 bsp, and changed the symlink as appropriate. The xavier nx devkit still fails as above, assert on read_erxctlr_el1. And the agx xavier devkit still works as intended.
Was this tested internally? Does an upstream atf build work on p3518 there?
I do not understand the English in that post. But I did look at the upstream gerrit and do see a pending commit to fix the issue. Thank you. I will cherry-pick that into my project.
Edit:
I have cherry-picked the commit and verified that it does allow flashing and boot to kernel on the Xavier NX.