All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Viktorin <viktorin@rehivetech.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 4/7] boot/uboot: Generate BOOT.BIN file when building for Xilinx Zynq
Date: Tue, 14 Jul 2015 17:16:02 +0200	[thread overview]
Message-ID: <20150714171602.6e5b5bda@pcviktorin.fit.vutbr.cz> (raw)
In-Reply-To: <20150714171214.706e9e4d@pcviktorin.fit.vutbr.cz>

This commit integrates generation of a bootable image
for Xilinx Zynq. The generation is independent on Xilinx
flow and utilizes the host-zynq-boot-bin package. The only
required step is to generate a proper U-Boot SPL (instead
of the FSBL).

The SPL generation might work when providing the working
ps7_init.c file to U-Boot. However, from U-Boot 2015.07
a set of generic ps7_init.c files is included and used to
build the U-Boot SPL for various boards. The ps7_init.c file
has been released under GNU/GPL license for this purpose.
For details, see

http://lists.denx.de/pipermail/u-boot/2015-April/210664.html

The SPL searchs for u-boot-dtb.img when booting so we
enforce using of the BR2_TARGET_UBOOT_FORMAT_DTB_IMG format.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
---
 boot/uboot/Config.in | 13 +++++++++++++
 boot/uboot/uboot.mk  | 10 ++++++++++
 2 files changed, 23 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 0554544..420573e 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -272,6 +272,19 @@ config BR2_TARGET_UBOOT_SPL_NAME
 	  u-boot build. For most platform it is spl/u-boot-spl.bin
 	  but not always. It is MLO on OMAP for example.
 
+config BR2_TARGET_UBOOT_ZYNQ_IMAGE
+	bool "Generate image for Xilinx Zynq"
+	depends on BR2_arm
+	depends on BR2_TARGET_UBOOT_SPL
+	depends on BR2_TARGET_UBOOT_FORMAT_DTB_IMG
+	select BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN
+	help
+	 Generate the BOOT.BIN file from U-Boot's SPL. The image
+	 boots the Xilinx Zynq chip without any FPGA bitstream.
+	 A bitstream can be loaded by the U-Boot. The SPL searchs
+	 for u-boot-dtb.img file so this U-Boot format is required
+	 to be set.
+
 menuconfig BR2_TARGET_UBOOT_ENVIMAGE
 	bool "Environment image"
 	help
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index e064a8e..b51bf56 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -182,6 +182,16 @@ UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT
 UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_ZYNQ_IMAGE),y)
+define UBOOT_GENERATE_ZYNQ_IMAGE
+	$(HOST_DIR)/usr/bin/python2 $(HOST_DIR)/usr/bin/zynq-boot-bin.py \
+		-u $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))     \
+		-o $(BINARIES_DIR)/BOOT.BIN
+endef
+UBOOT_DEPENDENCIES += host-zynq-boot-bin
+UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
 ifeq ($(BR_BUILDING),y)
 ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),)
-- 
2.4.5




