Skip to contentSkip to conversation

Add support for Digilent Zybo (Xilinx Zynq-7000)

PATCH New Sebastien Van Cauwenberghe 2 participants 2 messages May 22, 2016 – Jun 12, 2016 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for Digilent Zybo (Xilinx Zynq-7000)

[PATCH] Add support for Digilent Zybo (Xilinx Zynq-7000)

---
 board/digilent/zybo/readme.txt                     | 75 ++++++++++++++++++++++
 .../0001-Modify-U-boot-env-for-Zybo-boot.patch     | 45 +++++++++++++
 configs/zynq_zybo_defconfig                        | 25 ++++++++
 3 files changed, 145 insertions(+)
 create mode 100644 board/digilent/zybo/readme.txt
 create mode 100644 board/digilent/zybo/uboot/0001-Modify-U-boot-env-for-Zybo-boot.patch
 create mode 100644 configs/zynq_zybo_defconfig
board/digilent/zybo/readme.txt new file +75 -0
new file mode 100644
index 0000000..f9ff939
@@ -0,0 +1,75 @@
+This is the buildroot board support for the Digilent Zybo. The Zybo is
+a development board based on the Xilinx Zynq-7000 based All-Programmable
+System-On-Chip.
+
+Zybo information including schematics, reference designs, and manuals are
+available from http://store.digilentinc.com/zybo-zynq-7000-arm-fpga-soc-trainer-board/ .
+
+Steps to create a working system for Zybo:
+
+1) make zynq_zybo_defconfig
+2) make
+3) copy files BOOT.BIN, u-boot-dtb.img, rootfs.cpio.uboot,
+	uImage, zynq-zybo.dtb into your SD card
+4) boot your Zybo
+
+The expected output:
+
+ U-Boot SPL 2016.05 (May 20 2016 - 16:16:24)
+ mmc boot
+ Trying to boot from MMC1
+ reading system.dtb
+ spl_load_image_fat_os: error reading image system.dtb, err - -1
+ reading u-boot-dtb.img
+ reading u-boot-dtb.img
+
+
+ U-Boot 2016.05 (May 20 2016 - 16:16:24 +0200)
+
+ Model: Zynq ZYBO Development Board
+ Board: Xilinx Zynq
+ I2C:   ready
+ DRAM:  ECC disabled 512 MiB
+ MMC:   sdhci at e0100000: 0
+ SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
+ In:    serial at e0001000
+ Out:   serial at e0001000
+ Err:   serial at e0001000
+ Model: Zynq ZYBO Development Board
+ Board: Xilinx Zynq
+ Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
+ I2C EEPROM MAC address read failed
+
+ Warning: ethernet at e000b000 (eth0) using random MAC address - 56:64:dd:a7:6d:94
+ eth0: ethernet at e000b000
+ ...
+
+Resulting system
+----------------
+A FAT32 partition should be created at the beginning of the SD Card
+and the following files should be installed:
+	/BOOT.BIN
+	/zynq-zybo.dtb
+	/uImage
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
+
+
+All needed files can be taken from output/images/
+
+BOOT.BIN, uImage and u-boot-dtb.img are direct copies of the same files
+available on output/images/
+
+There is a patch attached that redefines the U-Boot's environment
+to work with Buildroot out-of-the-box.
+
+You can alter the booting procedure by creating a file uEnv.txt
+in the root of the SD card. It is a plain text file in format
+<key>=<value> one per line:
+
+kernel_image=myimage
+modeboot=myboot
+myboot=...
+
+The serial console is accessible on the host on /dev/ttyUSB1 at 115200 bauds.
+
board/digilent/zybo/uboot/0001-Modify-U-boot-env-for-Zybo-boot.patch new file +45 -0

45 lines not on this page · raw message

configs/zynq_zybo_defconfig new file +25 -0
new file mode 100644
index 0000000..e2c8841
@@ -0,0 +1,25 @@
+BR2_arm=y
+BR2_cortex_a9=y
+BR2_ARM_ENABLE_NEON=y
+# BR2_COMPILER_PARANOID_UNSAFE_PATH is not set
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y
+BR2_BINUTILS_VERSION_2_26_X=y
+BR2_GCC_VERSION_5_X=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_DEFCONFIG="multi_v7"
+BR2_LINUX_KERNEL_UIMAGE=y
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zybo"
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/board/digilent/zybo/uboot"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_zybo"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_ZYNQ_IMAGE=y
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/1 Add support for Digilent Zybo (Xilinx Zynq-7000)

Hello,

Thanks a lot for this contribution! See below for a number of comments.

Quoted 1 line · Sebastien Van Cauwenberghe

[PATCH] Add support for Digilent Zybo (Xilinx Zynq-7000)

Not need to repeat the title of the commit in the commit log. Also, the commit title should rather be:

configs: add defconfig for Digilent Zybo

