1*4882a593SmuzhiyunThis is the Buildroot support for Zynq boards. Zynq boards are available from 2*4882a593SmuzhiyunXilinx and some third party vendors, but the build procedure is very similar. 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunCurrently, three boards are natively supported by Buildroot: 5*4882a593Smuzhiyun - Xilinx ZC706 board (zynq_zc706_defconfig) 6*4882a593Smuzhiyun - Avnet ZedBoard (zynq_zed_defconfig) 7*4882a593Smuzhiyun - Avnet MicroZed (zynq_microzed_defconfig) 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunSteps to create a working system for a Zynq board: 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun1) Configuration (do one of the following) 12*4882a593Smuzhiyun make zynq_zc706_defconfig (ZC706) 13*4882a593Smuzhiyun make zynq_zed_defconfig (Zedboard) 14*4882a593Smuzhiyun make zynq_microzed_defconfig (MicroZed) 15*4882a593Smuzhiyun2) make 16*4882a593Smuzhiyun3) All needed files will be available in the output/images directory. 17*4882a593Smuzhiyun The sdcard.img file is a complete bootable image ready to be written 18*4882a593Smuzhiyun on the boot medium. To install it, simply copy the image to an SD 19*4882a593Smuzhiyun card: 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun # dd if=output/images/sdcard.img of=/dev/sdX 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun Where 'sdX' is the device node of the uSD. 24*4882a593Smuzhiyun4) boot your board 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunYou can alter the booting procedure by creating a file uEnv.txt 27*4882a593Smuzhiyunin the root of the SD card. It is a plain text file in format 28*4882a593Smuzhiyun<key>=<value> one per line: 29*4882a593Smuzhiyun 30*4882a593Smuzhiyunkernel_image=myimage 31*4882a593Smuzhiyunmodeboot=myboot 32*4882a593Smuzhiyunmyboot=... 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunNote: 35*4882a593SmuzhiyunThe DTB for MicroZed is the same as the one for the Zedboard (zynq-zed.dtb), 36*4882a593Smuzhiyunand this is the recommended solution, see 37*4882a593Smuzhiyunhttps://forums.xilinx.com/t5/Embedded-Linux/Microzed-default-device-tree-dts/td-p/432856. 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunReferences: 40*4882a593Smuzhiyun - ZC706 information including schematics, reference designs, and manuals are 41*4882a593Smuzhiyun available from 42*4882a593Smuzhiyun http://www.xilinx.com/products/boards-and-kits/ek-z7-zc706-g.html. 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun - Zedboard/Microzed information including schematics, reference designs, and 45*4882a593Smuzhiyun manuals are available from http://www.zedboard.org . 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunSupport for other boards: 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunIf you want to build a system for other boards based on the same SoC 50*4882a593Smuzhiyun(for ex. Digilent Zybo board), and the board is already supported by 51*4882a593Smuzhiyunthe upstream kernel and U-Boot, you simply need to change the 52*4882a593Smuzhiyunfollowing Buildroot options: 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun - Kernel Device Tree file name (BR2_LINUX_KERNEL_INTREE_DTS_NAME) 55*4882a593Smuzhiyun - U-Boot board defconfig (BR2_TARGET_UBOOT_BOARD_DEFCONFIG) 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunCustom ps7_init_gpl.c/h support: 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunTo generate a working boot.bin image, ps7_init_gpl.c/h are required in 60*4882a593Smuzhiyunthe U-Boot source tree. Without those files, boot.bin will be built 61*4882a593Smuzhiyunsuccessfully but it will not be functional at all. Those files are 62*4882a593Smuzhiyunoutput from the Xilinx tools, but for convenience, U-Boot includes the 63*4882a593Smuzhiyundefault ps7_init_gpl.c/h of popular boards. Those files may need to be 64*4882a593Smuzhiyunupdated for any programmable logic customizations which impact 65*4882a593Smuzhiyunps7_init (clock/pin setup & mapping/AXI bridge setup/etc). See 66*4882a593Smuzhiyunboard/xilinx/zynq/ directory of U-Boot for natively supported ps7_init 67*4882a593Smuzhiyunfiles. If the ps7_init files for your board are not found in U-Boot, 68*4882a593Smuzhiyunyou need to add them by yourself. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun1) Start with a defconfig supported by Buildroot (e.g. Zedboard) 71*4882a593Smuzhiyun make zynq_zed_defconfig 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun2) make uboot-menuconfig 74*4882a593Smuzhiyun Visit the following menu and enable CONFIG_ZYNQ_CUSTOM_INIT. 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun ARM architecture ---> 77*4882a593Smuzhiyun [*] Use custom ps7_init provided by Xilinx tool 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun3) Copy ps7_init_gpl.c/h generated by the Xilinx tools into 80*4882a593Smuzhiyun output/build/uboot-xilinx-<pkg version>/board/xilinx/zynq/custom_hw_platform/ 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun4) make 83*4882a593Smuzhiyun 84*4882a593SmuzhiyunNote: The files in step 3 will need to be re-copied after cleaning the 85*4882a593Smuzhiyunoutput directory and at this time, there is no way to save them as 86*4882a593Smuzhiyunpart of the buildroot configuration, except as a U-Boot patch. 87