diff --git a/config.mk b/config.mk index b627982..0c411b2 100644 --- a/config.mk +++ b/config.mk @@ -227,7 +227,7 @@ endif # Xilinx, added to prevent unaligned accesses which started happening # with GCC 4.5.2 tools -CFLAGS += -mno-unaligned-access +# CFLAGS += -mno-unaligned-access CFLAGS_SSP := $(call cc-option,-fno-stack-protector) CFLAGS += $(CFLAGS_SSP) diff --git a/include/configs/zynq_zed.h b/include/configs/zynq_zed.h index 6b77698..d60c063 100644 --- a/include/configs/zynq_zed.h +++ b/include/configs/zynq_zed.h @@ -20,6 +20,17 @@ #ifndef __CONFIG_ZYNQ_ZED_H #define __CONFIG_ZYNQ_ZED_H + +#define CONFIG_SUPPORT_RAW_INITRD + +#define CONFIG_MACH_TYPE MACH_TYPE_XILINX_EP107 + +// #define CONFIG_ENV_IS_NOWHERE +#define CONFIG_SYS_NO_FLASH + +#define CONFIG_ZYNQ_SDHCI0 +#define CONFIG_ZYNQ_SPI + #include /* @@ -28,52 +39,83 @@ #define CONFIG_ZED /* Community Board */ /* Default environment */ + +#undef CONFIG_BOOTCOMMAND +#define CONFIG_BOOTCOMMAND "run sdboot" + #define CONFIG_IPADDR 192.168.1.10 #define CONFIG_SERVERIP 192.168.1.50 #undef CONFIG_ZYNQ_XIL_LQSPI -/* No NOR Flash available on ZedBoard */ -#define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_SYS_LONGHELP + +#ifndef CONFIG_ENV_IS_NOWHERE +# ifndef CONFIG_SYS_NO_FLASH +/* Environment in NOR flash */ +# define CONFIG_ENV_IS_IN_FLASH +# elif defined(CONFIG_ZYNQ_SPI) +/* Environment in Serial Flash */ +# define CONFIG_ENV_IS_IN_SPI_FLASH +# elif defined(CONFIG_NAND_ZYNQ) +/* Environment in NAND flash */ +# define CONFIG_ENV_IS_IN_NAND +# elif defined(CONFIG_SYS_NO_FLASH) +# define CONFIG_ENV_IS_NOWHERE +# endif + +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE +# define CONFIG_ENV_OFFSET 0xE0000 +# define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ +#endif #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ - "ethaddr=00:0a:35:00:01:22\0" \ - "kernel_size=0x140000\0" \ - "ramdisk_size=0x200000\0" \ "qspiboot=sf probe 0 0 0;" \ "sf read 0x8000 0x100000 0x2c0000;" \ "sf read 0x1000000 0x3c0000 0x40000;" \ "sf read 0x800000 0x400000 0x800000;" \ "go 0x8000\0" \ - "sdboot_linaro=echo Copying Linux from SD to RAM...;" \ - "mmcinfo;" \ - "fatload mmc 0 0x8000 zImage;" \ - "fatload mmc 0 0x1000000 devicetree_linaro.dtb;" \ - "go 0x8000\0" \ "sdboot=echo Copying Linux from SD to RAM...;" \ + "fpga info 0;" \ "mmcinfo;" \ - "fatload mmc 0 0x8000 zImage;" \ - "fatload mmc 0 0x1000000 devicetree.dtb;" \ - "fatload mmc 0 0x800000 ramdisk8M.image.gz;" \ - "go 0x8000\0" \ - "jtagboot=echo TFTPing Linux to RAM...;" \ - "tftp 0x8000 zImage;" \ - "tftp 0x1000000 devicetree.dtb;" \ - "tftp 0x800000 ramdisk8M.image.gz;" \ - "go 0x8000\0" + "fatload mmc 0 0x800000 system.bin;" \ + "fpga load 0 0x800000 0x${filesize};" \ + "fatload mmc 0 0x800000 zImage;" \ + "fatload mmc 0 0x700000 devicetree.dtb;" \ + "fatload mmc 0 0x1000000 initramfs.cpio;" \ + "bootz 0x800000 0x1000000:0x${filesize} 0x700000;" \ + "go 0x800000\0" \ + "tftpboot=echo Scripted Boot via TFTP...;" \ + "fpga info 0;" \ + "echo Requesting Boot Script via TFTP...;" \ + "bootp 0xF00000;" \ + "echo Executing Boot Script...;" \ + "source 0xF00000\0" +// "ethaddr=00:0a:35:00:01:22\0" \ +// #include #define CONFIG_CMD_DATE /* RTC? */ #define CONFIG_CMD_PING /* Might be useful for debugging */ +// #define CONFIG_CMD_MII /* Ethernet PHY related commands */ #define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ +// #define CONFIG_CMD_IRQ /* irqinfo */ +// #define CONFIG_CMD_IMLS /* List all found images */ +// #define CONFIG_CMD_HWFLOW /* RTS/CTS hw flow control */ +#define CONFIG_CMD_MD5SUM /* print md5 message digest */ +// #define CONFIG_CMD_ELF /* Elf related commands */ +// #define CONFIG_CMD_BOOTM /* Boot from memory */ +#define CONFIG_CMD_BOOTZ /* Boot raw data from memory */ +#define CONFIG_BOOTM_LINUX 1 +#define CONFIG_BOOTM_NETBSD 1 + #define CONFIG_REGINFO /* Again, debugging */ #undef CONFIG_CMD_SETGETDCR /* README says 4xx only */ #define CONFIG_TIMESTAMP /* print image timestamp on bootm, etc */ -#define CONFIG_PANIC_HANG /* For development/debugging */ +#define CONFIG_PANIC_HANG /* For development/debugging */ #define CONFIG_AUTO_COMPLETE #define CONFIG_CMDLINE_EDITING @@ -81,6 +123,9 @@ #undef CONFIG_SYS_PROMPT #define CONFIG_SYS_PROMPT "zed-boot> " +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + /* this is to initialize GEM at uboot start */ /* #define CONFIG_ZYNQ_INIT_GEM */ /* this is to set ipaddr, ethaddr and serverip env variables. */ @@ -101,12 +146,12 @@ /* * SPI Settings */ -#define CONFIG_ZYNQ_SPI #define CONFIG_CMD_SPI -#define CONFIG_SF_DEFAULT_SPEED 30000000 +#define CONFIG_ZYNQ_SPI #define CONFIG_SPI_FLASH -#define CONFIG_CMD_SF #define CONFIG_SPI_FLASH_SPANSION +#define CONFIG_CMD_SF +#define CONFIG_SF_DEFAULT_SPEED 30000000 /* Place a Xilinx Boot ROM header in u-boot image? */ #undef CONFIG_ZYNQ_XILINX_FLASH_HEADER @@ -118,6 +163,10 @@ #endif #endif +/* TFTP */ +#define CONFIG_CMD_TFTPSRV +#define CONFIG_CMD_TFTPPUT + /* Secure Digital */ #define CONFIG_MMC @@ -126,8 +175,9 @@ #define CONFIG_ZYNQ_MMC #define CONFIG_CMD_MMC #define CONFIG_CMD_FAT -#define CONFIG_CMD_EXT2 +#define CONFIG_FAT_WRITE #define CONFIG_DOS_PARTITION +#define CONFIG_CMD_EXT2 #endif #endif /* __CONFIG_ZYNQ_ZED_H */