We see the file fsbl/nand.c -- but on close inspection we see that pretty much the entire contents of the file are conditional on:
#if defined(XPAR_PS7_NAND_0_BASEADDR) || defined(XPAR_XNANDPS_0_FLASHBASE)Indeed, neither of these variables are defined. It they were defined, it would be done in include/xparameters.h -- we can look in that file and fine definitions like:
#define XPAR_PS7_SD_0_BASEADDR 0xE0100000 #define XPAR_PS7_QSPI_LINEAR_0_S_AXI_BASEADDR 0xFC000000So this explains why we get support for the SD card and Qspi devices. Why not NAND? What could we do to pull in NAND support?
#define CONFIG_NAND_DRIVER #define CONFIG_QSPI_DRIVERApart from making things clearer, this would make the base address definitions easily available for any configuration. As it is, they are not to be found anywhere for the NAND driver.
XNandPs_Read()A search through the "embeddedsw" distribution finds that this is provided by the file:
XilinxProcessorIPLib/drivers/nandps/src/xnandps.hThe directory "XilinxProcessorIPLib/driver" has quite a collection of drivers, including "sdps/src" for the SD card and so forth.
Note though that the SD driver (as an example) used in the FSBL build was found in:
zynq_fsbl/misc/ps7_cortexa9_0/libsrc/sdps/srcBut wait! That entire ps7_cortexa9_0 directory was build "on the fly" by the distributed FSBL build process. I ran that first, then pulled files from it. Where did that build process get the SD driver from? This is handled by the file:
misc/copy_bsp.shAnd this reminds us of an important decision I made when I did the original build. I specified the Zedboard as my board target. This means that the file xparameters.h was obtained from the "zed" directory. In that file we see:
# selection of drivers is based on the board selected DRIVERS_LIST="$BOARD_DIR/drivers.txt"So, this is really the answer to the question. A Zedboard has Qspi flash, not NAND, so a NAND driver is not required. The copy_bsp.sh script does in fact copy drivers from "XilinxProcessorIPLib/drivers".
I have to remind myself that I am not trying to build the FSBL in order to use and run it. For that, I might go to the U-Boot distribution, which does work on my NAND based boards and presumably has everything set up to build it.
I know where the NAND driver is, should I want to study it, and I can for the purposes on studying the FSBL, just look at the SD driver (or for an even more simple case, the NOR driver).
Tom's Computer Info / tom@mmto.org