Quoted 9 lines
board/digilent/zybo/readme.txt new file +3 -0
new file mode 100644
index 0000000..f9ff939
@@ -0,0 +1,75 @@
+This is the buildroot board support for the Digilent Zybo. The Zybo is
+a development board based on the Xilinx Zynq-7000 based All-Programmable
+System-On-Chip.

board/digilent/zybo/readme.txt line 13

Quoted 10 lines
board/digilent/zybo/readme.txt new file +10 -0
+
+Zybo information including schematics, reference designs, and manuals are
+available from http://store.digilentinc.com/zybo-zynq-7000-arm-fpga-soc-trainer-board/ .
+
+Steps to create a working system for Zybo:
+
+1) make zynq_zybo_defconfig
+2) make
+3) copy files BOOT.BIN, u-boot-dtb.img, rootfs.cpio.uboot,
+	uImage, zynq-zybo.dtb into your SD card

Please use genimage to generate a ready-to-use SD card image. You can check many of the other board configurations in Buildroot that are doing this.

Also, why do you use an initramfs for the rootfs rather than the more traditional ext4 partition next to the FAT partition? This would be the preferred method for the defconfig in Buildroot.

Quoted 5 lines
board/digilent/zybo/readme.txt new file +5 -0
+Resulting system
+----------------
+A FAT32 partition should be created at the beginning of the SD Card
+and the following files should be installed:
+	/BOOT.BIN

board/digilent/zybo/readme.txt line 61

Quoted 10 lines
board/digilent/zybo/readme.txt new file +10 -0
+	/zynq-zybo.dtb
+	/uImage
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
+
+
+All needed files can be taken from output/images/
+
+BOOT.BIN, uImage and u-boot-dtb.img are direct copies of the same files
+available on output/images/

All of this can be simplified once you generate a complete SD card image with genimage.

board/digilent/zybo/readme.txt line 64

Quoted 2 lines
board/digilent/zybo/readme.txt new file +2 -0
+There is a patch attached that redefines the U-Boot's environment
+to work with Buildroot out-of-the-box.

Why do you patch the U-Boot built-in environment instead of providing an uEnv.txt file?

board/digilent/zybo/readme.txt line 74

Quoted 1 line
board/digilent/zybo/readme.txt new file +1 -0
+The serial console is accessible on the host on /dev/ttyUSB1 at 115200 bauds.

Saying it's on /dev/ttyUSB1 on the host is wrong. It might be on your machine, but it might be on ttyUSB0 on mine, or on ttyUSB2. There is no point in giving this information, since you don't know.

configs/zynq_zybo_defconfig line 4

Quoted 10 lines
configs/zynq_zybo_defconfig new file +4 -0
new file mode 100644
index 0000000..e2c8841
@@ -0,0 +1,25 @@
+BR2_arm=y
+BR2_cortex_a9=y
+BR2_ARM_ENABLE_NEON=y
+# BR2_COMPILER_PARANOID_UNSAFE_PATH is not set

Please leave this option to the default.

configs/zynq_zybo_defconfig line 6

Quoted 2 lines
configs/zynq_zybo_defconfig new file +2 -0
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y
+BR2_BINUTILS_VERSION_2_26_X=y

Please leave this to the default.

configs/zynq_zybo_defconfig line 7

Quoted 1 line
configs/zynq_zybo_defconfig new file +1 -0
+BR2_GCC_VERSION_5_X=y

Ditto.

configs/zynq_zybo_defconfig line 9

Quoted 2 lines
configs/zynq_zybo_defconfig new file +2 -0
+BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0"
+BR2_LINUX_KERNEL=y

Please use a fixed kernel version.

configs/zynq_zybo_defconfig line 12

Quoted 3 lines
configs/zynq_zybo_defconfig new file +3 -0
+BR2_LINUX_KERNEL_DEFCONFIG="multi_v7"
+BR2_LINUX_KERNEL_UIMAGE=y
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000"

Can you try to use zImage instead, which is now the standard format on ARM?

configs/zynq_zybo_defconfig line 17

Quoted 5 lines
configs/zynq_zybo_defconfig new file +5 -0
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zybo"
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+BR2_TARGET_ROOTFS_CPIO_UIMAGE=y

As suggested above, what about using an ext4 filesystem instead?

configs/zynq_zybo_defconfig line 18

Quoted 1 line
configs/zynq_zybo_defconfig new file +1 -0
+BR2_TARGET_UBOOT=y

Please used a fixed version of U-Boot.

configs/zynq_zybo_defconfig line 25

Quoted 7 lines
configs/zynq_zybo_defconfig new file +7 -0
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/board/digilent/zybo/uboot"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_zybo"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_ZYNQ_IMAGE=y

Could you rework your patch according to the above suggestions? With those suggestions taken into account, your patch could be merged in Buildroot.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com