configs: add defconfig for Digilent Zybo
PATCH v2 1/1 configs: add defconfig for Digilent Zybo
This configuration allows out-of-the box Digilent Zybo support. It uses mainline U-boot and Linux kernel. This configuration generates a SD card image named sdcard.img.
--- board/digilent/zybo/genimage-zybo.cfg | 29 +++++++++++++ board/digilent/zybo/post-image.sh | 21 ++++++++++ board/digilent/zybo/readme.txt | 76 +++++++++++++++++++++++++++++++++++ board/digilent/zybo/system.bit | 0 board/digilent/zybo/uEnv.txt | 5 +++ configs/zynq_zybo_defconfig | 26 ++++++++++++ 6 files changed, 157 insertions(+) create mode 100644 board/digilent/zybo/genimage-zybo.cfg create mode 100755 board/digilent/zybo/post-image.sh create mode 100644 board/digilent/zybo/readme.txt create mode 100644 board/digilent/zybo/system.bit create mode 100644 board/digilent/zybo/uEnv.txt create mode 100644 configs/zynq_zybo_defconfig
board/digilent/zybo/genimage-zybo.cfg new file +29 -0
@@ -0,0 +1,29 @@ +image boot.vfat { + vfat { + files = { + "BOOT.BIN", + "uEnv.txt", + "system.bit", + "zynq-zybo.dtb", + "u-boot-dtb.img", + "uImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +}
board/digilent/zybo/post-image.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +BOARD_NAME="$(basename ${BOARD_DIR})" +GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" +OUTPUT_DIR="${O}/images" + +rm -rf "${GENIMAGE_TMP}" + +cp board/digilent/zybo/uEnv.txt ${BINARIES_DIR} +cp board/digilent/zybo/system.bit ${BINARIES_DIR} + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $?
board/digilent/zybo/readme.txt new file +76 -0
76 lines not on this page · raw message
board/digilent/zybo/system.bit new file +0 -0
board/digilent/zybo/uEnv.txt new file +5 -0
@@ -0,0 +1,5 @@ +bootargs=root=/dev/mmcblk0p2 rootwait rw rootfstype=ext4 +fpga_image=system.bit +fpgaboot=if fatload mmc 0 0x1000000 ${fpga_image}; then echo Booting FPGA from ${fpga_image}; fpga info 0 && fpga loadb 0 0x1000000 $filesize; else echo FPGA image ${fpga_image} was not found, skipping...; fi; +kernel_image=uImage +sdboot=echo Booting from SD...; run fpgaboot; fatload mmc 0 0x1000000 ${kernel_image} && fatload mmc 0 0x2000000 zynq-zybo.dtb && bootm 0x1000000 - 0x2000000
configs/zynq_zybo_defconfig new file +26 -0
@@ -0,0 +1,26 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/digilent/zybo/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6.4" +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_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.05" +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 +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
Signature · 1 line
2.5.5
PATCH v2 1/1 configs: add defconfig for Digilent Zybo
board/digilent/zybo/genimage-zybo.cfg
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sebastien" == Sebastien Van Cauwenberghe <[email protected]> writes:
This configuration allows out-of-the box Digilent Zybo support. It uses mainline U-boot and Linux kernel. This configuration generates a SD card image named sdcard.img.
Signed-off-by Sebastien Van Cauwenberghe <[email protected]>--- board/digilent/zybo/genimage-zybo.cfg | 29 +++++++++++++ board/digilent/zybo/post-image.sh | 21 ++++++++++ board/digilent/zybo/readme.txt | 76 +++++++++++++++++++++++++++++++++++ board/digilent/zybo/system.bit | 0 board/digilent/zybo/uEnv.txt | 5 +++ configs/zynq_zybo_defconfig | 26 ++++++++++++ 6 files changed, 157 insertions(+) create mode 100644 board/digilent/zybo/genimage-zybo.cfg create mode 100755 board/digilent/zybo/post-image.sh create mode 100644 board/digilent/zybo/readme.txt create mode 100644 board/digilent/zybo/system.bit create mode 100644 board/digilent/zybo/uEnv.txt create mode 100644 configs/zynq_zybo_defconfigboard/digilent/zybo/genimage-zybo.cfg new file +0
-0
We normally just call this genimage.cfg, so I've renamed this.
board/digilent/zybo/genimage-zybo.cfg line 7
Quoted 9 lines
+++
b/board/digilent/zybo/post-image.shboard/digilent/zybo/genimage-zybo.cfg new file +7
-0@@ -0,0 +1,21 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +BOARD_NAME="$(basename ${BOARD_DIR})" +GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" +OUTPUT_DIR="${O}/images"
And dropped BOARD_NAME / OUTPUT_DIR.
Quoted 4 lines
board/digilent/zybo/genimage-zybo.cfg new file +4
-0+ +rm -rf "${GENIMAGE_TMP}" + +cp board/digilent/zybo/uEnv.txt ${BINARIES_DIR}
board/digilent/zybo/genimage-zybo.cfg line 21
Quoted 10 lines
board/digilent/zybo/genimage-zybo.cfg new file +10
-0+cp board/digilent/zybo/system.bit ${BINARIES_DIR} + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $?
exit $? isn't needed, so I've dropped that.
board/digilent/zybo/genimage-zybo.cfg line 3
Quoted 5 lines
+++ b/configs/zynq_zybo_defconfig
board/digilent/zybo/genimage-zybo.cfg new file +3
-0@@ -0,0 +1,26 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y
Zynq 7000 also has a FPU, so I've enabled BR2_ARM_ENABLE_VFP=y to use it.
board/digilent/zybo/genimage-zybo.cfg line 8
Quoted 5 lines
board/digilent/zybo/genimage-zybo.cfg new file +5
-0+BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/digilent/zybo/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6.4"
You didn't select 4.6.x kernel headers, so I've added that.
Quoted 7 lines
board/digilent/zybo/genimage-zybo.cfg new file +7
-0+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_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y
board/digilent/zybo/genimage-zybo.cfg line 25
Quoted 10 lines
board/digilent/zybo/genimage-zybo.cfg new file +10
-0+BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.05" +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 +BR2_PACKAGE_HOST_GENIMAGE=y
The genimage configuration uses dosfstools and mtools, so I've added those host packages.
board/digilent/zybo/genimage-zybo.cfg line 26
Quoted 1 line
board/digilent/zybo/genimage-zybo.cfg new file +1
-0+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
u-boot tools isn't needed by the post-image script, so I've removed that.
Committed with these fixes, thanks.
Signature · 1 line
Bye, Peter Korsgaard