June 13, 2024

the Zynq FSBL - extract and reorganize the FSBL source

What I want to do is to transfer the FSBL sources from "embeddedsw" to a self contained source tree, and to create a Makefile in my own style to build it from the new tree. This goal is a bit vague, in part because I am not sure as I start exactly what I want to do.

The original source is in:

/u1/Projects/FPGA/Ebaz/embeddedsw/lib/sw_apps/zynq_fsbl
/u1/Projects/FPGA/Ebaz/embeddedsw/lib/sw_apps/zynq_fsbl/src
/u1/Projects/ebaz/embeddedsw/lib/sw_apps/zynq_fsbl/misc/ps7_cortexa9_0
The last directory is critical, and only gets created when you build the FSBL using the distributed source and Makefile.

I often find myself wondering where a give source file is. As an example, I am looking for xil_printf.c. I do this:

locate xil_printf.c | grep zynq_fsbl
/u1/Projects/FPGA/Ebaz/embeddedsw/lib/sw_apps/zynq_fsbl/misc/ps7_cortexa9_0/libsrc/standalone/src/xil_printf.c
/u1/Projects/FPGA/Ebaz/embeddedsw/lib/sw_apps/zynq_fsbl/misc/ps7_cortexa9_0/include/xil_printf.c
The first hit is what we want. The second is something entirely bogus -- what is a C source file doing in the include directory? This is almost certainly some mistake when header files were copied into that directory and can be ignored.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org