nuvoton980 uboot spi nand boot (二)
1 Scope of Document
This document describes how to support spi nand boot
2 Requiremen
2.1 Function Requirement
2.2 Performance Requirement
NA
3 Method
3.1 Export cross compiler
export PATH=$PATH:/usr/local/arm_linux_4.8/bin/
3.2 Change
configs/nuc980_eth2uart_defconfig
# CONFIG_SPI_FLASH_STMICRO is not set
-# CONFIG_SPI_FLASH_SST is not set
+CONFIG_SPI_FLASH_WINBOND=y
# CONFIG_SPI_NAND is not set
CONFIG_SPI_NAND=y
CONFIG_SPI_FLASH_USE_4K_SECTORS=y
# CONFIG_SPI_FLASH_MTD is not set
include/configs/nuc980_eth2uart.h
#define CONFIG_SYS_USE_SPIFLASH
#define CONFIG_SYS_USE_NANDFLASH
-/*#define CONFIG_ENV_IS_IN_NAND */
-#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_IS_IN_NAND
+/*#define CONFIG_ENV_IS_IN_SPI_FLASH*/
/*#define CONFIG_ENV_IS_IN_MMC */
#define CONFIG_BOARD_EARLY_INIT_F
#define CONFIG_SYS_NAND_ECCBYTES 12
#ifdef CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET 0x80000
-#define CONFIG_ENV_SIZE 0x10000
+#define CONFIG_ENV_SIZE 0x20000
#define CONFIG_ENV_SECT_SIZE 0x20000
#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SECT_SIZE) /* Env range : 0x80000 ~ 0x100000 */
#define CONFIG_ENV_OVERWRITE
#define CONFIG_STACKSIZE (32*1024) /* regular stack */
+#define CONFIG_BOOTCOMMAND "sf probe 0 30000000; sf read 0x7fc0 0x200000 0x800000; bootm 0x7fc0"
#endif
make disclean
make nuc980_eth2uart_defconfig
make
4 Output file
root@vmuer-VirtualBox:/home/vmuer/tmp/nuc980bsp/u-boot-2016.11# ls spl/u-boot-spl.bin
root@vmuer-VirtualBox:/home/vmuer/tmp/nuc980bsp/u-boot-2016.11# ls u-boot.bin