Closed ladecadence closed 3 years ago
Hi, Are you using port C or port F to connect with SD card?
Port C
Hi,
CONFIG_NUC980_SD_PORT0 is for port F. Please try to enable CONFIG_NUC980_EMMC instead.
Sincerely,
Yi-An Chen
The problem then is that if I enable CONFIG_NUC980_EMMC, I get this error compiling uboot:
board/nuvoton/nuc980/nuc980.c: In function ‘board_mmc_init’:
board/nuvoton/nuc980/nuc980.c:194:3: error: #error Do not enable eMMC(CONFIG_NUC980_EMMC) and NAND(CONFIG_NAND_NUC980) at the same time!
# error Do not enable eMMC(CONFIG_NUC980_EMMC) and NAND(CONFIG_NAND_NUC980) at the same time!
^
board/nuvoton/nuc980/nuc980.c:209:2: warning: implicit declaration of function ‘nuc980_mmc_init’ [-Wimplicit-function-declaration]
nuc980_mmc_init(1); // init for eMMC
^
board/nuvoton/nuc980/nuc980.c:167:15: warning: unused variable ‘i’ [-Wunused-variable]
volatile int i;
^
scripts/Makefile.build:280: recipe for target 'board/nuvoton/nuc980/nuc980.o' failed
But if I disable CONFIG_NAND_NUC980 then I get this one:
drivers/mtd/nand/built-in.o: In function `nand_init_chip':
/home/user/NUC970_Buildroot-master/output/build/uboot-master/drivers/mtd/nand/nand.c:86: undefined reference to `board_nand_init'
/home/user/NUC970_Buildroot-master/output/host/usr/bin/arm-nuvoton-linux-uclibcgnueabi-ld.bfd: BFD (GNU Binutils) 2.26.1 assertion fail elf32-arm.c:8437
/home/user/NUC970_Buildroot-master/output/host/usr/bin/arm-nuvoton-linux-uclibcgnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
/home/user/NUC970_Buildroot-master/output/host/usr/bin/arm-nuvoton-linux-uclibcgnueabi-ld.bfd: final link failed: Invalid operation
Makefile:1210: recipe for target 'u-boot' failed
Any ideas?
You also have to
Sincerely,
Yi-An Chen
Hello again, I already did all that steps, but I get the same error:
drivers/mtd/nand/built-in.o: In function `nand_init_chip':
/home/user/NUC970_Buildroot-master/output/build/uboot-master/drivers/mtd/nand/nand.c:86: undefined reference to `board_nand_init'
/home/user/NUC970_Buildroot-master/output/host/usr/bin/arm-nuvoton-linux-uclibcgnueabi-ld.bfd: BFD (GNU Binutils) 2.26.1 assertion fail elf32-arm.c:8437
/home/user/NUC970_Buildroot-master/output/host/usr/bin/arm-nuvoton-linux-uclibcgnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
/home/user/NUC970_Buildroot-master/output/host/usr/bin/arm-nuvoton-linux-uclibcgnueabi-ld.bfd: final link failed: Invalid operation
Makefile:1210: recipe for target 'u-boot' failed
make[1]: *** [u-boot] Error 1
and in uboot .config:
# CONFIG_NAND_BOOT is not set
CONFIG_SD_BOOT=y
...
CONFIG_SUPPORT_SPL=y
CONFIG_SPL=y
...
CONFIG_CMD_MMC=y
# CONFIG_CMD_NAND is not set
...
CONFIG_NUC980_MMC=y
# CONFIG_NUC980_SD_PORT0 is not set
CONFIG_NUC980_EMMC=y
...
I'm using nuvoton_nuc980_chili_defconfig, and in uboot include/config/nuc980_chili.h I have:
/*#define CONFIG_SYS_USE_NANDFLASH */
/*#define CONFIG_ENV_IS_IN_NAND */
//#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_IS_IN_MMC
...
/* Following block is for MMC support */
#ifdef CONFIG_NUC980_MMC
#define CONFIG_CMD_FAT
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_DOS_PARTITION
/*#define CONFIG_MMC_TRACE */
/*#define CONFIG_NUC980_SD_PORT0 */
#define CONFIG_NUC980_EMMC /* Don't enable eMMC(CONFIG_NUC980_EMMC) and NAND(CONFIG_NAND_NUC980) at the same time! */
#ifdef CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_ENV_OFFSET 0x80000
#define CONFIG_ENV_SIZE /*2048*/0x10000
#define CONFIG_ENV_SECT_SIZE 512
#define CONFIG_ENV_OVERWRITE
#endif
#endif
NAND is not enabled in Chili board's configuration. You must've touched something to trigger this error. Please undo the modifications you made, reload Chili board's configuration, enable eMMC in menuconfig/header file and then rebuild uboot.
Yes, sorry, I started from scratch and now I can build an uboot binary that reads from SD card. Thank you very much.
I'm having problems booting from the SD0 on my NUC980 custom board. I used the ROM bootloader and NuWriter to send uboot to the SD card, and it manages to run uboot from the SD, so it looks the SD hardware is working. But then uboot is not finding anything on the SD interface. uboot is compiled with the CONFIG_MMC=y CONFIG_SD_BOOT=y CONFIG_NUC980_MMC=y and CONFIG_NUC980_SD_PORT0=y options. The uboot commands "mmc info" and "mmc part" don't return anything, and the SD is inserted and has a MBR format and one FAT partition.
The uboot screen shows:
(I don't have any NAND or SPI flash on my board)
but then:
And stops there.