Knowledge Base Article

spl_nand.c:36: undefined reference to `nand_init'

Description

Due to a problem in the SoC EDS version 14.0,  you may see the compile error below when using bsp-editor to generate preloader to support booting from NAND flash, :

common/spl/libspl.o: In function `spl_nand_load_image':
...\software\spl_bsp\uboot-socfpga\common\spl/spl_nand.c:36: undefined reference to `nand_init'
...\software\spl_bsp\uboot-socfpga\common\spl/spl_nand.c:94: undefined reference to `nand_spl_load_image'
...\software\spl_bsp\uboot-socfpga\common\spl/spl_nand.c:97: undefined reference to `nand_spl_load_image'
...\software\spl_bsp\uboot-socfpga\common\spl/spl_nand.c:99: undefined reference to `nand_deselect'
Makefile:178: recipe for target '.../software/spl_bsp/uboot-socfpga/spl/u-boot-spl' failed
make[2]: *** [.../software/spl_bsp/uboot-socfpga/spl/u-boot-spl] Error 1
make[2]: Leaving directory '.../software/spl_bsp/uboot-socfpga/spl'
Makefile:612: recipe for target 'spl/u-boot-spl.bin' failed
make[1]: *** [spl/u-boot-spl.bin] Error 2
make[1]: Leaving directory '.../software/spl_bsp/uboot-socfpga'
make: *** [uboot-socfpga/spl/u-boot-spl.bin] Error 2

Resolution

To workaround this problem:

  1. Go to uboot-socfpga/include/configs/socfpga_common.h
  2. Modify \'#undef CONFIG_NAND_DENALI\' as \'#define CONFIG_NAND_DENALI\'


This problem is scheduled to be fixed in a future release of SoC EDS.


 

Updated 1 month ago
Version 2.0
No CommentsBe the first to comment