-- 
   Jan Viktorin                  E-mail: Viktorin at RehiveTech.com
   System Architect              Web:    www.RehiveTech.com
   RehiveTech                    Phone:  +420 606 201 868
   Brno, Czech Republic

  parent reply	other threads:[~2015-07-14 15:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 16:27 [Buildroot] [PATCH 1/2] zedboard: Upgrade to Linux xilinx-v2015.1 (3.18) Jan Viktorin
2015-06-18 16:27 ` [Buildroot] [PATCH 2/2] zedboard: Upgrade to U-Boot 2015.07 Jan Viktorin
2015-06-18 21:18   ` Thomas Petazzoni
2015-06-19 13:38     ` [Buildroot] [PATCH v1 0/2] Make Buildroot for Zedboard independent on Xilinx tools Jan Viktorin
2015-06-19 19:59       ` Arnout Vandecappelle
2015-06-20  8:26         ` Jan Viktorin
2015-06-20  9:30           ` Arnout Vandecappelle
2015-06-19 13:40     ` [Buildroot] [PATCH v1 1/2] host-zynq-boot-bin: new package Jan Viktorin
2015-06-19 13:40       ` [Buildroot] [PATCH v1 2/2] zedboard: Upgrade to U-Boot 2015.07 Jan Viktorin
2015-06-22 11:15     ` [Buildroot] [PATCH v2 0/2] Make Buildroot for Zedboard independent on Xilinx tools Jan Viktorin
2015-06-22 11:15       ` [Buildroot] [PATCH v2 1/2] host-zynq-boot-bin: new package Jan Viktorin
2015-06-22 17:32         ` Baruch Siach
2015-06-22 21:58         ` Arnout Vandecappelle
2015-06-22 11:15       ` [Buildroot] [PATCH v2 2/2] zedboard: Upgrade to U-Boot 2015.07 Jan Viktorin
2015-06-23 12:49       ` [Buildroot] [PATCH v3 0/2] Make Buildroot for Zedboard independent on Xilinx tools Jan Viktorin
2015-06-23 12:49         ` [Buildroot] [PATCH v3 1/2] host-zynq-boot-bin: new package Jan Viktorin
2015-07-03 17:33           ` Yann E. MORIN
2015-07-03 20:00             ` Arnout Vandecappelle
2015-07-03 21:51               ` Yann E. MORIN
2015-07-03 23:44                 ` Jan Viktorin
2015-07-04 14:07           ` Thomas Petazzoni
2015-07-14 15:12             ` [Buildroot] [PATCH v4 0/7 Make Buildroot for Zedboard independent on Xilinx tools Jan Viktorin
2015-07-14 15:14               ` [Buildroot] [PATCH v4 3/7] boot/uboot: Add support for dtb.img format Jan Viktorin
2015-07-14 18:51                 ` Maxime Hadjinlian
2015-07-14 22:09                 ` Thomas Petazzoni
2015-07-14 15:14               ` [Buildroot] [PATCH v4 2/7] host-zynq-boot-bin: new package Jan Viktorin
2015-07-18 21:18                 ` Thomas Petazzoni
2015-07-14 15:14               ` [Buildroot] [PATCH v4 5/7] zedboard: Generate BOOT.BIN automatically Jan Viktorin
2015-07-14 15:16               ` Jan Viktorin [this message]
2015-07-18 21:19                 ` [Buildroot] [PATCH v4 4/7] boot/uboot: Generate BOOT.BIN file when building for Xilinx Zynq Thomas Petazzoni
2015-07-14 15:16               ` [Buildroot] [PATCH v4 6/7] zedboard: Patch default U-Boot environment for zedboard Jan Viktorin
2015-07-18 21:19                 ` Thomas Petazzoni
2015-07-14 15:16               ` [Buildroot] [PATCH v4 7/7] zedboard: Update readme.txt to reflect BOOT.BIN generation Jan Viktorin
2015-07-18 21:19                 ` Thomas Petazzoni
2015-07-14 15:17               ` [Buildroot] [PATCH v4 1/7] docs/manual: Fix trivial typo Jan Viktorin
2015-07-14 18:13                 ` Maxime Hadjinlian
2015-07-14 21:57                 ` Thomas Petazzoni
2015-06-23 12:49         ` [Buildroot] [PATCH v3 2/2] zedboard: Upgrade to U-Boot 2015.07 Jan Viktorin
2015-07-02 12:40         ` [Buildroot] [PATCH v3 0/2] Make Buildroot for Zedboard independent on Xilinx tools Jan Viktorin
2015-07-03 17:40           ` Yann E. MORIN
2015-07-03 23:52             ` Jan Viktorin
2015-06-18 21:15 ` [Buildroot] [PATCH 1/2] zedboard: Upgrade to Linux xilinx-v2015.1 (3.18) Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150714171602.6e5b5bda@pcviktorin.fit.vutbr.cz \
    --to=viktorin@rehivetech.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.