stetp1: add the new default configure file
~/configs/zynq_ax7020_defconfig
1 CONFIG_ARM=y
2 CONFIG_SYS_CONFIG_NAME="zynq_ax7020"
3 CONFIG_ARCH_ZYNQ=y
4 CONFIG_DEFAULT_DEVICE_TREE="zynq-ax7020"
5 CONFIG_SPL=y
6 CONFIG_FIT=y
7 CONFIG_FIT_VERBOSE=y
8 CONFIG_FIT_SIGNATURE=y
9 CONFIG_SYS_NO_FLASH=y
10 CONFIG_HUSH_PARSER=y
11 CONFIG_SYS_PROMPT="Zynq> "
12 # CONFIG_CMD_IMLS is not set
13 # CONFIG_CMD_FLASH is not set
14 CONFIG_CMD_MMC=y
15 CONFIG_CMD_SF=y
16 CONFIG_CMD_I2C=y
17 CONFIG_CMD_USB=y
18 CONFIG_CMD_DFU=y
19 CONFIG_CMD_GPIO=y
20 # CONFIG_CMD_SETEXPR is not set
21 CONFIG_CMD_TFTPPUT=y
22 CONFIG_CMD_DHCP=y
23 CONFIG_CMD_MII=y
24 CONFIG_CMD_PING=y
25 CONFIG_CMD_CACHE=y
26 CONFIG_CMD_EXT2=y
27 CONFIG_CMD_EXT4=y
28 CONFIG_CMD_EXT4_WRITE=y
29 CONFIG_CMD_FAT=y
30 CONFIG_CMD_FS_GENERIC=y
31 CONFIG_OF_EMBED=y
32 CONFIG_NET_RANDOM_ETHADDR=y
33 CONFIG_SPL_DM_SEQ_ALIAS=y
34 CONFIG_ZYNQ_SDHCI=y
35 CONFIG_SPI_FLASH=y
36 CONFIG_SPI_FLASH_BAR=y
37 CONFIG_SPI_FLASH_SPANSION=y
38 CONFIG_ZYNQ_GEM=y
39 CONFIG_DEBUG_UART=y
40 CONFIG_DEBUG_UART_ZYNQ=y
41 CONFIG_DEBUG_UART_BASE=0xe0001000
42 CONFIG_DEBUG_UART_CLOCK=50000000
43 CONFIG_ZYNQ_QSPI=y
44 CONFIG_USB=y
45 CONFIG_USB_EHCI_HCD=y
46 CONFIG_USB_ULPI_VIEWPORT=y
47 CONFIG_USB_ULPI=y
step2: add the new include file
~/include/configs/zynq_ax7020.h
/*
2 * (C) Copyright 2014 ALINX Inc.
3 *
4 * Configuration for Zynq Development Board - AX7010/AX7020
5 * See zynq-common.h for Zynq common configs
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10 #ifndef __CONFIG_ZYNQ_AX7020_H
11 #define __CONFIG_ZYNQ_AX7020_H
12
13 #define CONFIG_ZYNQ_I2C0
14 #define CONFIG_ZYNQ_I2C1
15 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
16 #define CONFIG_CMD_EEPROM
17 #define CONFIG_ZYNQ_GEM_EEPROM_ADDR 0x50
18 #define CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET 0xFA
19 #define CONFIG_DISPLAY
20 #define CONFIG_I2C_EDID
21
22 /* Define AX7010/AX7020 PS Clock Frequency to 33.333333MHz */
23 #define CONFIG_ZYNQ_PS_CLK_FREQ 33333333UL
24
25 #define CONFIG_EXTRA_ENV_SETTINGS \
26 "ethaddr=00:0a:35:00:01:22\0" \
27 "kernel_image=uImage\0" \
28 "kernel_load_address=0x2080000\0" \
29 "ramdisk_image=uramdisk.image.gz\0" \
30 "ramdisk_load_address=0x4000000\0" \
31 "devicetree_image=devicetree.dtb\0" \
32 "devicetree_load_address=0x2000000\0" \
33 "bitstream_image=system.bit.bin\0" \
34 "boot_image=BOOT.bin\0" \
35 "loadbit_addr=0x100000\0" \
36 "loadbootenv_addr=0x2000000\0" \
37 "kernel_size=0x500000\0" \
38 "devicetree_size=0x20000\0" \
39 "ramdisk_size=0x5E0000\0" \
40 "boot_size=0xF00000\0" \
41 "fdt_high=0x20000000\0" \
42 "initrd_high=0x20000000\0" \
43 "bootenv=uEnv.txt\0" \
44 "loadbootenv=load mmc 0 ${loadbootenv_addr} ${bootenv}\0" \
45 "importbootenv=echo Importing environment from SD ...; " \
46 "env import -t ${loadbootenv_addr} $filesize\0" \
47 "sd_uEnvtxt_existence_test=test -e mmc 0 /uEnv.txt\0" \
48 "preboot=if test $modeboot = sdboot && env run sd_uEnvtxt_existence_test; " \
49 "then if env run loadbootenv; " \
50 "then env run importbootenv; " \
51 "fi; " \
52 "fi; \0" \
53 "mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
54 "mmcinfo && " \
55 "load mmc 0 ${loadbit_addr} ${bitstream_image} && " \
56 "fpga load 0 ${loadbit_addr} ${filesize}\0" \
57 "norboot=echo Copying Linux from NOR flash to RAM... && " \
58 "cp.b 0xE2100000 ${kernel_load_address} ${kernel_size} && " \
59 "cp.b 0xE2600000 ${devicetree_load_address} ${devicetree_size} && " \
60 "echo Copying ramdisk... && " \
61 "cp.b 0xE2620000 ${ramdisk_load_address} ${ramdisk_size} && " \
62 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
63 "qspiboot=echo Copying Linux from QSPI flash to RAM... && " \
64 "sf probe 0 0 0 && " \
65 "sf read ${kernel_load_address} 0x100000 ${kernel_size} && " \
66 "sf read ${devicetree_load_address} 0x600000 ${devicetree_size} && " \
67 "echo Copying ramdisk... && " \
68 "sf read ${ramdisk_load_address} 0x620000 ${ramdisk_size} && " \
69 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
70 "uenvboot=" \
71 "if run loadbootenv; then " \
72 "echo Loaded environment from ${bootenv}; " \
73 "run importbootenv; " \
74 "fi; " \
75 "if test -n $uenvcmd; then " \
76 "echo Running uenvcmd ...; " \
77 "run uenvcmd; " \
78 "fi\0" \
79 "sdboot=if mmcinfo; then " \
80 "run uenvboot; " \
81 "echo Copying Linux from SD to RAM... && " \
82 "load mmc 0 ${kernel_load_address} ${kernel_image} && " \
83 "load mmc 0 ${devicetree_load_address} ${devicetree_image} && " \
84 "bootm ${kernel_load_address} - ${devicetree_load_address}; " \
85 "fi\0" \
86 "usbboot=if usb start; then " \
87 "run uenvboot; " \
88 "echo Copying Linux from USB to RAM... && " \
89 "load usb 0 ${kernel_load_address} ${kernel_image} && " \
90 "load usb 0 ${devicetree_load_address} ${devicetree_image} && " \
91 "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
92 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}; " \
93 "fi\0" \
94 "nandboot=echo Copying Linux from NAND flash to RAM... && " \
95 "nand read ${kernel_load_address} 0x100000 ${kernel_size} && " \
96 "nand read ${devicetree_load_address} 0x600000 ${devicetree_size} && " \
97 "echo Copying ramdisk... && " \
98 "nand read ${ramdisk_load_address} 0x620000 ${ramdisk_size} && " \
99 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
100 "jtagboot=echo TFTPing Linux to RAM... && " \
101 "tftpboot ${kernel_load_address} ${kernel_image} && " \
102 "tftpboot ${devicetree_load_address} ${devicetree_image} && " \
103 "tftpboot ${ramdisk_load_address} ${ramdisk_image} && " \
104 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
105 "rsa_norboot=echo Copying Image from NOR flash to RAM... && " \
106 "cp.b 0xE2100000 0x100000 ${boot_size} && " \
107 "zynqrsa 0x100000 && " \
108 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
109 "rsa_nandboot=echo Copying Image from NAND flash to RAM... && " \
110 "nand read 0x100000 0x0 ${boot_size} && " \
111 "zynqrsa 0x100000 && " \
112 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
113 "rsa_qspiboot=echo Copying Image from QSPI flash to RAM... && " \
114 "sf probe 0 0 0 && " \
115 "sf read 0x100000 0x0 ${boot_size} && " \
116 "zynqrsa 0x100000 && " \
117 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
118 "rsa_sdboot=echo Copying Image from SD to RAM... && " \
119 "load mmc 0 0x100000 ${boot_image} && " \
120 "zynqrsa 0x100000 && " \
121 "bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}\0" \
122
123 #include <configs/zynq-common.h>
124
125 #endif
step3: add device tree
~/arch/arm/dts/zynq-ax7020.dts
1 /*
2 * ALINX AX7020 board DTS
3 *
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7 /dts-v1/;
8 #include "zynq-7000.dtsi"
9
10 / {
11 model = "ALINX AX7020 Development Board";
12 compatible = "ALINX,zynq", "xlnx,zynq-7000";
13
14 aliases {
15 ethernet0 = &gem0;
16 serial0 = &uart1;
17 spi0 = &qspi;
18 mmc0 = &sdhci0;
19 };
20
21 memory {
22 device_type = "memory";
23 reg = <0x0 0x40000000>;
24 };
25
26 chosen {
27 bootargs = "";
28 stdout-path = "serial0:115200n8";
29 };
30
31 usb_phy0: phy0 {
32 compatible = "usb-nop-xceiv";
33 #phy-cells = <0>;
34 reset-gpios = <&gpio0 46 1>;
35 };
36 };
37
38 &clkc {
39 ps-clk-frequency = <33333333>;
40 };
41
42 &gem0 {
43 status = "okay";
44 phy-mode = "rgmii-id";
45 phy-handle = <ðernet_phy>;
46
47 ethernet_phy: ethernet-phy@0 {
48 reg = <0>;
49 };
50 };
51
52 &qspi {
53 u-boot,dm-pre-reloc;
54 status = "okay";
55 };
56
57 &sdhci0 {
58 u-boot,dm-pre-reloc;
59 status = "okay";
60 };
61
62 &uart1 {
63 u-boot,dm-pre-reloc;
64 status = "okay";
65 };
66
67 &usb0 {
68 status = "okay";
69 dr_mode = "host";
70 usb-phy = <&usb_phy0>;
71 };
step4: set the SDK enviroment
source /opt/Xilinx/SDK/2015.2/settings64.sh
step5: configure the uboot settings for alx7020 board
make CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_ax7020_defconfig
make CROSS_COMPILE=arm-xilinx-linux-gnueabi-
error handing:
question: dtc: not found
Answer: apt-get install device-tree-compiler