I have a clone of u-boot-xlnx, I do not try to pull any updates and just do this:
cd u-boot-xlnx makeAs near as I can tell this uses the generic "xilinx_zynq_virt_defconfig". In other words back in June, I must have done "make xilinx_zynq_virt_defconfig".
CONFIG_OF_BOARD=y CONFIG_OF_LIST="zynq-zc702 zynq-zc706 zynq-zc770-xm010 zynq-zc770-xm011 zynq-zc770-xm011-x16 zynq-zc770-xm012 zynq-zc770-xm013 zynq-cc108 zynq-microzed zynq-minized zynq-picozed zynq-zed zynq-zturn zynq-zturn-v5 zynq-zybo zynq-zybo-z7 zynq-dlc20-rev1.0"
How can this work?
Take a look at doc/README.multi-dtb-fit -- which explains the idea. A routine called board_fit_config_name_match() figures out which DTB to actually use. There are two related options: U-Boot itself uses (CONFIG_MULTI_DTB_FIT). The SPL uses (CONFIG_SPL_MULTI_DTB_FIT).
Also look at doc/usage/fit/howto.rst which explains even more in detail.
Consider another board that doesn't use this scheme, such as omap3_beagle_defconfig. Here there are no CONFIG_OF options like the zynq has and the dtb is specified by:
CONFIG_DEFAULT_FDT_FILE="omap3-beagle.dtb"
The build fails at: "fatal error: openssl/engine.h: No such file or directory". Apparently the Fedora folks are deprecating this, but have not (yet) removed it. I do this:
su dnf install openssl-devel-engineThis is not used for the actual build of U-boot, but for something in the "tools" directory that I probably don't need. Hopefully somebody is maintaining whatever it is and planning to use whatever new API replaces the "engine".
make clean make &> build.log make clean make V=1 &> buildV.logThis gives full details of all the commands. I won't keep it all, but I am particularly interested in the last commands that pull out binary images and such.
./tools/mkimage -T zynqimage -R ./"" -d spl/u-boot-spl-align.bin spl/boot.bin >/dev/null && cat /dev/nullThis tool is used for even fancier tricks.
I also try spl/boot.bin, but it also does nothing when booted (at least no output on the serial port). Being curious, I fire up the JTAG again and see what is up:
halt zynq.cpu0: MPIDR level2 0, cluster 0, core 0, multi core, no SMT target halted in Thumb state due to debug-request, current mode: Supervisor cpsr: 0x400001f3 pc: 0xfffffd5c MMU: disabled, D-Cache: disabled, I-Cache: enabledBeing in Thumb state at this odd address hardly seems right.
arm disassemble 0xfffffd00 64 0xfffffd54 0000 0000 andeq r0, r0, r0 0xfffffd58 0000 0000 andeq r0, r0, r0 0xfffffd5c 0000 0000 andeq r0, r0, r0 0xfffffd60 0000 0000 andeq r0, r0, r0 0xfffffd64 0000 0000 andeq r0, r0, r0To just display memory with OpenOCD, use this:
mdw 0xfffff000 512 0xfffff000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0xfffff020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0xfffff040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ....Apparently "md" is for "memory display" and the "w" says to show 32 bit words. Instead of "w", you can use d, h, or b for 64 bit "double", 16 bit half, or bytes. Typing "reg" shows registers.
Tom's Computer Info / tom@mmto.org