From: Gerald Van Baren Date: Mon, 6 Feb 2017 20:01:35 -0500 Subject: [Buildroot] [RFC 1/1] zynq-custom-fpga: new package In-Reply-To: References: <1485273729-11541-1-git-send-email-matthew.weber@rockwellcollins.com> <11a78ea4-0887-c3a1-6f2e-3902e8429ef3@gmail.com> Message-ID: <53de6b5a-58ea-6d27-48b9-ffad87d4c846@unssw.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 02/06/2017 04:50 PM, Matt Fornero wrote: >> From: Romain Naour [mailto:romain.naour at gmail.com] >> Le 24/01/2017 ? 17:02, Matt Weber a ?crit : > >>> +ifeq ($(BR2_PACKAGE_ZYNQ_CUSTOM_FPGA_UBOOT_SPL),y) >>> +UBOOT_DEPENDENCIES += zynq-custom-fpga >>> +UBOOT_POST_EXTRACT_HOOKS += ZYNQ_CUSTOM_FPGA_COPY_INIT >> >> Modifying uboot dependencies and hooks in zynq-custom-fpga is not a good >> practice actually. >> >> I would recommend to create a u-boot fork for zynq FPGA providing all >> specific >> uboot files instead of creating the zync-custom-fpga package. >> >> Best regards, >> Romain > > Hi Romain, > > Forking U-Boot to update the ps*_init_gpl.[c|h] files would be challenging. > These files are dynamically generated by the FPGA build tool (Vivado) based on > the user's configuration, so will vary both from board to board, and within a > board from design to design. > > Is there a recommended technique, given the above? I would clone (fork) https://github.com/Xilinx/u-boot-xlnx and make a new board based on a similar Zynq eval board, e.g. zynq-zc702. The U-Boot structure is all in place to create a new board with very few changes. Things You Need To Do to make a custom "zynq-foo" board target: Custom ps*_init_gpl.[ch] files - create a new subdirectory zynq-foo and drop your custom ps*_init_gpl.[ch] files in it: board/xilinx/zynq/zynq-zc702/ Create a custom DTS file. Note that the common Zynq definitions are in zynq-7000.dtsi and you only need to define your unique parts. Note the properties "status = "okay";" and "u-boot,dm-pre-reloc;" which mark those portions as important to U-Boot. arch/arm/dts/zynq-zc702.dts Edit ./arch/arm/dts/Makefile to add your board to $(CONFIG_ARCH_ZYNQ) Default config; customize to fit your needs - change CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702" and whatever else is appropriate: ./configs/zynq_zc702_defconfig All of the above, except the Makefile, will be unique to your board and will not cause any merge collisions in the future. The Makefile change will be one line and is unlikely to cause a merge collision... if it does, it will be very simple to resolve. HTH, gvb