Skip to contentSkip to conversation

zedboard: Upgrade to Linux xilinx-v2015.1 (3.18)

PATCH New Jan Viktorin 7 participants 42 messages Jun 18, 2015 – Jul 18, 2015 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 zedboard: Upgrade to Linux xilinx-v2015.1 (3.18)

From: Jan Viktorin <[email protected]>

---
 configs/zedboard_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/zedboard_defconfig +1 -1
index e0e7760..76688e9 100644
@@ -8,7 +8,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Xilinx/linux-xlnx.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="xilinx-v2014.1"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="xilinx-v2015.1"
 BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq"
 BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 1 line
2.4.3
#1 lore raw

PATCH 2/2 zedboard: Upgrade to U-Boot 2015.07

From: Jan Viktorin <[email protected]>

Until recently, generation of a bootloader for the Avnet Zedboard (and in general all Xilinx Zynq based boards) has required to use the development tools by Xilinx (Vivado, XSDK) and to walk through a quite painful procedure to generate the First Stage Boot Loader (FSBL) and the bootable BOOT.BIN image.

This commit makes Buildroot independent on the Xilinx flow by utilizing U-Boot SPL and booting the Zynq's PL by U-Boot.

The FSBL generation is not a problem anymore with U-Boot 2015.07 where a generic ps7_init.c file is included and used to build the U-Boot SPL for various boards including Zedboard. 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

To create the BOOT.BIN automatically, there is a script zynq-boot-bin.py in the Xilinx github repository. This script is not included in the upstream of U-Boot so I attach it as a series of patchs (0001-0003) generated against U-Boot 2015.07.

There is a little catch, the U-Boot 2015.07 is not released yet, so this commit is based on 2015.07-rc2. However, as soon as it is out, the download site of U-Boot can be redirected to the release archive instead of fetching it by git.

The last patch (0004) creates a Zedboard+Buildroot specific U-Boot environment to boot smoothly from SD card. It tries to load a file system.bit into the Zynq's PL (only if it exists). It is also possible to alter the booting by an uEnv.txt file located on your SD card. The uEnv.txt is a plain text file with <key>=<value> pairs one per line.

Steps to create a working Buildroot for Zedboard:

a) use U-Boot 2015.07 (done by this commit)
b) patch it to use zynq-boot-bin.py (done by this commit)
--------------------------
1) make zedboard_defconfig
2) make UBOOT_BIN=u-boot-dtb.img
3) copy files boot.bin, u-boot-dtb.img, rootfs.cpio.uboot, uImage, zynq-zed.dtb into your SD card
4) boot your Zedboard

Note that I redefine variable UBOOT_BIN to u-boot-dtb.img (instead of u-boot.img) to be installed in to the images/ directory. This binary works for the generated SPL:

U-Boot SPL 2015.07-rc2 (Jun 18 2015 - 16:42:58)
mmc boot
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 2015.07-rc2 (Jun 18 2015 - 16:42:58 +0200)

Model: Zynq ZED Board

 I2C:   ready
 DRAM:  ECC disabled 512 MiB
 MMC:   zynq_sdhci: 0

Using default environment
...

---
 board/avnet/zedboard/readme.txt                    |  62 ++---
 ...0001-zynq-Generate-boot.bin-automatically.patch | 258 +++++++++++++++++++++
 ...-use-argparse-module-in-boot.bin-generati.patch |  98 ++++++++
 ...q-Fix-python-version-for-zynq-boot-bin.py.patch |  27 +++
 ...eate-zedboard-specific-U-Boot-environment.patch |  46 ++++
 configs/zedboard_defconfig                         |   5 +-
 6 files changed, 450 insertions(+), 46 deletions(-)
 create mode 100644 board/avnet/zedboard/uboot-2015.07/uboot-0001-zynq-Generate-boot.bin-automatically.patch
 create mode 100644 board/avnet/zedboard/uboot-2015.07/uboot-0002-zynq-Do-not-use-argparse-module-in-boot.bin-generati.patch
 create mode 100644 board/avnet/zedboard/uboot-2015.07/uboot-0003-zynq-Fix-python-version-for-zynq-boot-bin.py.patch
 create mode 100644 board/avnet/zedboard/uboot-2015.07/uboot-0004-zynq-Create-zedboard-specific-U-Boot-environment.patch
board/avnet/zedboard/readme.txt +18 -44
index a3f1f3e..0a2883a 100644
@@ -5,68 +5,42 @@ System-On-Chip.
 Zedboard information including schematics, reference designs, and manuals are
 available from http://www.zedboard.org .
 
-The U-Boot firmware for the Xilinx Zynq All Programmable SoC depends
-on some proprietary code. This dependency consists of a pair of
-files are available from the Xilinx SDK installation.
-
-You will need these files from Xilinx SDK installation to generate
-the U-Boot firmware:
-	ps7_init.c
-	ps7_init.h
-
 Buildroot will create the following files and place them in the
+$ make UBOOT_BIN=u-boot-dtb.img
 <output>/images directory.
 	zynq-zed.dtb
 	rootfs.cpio.uboot
 	uImage
-	u-boot.img
+	u-boot-dtb.img
 	boot.bin
 
-
-uboot.bin  -- U-Boot SPL w/ Xilinx boot.bin wrapper
----------------------------------------------------
-
-Due to licensing issues, the files ps7_init.c/h are not able to be
-distributed with the U-Boot source code.  These files are required to make a
-boot.bin file.
-
-If you already have the Xilinx tools installed, the following sequence will
-unpack, patch and build the rfs, kernel, uboot, and uboot-spl.
-
-make zedboard_defconfig
-make uboot-patch
-cp ${XILINX}/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.{c,h} \
-output/build/uboot-xilinx-v2014.1/board/xilinx/zynq/
-
-After copying these files into the U-Boot source tree, you can
-continue the build with:
-
-make
-
-*Notice*
-While the build will successfully complete without the ps7_init.*
-files,  the uboot.bin file generated by this configuration will not
-function properly on the Zedboard.  Therefore, it is imperative that
-the ps7_init.* files be copied into the U-Boot source tree any time
-the clean, or uboot-dirclean targets are made.
-
+The SPL searchs for u-boot-dtb.img so it is desirable to redefine
+the UBOOT_BIN variable as it was done in the example above.
 
 Resulting system
 ----------------
 A FAT32 partition should be created at the beginning of the SD Card
 and the following files should be installed:
 	/boot.bin
-	/devicetree.dtb
+	/zynq-zed.dtb
 	/uImage
-	/uramdisk.image.gz
-	/u-boot.img
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
 
 
 All needed files can be taken from output/images/
 
-boot.bin, uImage and u-boot.img are direct copies of the same files
+boot.bin, uImage and u-boot-dtb.img are direct copies of the same files
 available on output/images/
 
-devicetree.dtb is just zynq-zed.dtb renamed.
+The attachedpatchs of U-Boot enables to create boot.bin file
+automatically without the need of Xilinx tools. The U-Boot's
+environment is redefined there 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:
 
-uramdisk.image.gz is rootfs.cpio.uboot renamed
+kernel_image=myimage
+modeboot=myboot
+myboot=...
board/avnet/zedboard/uboot-2015.07/uboot-0001-zynq-Generate-boot.bin-automatically.patch new file +258 -0

258 lines not on this page · raw message

board/avnet/zedboard/uboot-2015.07/uboot-0002-zynq-Do-not-use-argparse-module-in-boot.bin-generati.patch new file +98 -0

98 lines not on this page · raw message

board/avnet/zedboard/uboot-2015.07/uboot-0003-zynq-Fix-python-version-for-zynq-boot-bin.py.patch new file +27 -0
new file mode 100644
index 0000000..f814e87
@@ -0,0 +1,27 @@
+From 4e7271a622e8b202e7d67d1cfd9edf673a8ed676 Mon Sep 17 00:00:00 2001
+From: Jan Viktorin <[email protected]>
+Date: Thu, 10 Jul 2014 14:19:43 +0200
+Subject: [PATCH 3/3] zynq: Fix python version for zynq-boot-bin.py
+
+The code does not work when Python 3 is default.
+Enforce using Python 2.
+
+Signed-off-by: Jan Viktorin <[email protected]>
+Signed-off-by: Michal Simek <[email protected]>
+---
+ tools/zynq-boot-bin.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/zynq-boot-bin.py b/tools/zynq-boot-bin.py
+index e35379b..54a0fca 100755
+--- a/tools/zynq-boot-bin.py
++++ b/tools/zynq-boot-bin.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ # Copyright (C) 2014, Xilinx.inc.
+ #
+-- 
+2.4.3
+
board/avnet/zedboard/uboot-2015.07/uboot-0004-zynq-Create-zedboard-specific-U-Boot-environment.patch new file +46 -0

46 lines not on this page · raw message

configs/zedboard_defconfig +3 -2
index 76688e9..59aae16 100644
@@ -19,8 +19,9 @@ BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="zynq_zed"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Xilinx/u-boot-xlnx.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2014.1"
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2015.07-rc2"
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/boards/avnet/zedboard/uboot-2015.07"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="boot.bin"
Signature · 1 line
2.4.3
#2 lore raw

PATCH 2/2 zedboard: Upgrade to U-Boot 2015.07

Dear Jan Viktorin,

Quoted 19 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

Until recently, generation of a bootloader for the Avnet Zedboard (and in general all Xilinx Zynq based boards) has required to use the development tools by Xilinx (Vivado, XSDK) and to walk through a quite painful procedure to generate the First Stage Boot Loader (FSBL) and the bootable BOOT.BIN image.

This commit makes Buildroot independent on the Xilinx flow by utilizing U-Boot SPL and booting the Zynq's PL by U-Boot.

The FSBL generation is not a problem anymore with U-Boot 2015.07 where a generic ps7_init.c file is included and used to build the U-Boot SPL for various boards including Zedboard. The ps7_init.c file has been released under GNU/GPL license for this purpose. For details, see

Quoted 7 lines

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

To create the BOOT.BIN automatically, there is a script zynq-boot-bin.py in the Xilinx github repository. This script is not included in the upstream of U-Boot so I attach it as a series of patchs (0001-0003) generated against U-Boot 2015.07.

It is a bit annoying to have this script as patches. Will it be merged in the upstream U-Boot at some point? If yes, then having it as patches is OK. Otherwise, I'd prefer to have a separate host-zync-boot-script package, which simply downloads and installs this script in $(HOST_DIR), and then only the patch changing the U-Boot Makefile to call this script.

Quoted 5 lines

There is a little catch, the U-Boot 2015.07 is not released yet, so this commit is based on 2015.07-rc2. However, as soon as it is out, the download site of U-Boot can be redirected to the release archive instead of fetching it by git.

Yes, this is OK.

Quoted 10 lines

Steps to create a working Buildroot for Zedboard:

a) use U-Boot 2015.07 (done by this commit)
b) patch it to use zynq-boot-bin.py (done by this commit)
--------------------------
1) make zedboard_defconfig
2) make UBOOT_BIN=u-boot-dtb.img
3) copy files boot.bin, u-boot-dtb.img, rootfs.cpio.uboot, uImage, zynq-zed.dtb into your SD card
4) boot your Zedboard

This should just go to board/avnet/zedboard/readme.txt, no need to have it in the commit log if you're updating that readme file.

Thanks!

Thomas

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

cover Make Buildroot for Zedboard independent on Xilinx tools

From: Jan Viktorin <[email protected]>

Dear Thomas,

thank you for the review. I've made the changes accordingly.

I've created host-zynq-boot-bin package to cover the small python script. It downloads U-Boot xilinx-v2015.1 from Xilinx github for this purpose (quite an overkill, isn't it...).

There are now just 2 patches of U-Boot 2015.07. 0001 adds calling of the zynq-boot-bin.py and 0002 fixes the default U-Boot environment to boot out-of-the-box from SD card.

There is still one thing to solve (I wasn't sure how). There is no dependency specified between U-Boot and the host-zynq-boot-bin package. It should be probably conditional but what kind of condition to write there? Should we use it for every Zynq architecture? (Is it possible to detect it by Buildroot?)

Regards
Jan Viktorin

Jan Viktorin (2):
host-zynq-boot-bin: new package
zedboard: Upgrade to U-Boot 2015.07

 board/avnet/zedboard/readme.txt                    | 95 ++++++++++------------
 ...oot.bin-automatically-by-zynq-boot-bin.py.patch | 38 +++++++++
 ...eate-zedboard-specific-U-Boot-environment.patch | 46 +++++++++++
 configs/zedboard_defconfig                         |  6 +-
 package/Config.in.host                             |  1 +
 package/zynq-boot-bin/Config.in.host               |  7 ++
 package/zynq-boot-bin/zynq-boot-bin.mk             | 16 ++++
 7 files changed, 156 insertions(+), 53 deletions(-)
 create mode 100644 board/avnet/zedboard/uboot-2015.07/0001-Generate-boot.bin-automatically-by-zynq-boot-bin.py.patch
 create mode 100644 board/avnet/zedboard/uboot-2015.07/0002-zynq-Create-zedboard-specific-U-Boot-environment.patch
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
Signature · 1 line
2.4.3
#4 lore raw

cover Make Buildroot for Zedboard independent on Xilinx tools

Quoted 14 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

Dear Thomas,

thank you for the review. I've made the changes accordingly.

I've created host-zynq-boot-bin package to cover the small python script. It downloads U-Boot xilinx-v2015.1 from Xilinx github for this purpose (quite an overkill, isn't it...).

There are now just 2 patches of U-Boot 2015.07. 0001 adds calling of the zynq-boot-bin.py and 0002 fixes the default U-Boot environment to boot out-of-the-box from SD card.

Quoted 6 lines

There is still one thing to solve (I wasn't sure how). There is no dependency specified between U-Boot and the host-zynq-boot-bin package. It should be probably conditional but what kind of condition to write there? Should we use it for every Zynq architecture? (Is it possible to detect it by Buildroot?)

You can revert the two packages: make host-zynq-boot-bin depend on uboot, and
move the call to the python script to the host-zynq-boot-bin package. One less patch for uboot :-)

Regards,
Arnout

Quoted 22 lines

Regards
Jan Viktorin

Jan Viktorin (2):
host-zynq-boot-bin: new package
zedboard: Upgrade to U-Boot 2015.07

 board/avnet/zedboard/readme.txt                    | 95 ++++++++++------------
 ...oot.bin-automatically-by-zynq-boot-bin.py.patch | 38 +++++++++
 ...eate-zedboard-specific-U-Boot-environment.patch | 46 +++++++++++
 configs/zedboard_defconfig                         |  6 +-
 package/Config.in.host                             |  1 +
 package/zynq-boot-bin/Config.in.host               |  7 ++
 package/zynq-boot-bin/zynq-boot-bin.mk             | 16 ++++
 7 files changed, 156 insertions(+), 53 deletions(-)
 create mode 100644 board/avnet/zedboard/uboot-2015.07/0001-Generate-boot.bin-automatically-by-zynq-boot-bin.py.patch
 create mode 100644 board/avnet/zedboard/uboot-2015.07/0002-zynq-Create-zedboard-specific-U-Boot-environment.patch
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#5 lore raw

cover Make Buildroot for Zedboard independent on Xilinx tools

Quoted 22 lines · On Fri, 19 Jun 2015 21:59:26 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 14 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

Dear Thomas,

thank you for the review. I've made the changes accordingly.

I've created host-zynq-boot-bin package to cover the small python script. It downloads U-Boot xilinx-v2015.1 from Xilinx github for this purpose (quite an overkill, isn't it...).

There are now just 2 patches of U-Boot 2015.07. 0001 adds calling of the zynq-boot-bin.py and 0002 fixes the default U-Boot environment to boot out-of-the-box from SD card.

Quoted 6 lines

There is still one thing to solve (I wasn't sure how). There is no dependency specified between U-Boot and the host-zynq-boot-bin package. It should be probably conditional but what kind of condition to write there? Should we use it for every Zynq architecture? (Is it possible to detect it by Buildroot?)

Quoted 3 lines

You can revert the two packages: make host-zynq-boot-bin depend on
uboot, and move the call to the python script to the host-zynq-boot-bin package. One less patch for uboot :-)

So, you mean to drop the patch 0001 and call the zynq-boot-bin.py from BUILD/INSTALL (?) stage of this package? (I expect the dependency on uboot will guarantee, it is called after uboot.) The package will get the path to the uboot's build dir as UBOOT_DIR, is it right?

So host-zynq-boot-bin should depend on uboot and it is up to the user to select this package to create the boot.bin file automatically or not. Is that OK?

Regards
Jan Viktorin

Quoted 31 lines

Regards,
Arnout

Quoted 24 lines

Regards
Jan Viktorin

Jan Viktorin (2):
host-zynq-boot-bin: new package
zedboard: Upgrade to U-Boot 2015.07

 board/avnet/zedboard/readme.txt                    | 95
++++++++++------------ ...oot.bin-automatically-by-zynq-boot-bin.py.patch
| 38 +++++++++ ...eate-zedboard-specific-U-Boot-environment.patch |
46 +++++++++++ configs/zedboard_defconfig
|  6 +- package/Config.in.host                             |  1 +
 package/zynq-boot-bin/Config.in.host               |  7 ++
 package/zynq-boot-bin/zynq-boot-bin.mk             | 16 ++++
 7 files changed, 156 insertions(+), 53 deletions(-)
 create mode 100644

board/avnet/zedboard/uboot-2015.07/0001-Generate-boot.bin-automatically-by-zynq-boot-bin.py.patch create mode 100644 board/avnet/zedboard/uboot-2015.07/0002-zynq-Create-zedboard-specific-U-Boot-environment.patch create mode 100644 package/zynq-boot-bin/Config.in.host create mode
100644 package/zynq-boot-bin/zynq-boot-bin.mk

Signature · 4 lines
  Jan Viktorin, PhD student   E-mail: iviktorin at fit.vutbr.cz
  DCS FIT VUT Brno, L310      Web: http://www.fit.vutbr.cz/~iviktorin
  Bozetechova 1, 612 66       Phone: +420 54114-1357
  Brno, Czech Republic
#6 lore raw

cover Make Buildroot for Zedboard independent on Xilinx tools

Quoted 25 lines · Jan Viktorin
Quoted 22 lines · On Fri, 19 Jun 2015 21:59:26 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 20 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

Dear Thomas,

thank you for the review. I've made the changes accordingly.

I've created host-zynq-boot-bin package to cover the small python script. It downloads U-Boot xilinx-v2015.1 from Xilinx github for this purpose (quite an overkill, isn't it...).

There are now just 2 patches of U-Boot 2015.07. 0001 adds calling of the zynq-boot-bin.py and 0002 fixes the default U-Boot environment to boot out-of-the-box from SD card.

There is still one thing to solve (I wasn't sure how). There is no dependency specified between U-Boot and the host-zynq-boot-bin package. It should be probably conditional but what kind of condition to write there? Should we use it for every Zynq architecture? (Is it possible to detect it by Buildroot?)

Quoted 6 lines
Quoted 3 lines

You can revert the two packages: make host-zynq-boot-bin depend on
uboot, and move the call to the python script to the host-zynq-boot-bin package. One less patch for uboot :-)

So, you mean to drop the patch 0001 and call the zynq-boot-bin.py from BUILD/INSTALL (?) stage of this package?

Yes, from the BUILD stage.

You'll want to set _INSTALL_STAGING = NO and _INSTALL_IMAGES = YES.

Quoted 2 lines

(I expect the dependency on
uboot will guarantee, it is called after uboot.)

Yep.

Quoted 2 lines

The package will get
the path to the uboot's build dir as UBOOT_DIR, is it right?

It will, but we prefer not to rely on that. Since uboot.mk will anyway install
the spl.bin file to $(IMAGES_DIR), you can take it from there.

Quoted 4 lines

So host-zynq-boot-bin should depend on uboot and it is up to the user to select this package to create the boot.bin file automatically or not. Is that OK?

Exactly!

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#7 lore raw

PATCH 1/2 host-zynq-boot-bin: new package

In reply to Thomas Petazzoni

From: Jan Viktorin <[email protected]>

The purpose of this package is to provide a small Python script zynq-boot-bin.py to Buildroot. The script creates a BOOT.BIN file from U-Boot's SPL to boot Xilinx Zynq without needing the Xilinx FSBL.

---
 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  7 +++++++
 package/zynq-boot-bin/zynq-boot-bin.mk | 16 ++++++++++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
package/Config.in.host +1 -0
index 1e047aa..030c91f 100644
@@ -27,5 +27,6 @@ menu "Host utilities"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
+	source "package/zynq-boot-bin/Config.in.host"
 
 endmenu
package/zynq-boot-bin/Config.in.host new file +7 -0
new file mode 100644
index 0000000..7342981
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN
+	bool "host zynq-boot-bin"
+	help
+	  This is a simple Python script that creates BOOT.BIN file
+	  to boot Xilinx Zynq based from U-Boot's SPL.
+
+	  https://github.com/Xilinx/u-boot-xlnx
package/zynq-boot-bin/zynq-boot-bin.mk new file +16 -0
new file mode 100644
index 0000000..8123f01
@@ -0,0 +1,16 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = $(ZYNQ_BOOT_BIN_VERSION).tar.gz
+ZYNQ_BOOT_BIN_SITE = https://github.com/Xilinx/u-boot-xlnx/archive
+
+define HOST_ZYNQ_BOOT_BIN_INSTALL_CMDS
+	cp $(@D)/tools/zynq-boot-bin.py $(HOST_DIR)/usr/bin/zynq-boot-bin.py
+	chmod u+x $(HOST_DIR)/usr/bin/zynq-boot-bin.py
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
2.4.3
#8 lore raw

PATCH 2/2 zedboard: Upgrade to U-Boot 2015.07

From: Jan Viktorin <[email protected]>

Until recently, generation of a bootloader for the Avnet Zedboard (and in general all Xilinx Zynq based boards) has required to use the development tools by Xilinx (Vivado, XSDK) and to walk through a quite painful procedure to generate the First Stage Boot Loader (FSBL) and the bootable BOOT.BIN image.

This commit makes Buildroot independent on the Xilinx flow by utilizing U-Boot SPL and booting the Zynq's PL by U-Boot.

The FSBL generation is not a problem anymore with U-Boot 2015.07 where a generic ps7_init.c file is included and used to build the U-Boot SPL for various boards including Zedboard. 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

To create the BOOT.BIN automatically, there is a script zynq-boot-bin.py in the Xilinx github repository. This script is installed by host-zynq-boot-bin package. The attached patch (0001) fixes U-Boot environment to use it.

There is a little catch, the U-Boot 2015.07 is not released yet, so this commit is based on 2015.07-rc2. However, as soon as it is out, the download site of U-Boot can be redirected to the release archive instead of fetching it by git.

The last patch (0002) creates a Zedboard+Buildroot specific U-Boot environment to boot smoothly from SD card. It tries to load a file system.bit into the Zynq's PL (only if it exists). It is also possible to alter the booting by an uEnv.txt file located on your SD card. The uEnv.txt is a plain text file with <key>=<value> pairs one per line.

---
 board/avnet/zedboard/readme.txt                    | 95 ++++++++++------------
 ...oot.bin-automatically-by-zynq-boot-bin.py.patch | 38 +++++++++
 ...eate-zedboard-specific-U-Boot-environment.patch | 46 +++++++++++
 configs/zedboard_defconfig                         |  6 +-
 4 files changed, 132 insertions(+), 53 deletions(-)
 create mode 100644 board/avnet/zedboard/uboot-2015.07/0001-Generate-boot.bin-automatically-by-zynq-boot-bin.py.patch
 create mode 100644 board/avnet/zedboard/uboot-2015.07/0002-zynq-Create-zedboard-specific-U-Boot-environment.patch
board/avnet/zedboard/readme.txt +44 -51
index a3f1f3e..b2dfe4b 100644
@@ -5,68 +5,61 @@ System-On-Chip.
 Zedboard information including schematics, reference designs, and manuals are
 available from http://www.zedboard.org .
 
-The U-Boot firmware for the Xilinx Zynq All Programmable SoC depends
-on some proprietary code. This dependency consists of a pair of
-files are available from the Xilinx SDK installation.
-
-You will need these files from Xilinx SDK installation to generate
-the U-Boot firmware:
-	ps7_init.c
-	ps7_init.h
-
-Buildroot will create the following files and place them in the
-<output>/images directory.
-	zynq-zed.dtb
-	rootfs.cpio.uboot
-	uImage
-	u-boot.img
-	boot.bin
-
-
-uboot.bin  -- U-Boot SPL w/ Xilinx boot.bin wrapper
----------------------------------------------------
-
-Due to licensing issues, the files ps7_init.c/h are not able to be
-distributed with the U-Boot source code.  These files are required to make a
-boot.bin file.
-
-If you already have the Xilinx tools installed, the following sequence will
-unpack, patch and build the rfs, kernel, uboot, and uboot-spl.
-
-make zedboard_defconfig
-make uboot-patch
-cp ${XILINX}/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.{c,h} \
-output/build/uboot-xilinx-v2014.1/board/xilinx/zynq/
-
-After copying these files into the U-Boot source tree, you can
-continue the build with:
-
-make
-
-*Notice*
-While the build will successfully complete without the ps7_init.*
-files,  the uboot.bin file generated by this configuration will not
-function properly on the Zedboard.  Therefore, it is imperative that
-the ps7_init.* files be copied into the U-Boot source tree any time
-the clean, or uboot-dirclean targets are made.
-
+Steps to create a working Buildroot for Zedboard:
+
+a) use U-Boot 2015.07 (is set by zedboard_defconfig)
+b) install host-zynq-boot-bin (done automatically by dependency system)
+--------------------------
+1) make zedboard_defconfig
+2) make UBOOT_BIN=u-boot-dtb.img
+3) copy files boot.bin, u-boot-dtb.img, rootfs.cpio.uboot,
+	uImage, zynq-zed.dtb into your SD card
+4) boot your Zedboard
+
+Note that I redefine variable UBOOT_BIN to u-boot-dtb.img
+(instead of u-boot.img) to be installed in to the images/
+directory. This binary works for the generated SPL:
+
+ U-Boot SPL 2015.07-rc2 (Jun 18 2015 - 16:42:58)
+ mmc boot
+ 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 2015.07-rc2 (Jun 18 2015 - 16:42:58 +0200)
+
+ Model: Zynq ZED Board
+ I2C:   ready
+ DRAM:  ECC disabled 512 MiB
+ MMC:   zynq_sdhci: 0
+ Using default environment
+ ...
 
 Resulting system
 ----------------
 A FAT32 partition should be created at the beginning of the SD Card
 and the following files should be installed:
 	/boot.bin
-	/devicetree.dtb
+	/zynq-zed.dtb
 	/uImage
-	/uramdisk.image.gz
-	/u-boot.img
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
 
 
 All needed files can be taken from output/images/
 
-boot.bin, uImage and u-boot.img are direct copies of the same files
+boot.bin, uImage and u-boot-dtb.img are direct copies of the same files
 available on output/images/
 
-devicetree.dtb is just zynq-zed.dtb renamed.
+The attachedpatchs of U-Boot enables to create boot.bin file
+automatically without the need of Xilinx tools. The U-Boot's
+environment is redefined there 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:
 
-uramdisk.image.gz is rootfs.cpio.uboot renamed
+kernel_image=myimage
+modeboot=myboot
+myboot=...
board/avnet/zedboard/uboot-2015.07/0001-Generate-boot.bin-automatically-by-zynq-boot-bin.py.patch new file +38 -0
new file mode 100644
index 0000000..9a62d1e
@@ -0,0 +1,38 @@
+From b983c0c89267913dfae30eb80ce3a1ef375d7c60 Mon Sep 17 00:00:00 2001
+From: Jan Viktorin <[email protected]>
+Date: Fri, 19 Jun 2015 14:54:48 +0200
+Subject: [PATCH 1/2] Generate boot.bin automatically by zynq-boot-bin.py
+
+The script is expected to be present in PATH.
+---
+ Makefile | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 0a674bf..aca286e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -772,6 +772,10 @@ ifneq ($(CONFIG_BUILD_TARGET),)
+ ALL-y += $(CONFIG_BUILD_TARGET:"%"=%)
+ endif
+ 
++ifneq ($(CONFIG_ARCH_ZYNQ),)
++ALL-y += boot.bin
++endif
++
+ LDFLAGS_u-boot += $(LDFLAGS_FINAL)
+ ifneq ($(CONFIG_SYS_TEXT_BASE),)
+ LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
+@@ -1098,6 +1102,9 @@ OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL
+ u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE
+ 	$(call if_changed,pad_cat)
+ 
++boot.bin: spl/u-boot-spl.bin
++	zynq-boot-bin.py -o boot.bin -u spl/u-boot-spl.bin
++
+ # PPC4xx needs the SPL at the end of the image, since the reset vector
+ # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target
+ # and need to introduce a new build target with the full blown U-Boot
+-- 
+2.4.3
+
board/avnet/zedboard/uboot-2015.07/0002-zynq-Create-zedboard-specific-U-Boot-environment.patch new file +46 -0

46 lines not on this page · raw message

configs/zedboard_defconfig +4 -2
index 76688e9..deafb3f 100644
@@ -19,8 +19,10 @@ BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="zynq_zed"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Xilinx/u-boot-xlnx.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2014.1"
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2015.07-rc2"
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/boards/avnet/zedboard/uboot-2015.07"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="boot.bin"
+BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN=y
Signature · 1 line
2.4.3
#9 lore raw

v2 cover Make Buildroot for Zedboard independent on Xilinx tools

In reply to Thomas Petazzoni

From: Jan Viktorin <[email protected]>

Hello,

based on the previous discussions, here are the changes of the host-zynq-boot-bin which is now calling the zynq-boot-bin.py script during its HOST_BUILD stage to create a boot.bin image from the U-Boot's SPL. The host-zynq-boot-bin uses the variable BR2_TARGET_UBOOT_SPL_NAME to determine the name of the installed SPL binary.

I've added dependency on host-python, however, I am not sure whether it is correct this way. It works for me.

There is only one patch for U-Boot attached that creates an environment that boots out-of-the-box on Zedboard.

Regards
Jan Viktorin

Jan Viktorin (2):
host-zynq-boot-bin: new package
zedboard: Upgrade to U-Boot 2015.07

 board/avnet/zedboard/readme.txt        | 95 ++++++++++++++++------------------
 configs/zedboard_defconfig             |  7 +--
 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  8 +++
 package/zynq-boot-bin/zynq-boot-bin.mk | 22 ++++++++
 5 files changed, 79 insertions(+), 54 deletions(-)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
Signature · 1 line
2.4.4
#10 lore raw

PATCH v2 1/2 host-zynq-boot-bin: new package

From: Jan Viktorin <[email protected]>

The package creates file images/boot.bin to boot
Xilinx Zynq based boards. It might not work with
U-Boot older then 2015.07.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

---
 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  8 ++++++++
 package/zynq-boot-bin/zynq-boot-bin.mk | 22 ++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
package/Config.in.host +1 -0
index 1e047aa..030c91f 100644
@@ -27,5 +27,6 @@ menu "Host utilities"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
+	source "package/zynq-boot-bin/Config.in.host"
 
 endmenu
package/zynq-boot-bin/Config.in.host new file +8 -0
new file mode 100644
index 0000000..bc151a7
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN
+	bool "host zynq-boot-bin"
+	depends on BR2_TARGET_UBOOT_SPL
+	help
+	  This is a simple Python script that creates BOOT.BIN file
+	  to boot Xilinx Zynq based on U-Boot's SPL.
+
+	  https://github.com/Xilinx/u-boot-xlnx
package/zynq-boot-bin/zynq-boot-bin.mk new file +22 -0
new file mode 100644
index 0000000..cb1b4b5
@@ -0,0 +1,22 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = $(ZYNQ_BOOT_BIN_VERSION).tar.gz
+ZYNQ_BOOT_BIN_SITE = https://github.com/Xilinx/u-boot-xlnx/archive
+
+ZYNQ_BOOT_BIN_INSTALL_STAGING = NO
+ZYNQ_BOOT_BIN_INSTALL_IMAGES = YES
+
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = uboot host-python
+HOST_ZYNQ_BOOT_BIN_NEEDS_PYTHON = python2
+
+define HOST_ZYNQ_BOOT_BIN_BUILD_CMDS
+	$(HOST_DIR)/usr/bin/python2 $(@D)/tools/zynq-boot-bin.py -o $(BINARIES_DIR)/boot.bin \
+		-u $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)))
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
2.4.4
#11 lore raw

PATCH v2 1/2 host-zynq-boot-bin: new package

Hi Jan,

package/zynq-boot-bin/zynq-boot-bin.mk line 15

Quoted 2 lines · Jan Viktorin
package/zynq-boot-bin/zynq-boot-bin.mk new file +2 -0
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = uboot host-python
+HOST_ZYNQ_BOOT_BIN_NEEDS_PYTHON = python2

Python (2.6 or 2.7) is already a required package for Buildroot
(http://nightly.buildroot.org/manual.html#requirement-mandatory).

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#12 lore raw

PATCH v2 1/2 host-zynq-boot-bin: new package

In reply to Jan Viktorin
Quoted 49 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

The package creates file images/boot.bin to boot
Xilinx Zynq based boards. It might not work with
U-Boot older then 2015.07.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

---
 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  8 ++++++++
 package/zynq-boot-bin/zynq-boot-bin.mk | 22 ++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
package/Config.in.host +1 -0
index 1e047aa..030c91f 100644
@@ -27,5 +27,6 @@ menu "Host utilities"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
+	source "package/zynq-boot-bin/Config.in.host"
 
 endmenu
package/zynq-boot-bin/Config.in.host new file +8 -0
new file mode 100644
index 0000000..bc151a7
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN
+	bool "host zynq-boot-bin"
+	depends on BR2_TARGET_UBOOT_SPL
+	help
+	  This is a simple Python script that creates BOOT.BIN file
+	  to boot Xilinx Zynq based on U-Boot's SPL.
+
+	  https://github.com/Xilinx/u-boot-xlnx
package/zynq-boot-bin/zynq-boot-bin.mk new file +0 -0
new file mode 100644
index 0000000..cb1b4b5

package/zynq-boot-bin/zynq-boot-bin.mk line 9

Quoted 9 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +9 -0
@@ -0,0 +1,22 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = $(ZYNQ_BOOT_BIN_VERSION).tar.gz
+ZYNQ_BOOT_BIN_SITE = https://github.com/Xilinx/u-boot-xlnx/archive

Since we only need a single file from this archive, perhaps it is better to
set (untested):

ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools

define ZYNQ_BOOT_BIN_EXTRACT_CMDS

	@cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D)

endef

package/zynq-boot-bin/zynq-boot-bin.mk line 14

Quoted 5 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +5 -0
+
+ZYNQ_BOOT_BIN_INSTALL_STAGING = NO
+ZYNQ_BOOT_BIN_INSTALL_IMAGES = YES
+
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = uboot host-python

As mentioned by Baruch, host-python dependency shouldn't be needed.

package/zynq-boot-bin/zynq-boot-bin.mk line 15

Quoted 1 line
package/zynq-boot-bin/zynq-boot-bin.mk new file +1 -0
+HOST_ZYNQ_BOOT_BIN_NEEDS_PYTHON = python2

It's actually _NEEDS_HOST_PYTHON, so this is clearly not needed.

Regards,
Arnout

Quoted 8 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +7 -0
+
+define HOST_ZYNQ_BOOT_BIN_BUILD_CMDS
+	$(HOST_DIR)/usr/bin/python2 $(@D)/tools/zynq-boot-bin.py -o $(BINARIES_DIR)/boot.bin \
+		-u $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)))
+endef
+
+$(eval $(host-generic-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#13 lore raw

PATCH v2 2/2 zedboard: Upgrade to U-Boot 2015.07

In reply to Jan Viktorin

From: Jan Viktorin <[email protected]>

Until recently, generation of a bootloader for the Avnet Zedboard (and in general all Xilinx Zynq based boards) has required to use the development tools by Xilinx (Vivado, XSDK) and to walk through a quite painful procedure to generate the First Stage Boot Loader (FSBL) and the bootable BOOT.BIN image.

This commit makes Buildroot independent on the Xilinx flow by utilizing U-Boot SPL and booting the Zynq's PL by U-Boot.

The FSBL generation is not a problem anymore with U-Boot 2015.07 where a generic ps7_init.c file is included and used to build the U-Boot SPL for various boards including Zedboard. 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

To create the boot.bin automatically, the host-zynq-boot-bin package is required to be set (done in zedboard_defconfig).

The U-Boot 2015.07 is not released at the moment, so this commit is based on 2015.07-rc2. However, as soon as it is out, the download site of U-Boot can be redirected to the release archive instead of fetching it by git.

The attached patch (0001) creates a Zedboard+Buildroot specific U-Boot environment to boot smoothly from SD card. It tries to load a file system.bit into the Zynq's PL (only if it exists). It is also possible to alter the booting by an uEnv.txt file located on your SD card. The uEnv.txt is a plain text file with <key>=<value> pairs one per line.

---
 board/avnet/zedboard/readme.txt | 95 +++++++++++++++++++----------------------
 configs/zedboard_defconfig      |  7 +--
 2 files changed, 48 insertions(+), 54 deletions(-)
board/avnet/zedboard/readme.txt +44 -51
index a3f1f3e..b2dfe4b 100644
@@ -5,68 +5,61 @@ System-On-Chip.
 Zedboard information including schematics, reference designs, and manuals are
 available from http://www.zedboard.org .
 
-The U-Boot firmware for the Xilinx Zynq All Programmable SoC depends
-on some proprietary code. This dependency consists of a pair of
-files are available from the Xilinx SDK installation.
-
-You will need these files from Xilinx SDK installation to generate
-the U-Boot firmware:
-	ps7_init.c
-	ps7_init.h
-
-Buildroot will create the following files and place them in the
-<output>/images directory.
-	zynq-zed.dtb
-	rootfs.cpio.uboot
-	uImage
-	u-boot.img
-	boot.bin
-
-
-uboot.bin  -- U-Boot SPL w/ Xilinx boot.bin wrapper
----------------------------------------------------
-
-Due to licensing issues, the files ps7_init.c/h are not able to be
-distributed with the U-Boot source code.  These files are required to make a
-boot.bin file.
-
-If you already have the Xilinx tools installed, the following sequence will
-unpack, patch and build the rfs, kernel, uboot, and uboot-spl.
-
-make zedboard_defconfig
-make uboot-patch
-cp ${XILINX}/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.{c,h} \
-output/build/uboot-xilinx-v2014.1/board/xilinx/zynq/
-
-After copying these files into the U-Boot source tree, you can
-continue the build with:
-
-make
-
-*Notice*
-While the build will successfully complete without the ps7_init.*
-files,  the uboot.bin file generated by this configuration will not
-function properly on the Zedboard.  Therefore, it is imperative that
-the ps7_init.* files be copied into the U-Boot source tree any time
-the clean, or uboot-dirclean targets are made.
-
+Steps to create a working Buildroot for Zedboard:
+
+a) use U-Boot 2015.07 (is set by zedboard_defconfig)
+b) install host-zynq-boot-bin (done automatically by dependency system)
+--------------------------
+1) make zedboard_defconfig
+2) make UBOOT_BIN=u-boot-dtb.img
+3) copy files boot.bin, u-boot-dtb.img, rootfs.cpio.uboot,
+	uImage, zynq-zed.dtb into your SD card
+4) boot your Zedboard
+
+Note that I redefine variable UBOOT_BIN to u-boot-dtb.img
+(instead of u-boot.img) to be installed in to the images/
+directory. This binary works for the generated SPL:
+
+ U-Boot SPL 2015.07-rc2 (Jun 18 2015 - 16:42:58)
+ mmc boot
+ 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 2015.07-rc2 (Jun 18 2015 - 16:42:58 +0200)
+
+ Model: Zynq ZED Board
+ I2C:   ready
+ DRAM:  ECC disabled 512 MiB
+ MMC:   zynq_sdhci: 0
+ Using default environment
+ ...
 
 Resulting system
 ----------------
 A FAT32 partition should be created at the beginning of the SD Card
 and the following files should be installed:
 	/boot.bin
-	/devicetree.dtb
+	/zynq-zed.dtb
 	/uImage
-	/uramdisk.image.gz
-	/u-boot.img
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
 
 
 All needed files can be taken from output/images/
 
-boot.bin, uImage and u-boot.img are direct copies of the same files
+boot.bin, uImage and u-boot-dtb.img are direct copies of the same files
 available on output/images/
 
-devicetree.dtb is just zynq-zed.dtb renamed.
+The attachedpatchs of U-Boot enables to create boot.bin file
+automatically without the need of Xilinx tools. The U-Boot's
+environment is redefined there 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:
 
-uramdisk.image.gz is rootfs.cpio.uboot renamed
+kernel_image=myimage
+modeboot=myboot
+myboot=...
configs/zedboard_defconfig +4 -3
index 76688e9..7c76793 100644
@@ -19,8 +19,9 @@ BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="zynq_zed"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Xilinx/u-boot-xlnx.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2014.1"
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2015.07-rc2"
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/board/avnet/zedboard/uboot-2015.07"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
-BR2_TARGET_UBOOT_SPL_NAME="boot.bin"
+BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN=y
Signature · 1 line
2.4.4
#14 lore raw

v3 cover Make Buildroot for Zedboard independent on Xilinx tools

In reply to Jan Viktorin

From: Jan Viktorin <[email protected]>

Hello,

thanks to Baruch and Arnout for comments. I think this the final version. The host-zynq-boot-bin now downloads just the python script (thank you for this tip, I was looking for such solution).

The second commit is unchanged.

Regards
Jan Viktorin

Jan Viktorin (2):
host-zynq-boot-bin: new package
zedboard: Upgrade to U-Boot 2015.07

 board/avnet/zedboard/readme.txt        | 95 ++++++++++++++++------------------
 configs/zedboard_defconfig             |  7 +--
 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  8 +++
 package/zynq-boot-bin/zynq-boot-bin.mk | 24 +++++++++
 5 files changed, 81 insertions(+), 54 deletions(-)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
Signature · 1 line
2.4.4
#15 lore raw

PATCH v3 1/2 host-zynq-boot-bin: new package

From: Jan Viktorin <[email protected]>

The package creates file images/boot.bin to boot
Xilinx Zynq based boards. It might not work with
U-Boot older then 2015.07.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

---
Changes:
* v0->v1: create this package instead of patching U-Boot by zynq-boot-bin.py
* v1->v2: call zynq-boot-bin.py from the package
* v2->v3: remove python deps, do not download U-Boot, just the script

 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  8 ++++++++
 package/zynq-boot-bin/zynq-boot-bin.mk | 24 ++++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
package/Config.in.host +1 -0
index 1e047aa..030c91f 100644
@@ -27,5 +27,6 @@ menu "Host utilities"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
+	source "package/zynq-boot-bin/Config.in.host"
 
 endmenu
package/zynq-boot-bin/Config.in.host new file +8 -0
new file mode 100644
index 0000000..bc151a7
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN
+	bool "host zynq-boot-bin"
+	depends on BR2_TARGET_UBOOT_SPL
+	help
+	  This is a simple Python script that creates BOOT.BIN file
+	  to boot Xilinx Zynq based on U-Boot's SPL.
+
+	  https://github.com/Xilinx/u-boot-xlnx
package/zynq-boot-bin/zynq-boot-bin.mk new file +24 -0
new file mode 100644
index 0000000..aff4593
@@ -0,0 +1,24 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
+ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools
+
+HOST_ZYNQ_BOOT_BIN_INSTALL_STAGING = NO
+HOST_ZYNQ_BOOT_BIN_INSTALL_IMAGES = YES
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = uboot
+
+define HOST_ZYNQ_BOOT_BIN_EXTRACT_CMDS
+	@cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D)
+endef
+
+define HOST_ZYNQ_BOOT_BIN_BUILD_CMDS
+	@env python2 $(@D)/zynq-boot-bin.py -o $(BINARIES_DIR)/boot.bin \
+		-u $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)))
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
2.4.4
#16 lore raw

PATCH v3 1/2 host-zynq-boot-bin: new package

Jan, All,

On 2015-06-23 14:49 +0200, Jan Viktorin spake thusly:

Quoted 10 lines

From: Jan Viktorin <[email protected]>

The package creates file images/boot.bin to boot
Xilinx Zynq based boards. It might not work with
U-Boot older then 2015.07.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

[--SNIP--]

Quoted 6 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +0 -0
new file mode 100644
index 0000000..aff4593

package/zynq-boot-bin/zynq-boot-bin.mk line 9

Quoted 9 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +9 -0
@@ -0,0 +1,24 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
+ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools

Missing licensing information:
ZYNQ_BOOT_BIN_LICENSE = foo license...
ZYNQ_BOOT_BIN_LICENSE_FILES = License-file

package/zynq-boot-bin/zynq-boot-bin.mk line 12

Quoted 2 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +2 -0
+HOST_ZYNQ_BOOT_BIN_INSTALL_STAGING = NO
+HOST_ZYNQ_BOOT_BIN_INSTALL_IMAGES = YES

Since this is a host-only package, you need not specify either;
- install_staging already defaults to no,
- both are anyway only valid for target packages.

package/zynq-boot-bin/zynq-boot-bin.mk line 20

Quoted 8 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +8 -0
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = uboot
+
+define HOST_ZYNQ_BOOT_BIN_EXTRACT_CMDS
+	@cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D)
+endef
+
+define HOST_ZYNQ_BOOT_BIN_BUILD_CMDS
+	@env python2 $(@D)/zynq-boot-bin.py -o $(BINARIES_DIR)/boot.bin \

That mught be an indication that it should depend on host-python, no?

package/zynq-boot-bin/zynq-boot-bin.mk line 22

Quoted 2 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +2 -0
+		-u $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)))
+endef

Although what you wrote does work, it is not absolutely correct: the build commands should just really build, not install anything in the output directories.

You should generate the files in the package build directory, and provide a command that does the install (even if it is just copying the generated files).

package/zynq-boot-bin/zynq-boot-bin.mk line 24

Quoted 1 line
package/zynq-boot-bin/zynq-boot-bin.mk new file +1 -0
+$(eval $(host-generic-package))

But, then since you install in $(BINARIES_DIR), which is definitely not what we usually do for host packages. The expected output of a host package is to install something in $(HOST_DIR), so that it can later be used (e.g. by another package, or by a post-build/post-image script)

Here's what I think should be done:

    ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
    ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
    ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools
    ZYNQ_BOOT_BIN_LICENSE = GPLv3+
    # No license file, license in file itself

    HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = host-python

    define HOST_ZYNQ_BOOT_BIN_INSTALL_CMDS
        @cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) \
        $(HOST_DIR)/usr/bin/$(ZYNQ_BOOT_BIN_SOURCE)
    endef

    $(eval $(hhost-generic-package))

And then in the board README file, state something along the lines:

    ---8<---
    To finalise the boot device, run the following command:

      $ ./output/host/usr/bin/zynq-boot-bin.py \
            -u output/images/boot.bin \
            -o /path/to/the/boot-stuff
    ---8<---

(you get the idea)

Note: that's what we do for the Raspberry Pi, for example, where we install the 'mkknlimg' utility in $(HOST_DIR) and tell the user how to use it in the board readme file:

    ---8<---
    The kernel image must be marked with a special header so that the
    bootloader of the RaspberryPi knows it supports Device Tree:

      $ ./output/host/usr/bin/mkknlimg output/images/zImage \
                                       /mnt/mountpointboot/zImage
    ---8<---

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#17 lore raw

PATCH v3 1/2 host-zynq-boot-bin: new package

Quoted 34 lines · Yann E. MORIN

Jan, All,

On 2015-06-23 14:49 +0200, Jan Viktorin spake thusly:

Quoted 10 lines

From: Jan Viktorin <[email protected]>

The package creates file images/boot.bin to boot
Xilinx Zynq based boards. It might not work with
U-Boot older then 2015.07.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

[--SNIP--]

Quoted 6 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +0 -0
new file mode 100644
index 0000000..aff4593

package/zynq-boot-bin/zynq-boot-bin.mk line 9

Quoted 9 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +9 -0
@@ -0,0 +1,24 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
+ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools

Missing licensing information:
ZYNQ_BOOT_BIN_LICENSE = foo license...
ZYNQ_BOOT_BIN_LICENSE_FILES = License-file

Quoted 6 lines

package/zynq-boot-bin/zynq-boot-bin.mk line 12

Quoted 2 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +2 -0
+HOST_ZYNQ_BOOT_BIN_INSTALL_STAGING = NO
+HOST_ZYNQ_BOOT_BIN_INSTALL_IMAGES = YES

Since this is a host-only package, you need not specify either;
- install_staging already defaults to no,
- both are anyway only valid for target packages.

But actually, it's not a host package, it's a target package. Took me some time
to realize that however :-) See below.

Quoted 11 lines

package/zynq-boot-bin/zynq-boot-bin.mk line 20

Quoted 9 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +8 -0
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = uboot
+
+define HOST_ZYNQ_BOOT_BIN_EXTRACT_CMDS
+	@cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D)
+endef
+
+define HOST_ZYNQ_BOOT_BIN_BUILD_CMDS
+	@env python2 $(@D)/zynq-boot-bin.py -o $(BINARIES_DIR)/boot.bin \

That mught be an indication that it should depend on host-python, no?

Actually, no, we actually require a system-python to exist. I think it also
needs to be python2 though we don't check for that. And to be honest, I have no idea why we require it...

But I certainly wouldn't like to have to build a host-python just to be able to
build the boot loader... So I'm glad there's no dependency on host-python.

Quoted 7 lines

package/zynq-boot-bin/zynq-boot-bin.mk line 22

Quoted 3 lines
package/zynq-boot-bin/zynq-boot-bin.mk new file +2 -0
+		-u $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)))
+endef

Although what you wrote does work, it is not absolutely correct: the build commands should just really build, not install anything in the output directories.

+1.

Quoted 39 lines

You should generate the files in the package build directory, and provide a command that does the install (even if it is just copying the generated files).

package/zynq-boot-bin/zynq-boot-bin.mk line 24

Quoted 1 line
package/zynq-boot-bin/zynq-boot-bin.mk new file +1 -0
+$(eval $(host-generic-package))

But, then since you install in $(BINARIES_DIR), which is definitely not what we usually do for host packages. The expected output of a host package is to install something in $(HOST_DIR), so that it can later be used (e.g. by another package, or by a post-build/post-image script)

Here's what I think should be done:

    ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
    ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
    ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools
    ZYNQ_BOOT_BIN_LICENSE = GPLv3+
    # No license file, license in file itself

    HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = host-python

    define HOST_ZYNQ_BOOT_BIN_INSTALL_CMDS
        @cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) \
        $(HOST_DIR)/usr/bin/$(ZYNQ_BOOT_BIN_SOURCE)
    endef

    $(eval $(hhost-generic-package))

And then in the board README file, state something along the lines:

    ---8<---
    To finalise the boot device, run the following command:

      $ ./output/host/usr/bin/zynq-boot-bin.py \
            -u output/images/boot.bin \
            -o /path/to/the/boot-stuff
    ---8<---
Quoted 1 line

(you get the idea)

That's what Jan originally had, but I told him to do it this way :-)

You can view zynq-boot-bin as something which really should be part of uboot.
The only point of this "program" is to create the bootloader. It will never be applied on anything except the bootloader. It doesn't need any additional configuration or command line arguments. So it would be quite pointless to burde the user with writing that stuff in a post-build script.

Perhaps, however, it should go into the boot/ directory instead of packages. It
is, after all, a pre-bootloader, like at91bootstrap.

Quoted 4 lines

Note: that's what we do for the Raspberry Pi, for example, where we install the 'mkknlimg' utility in $(HOST_DIR) and tell the user how to use it in the board readme file:

I think the same approach could be taken there. Though I can't say I understand
much of all the hoops you have to jump through to boot an RPi.

Regards,
Arnout

Quoted 12 lines
    ---8<---
    The kernel image must be marked with a special header so that the
    bootloader of the RaspberryPi knows it supports Device Tree:

      $ ./output/host/usr/bin/mkknlimg output/images/zImage \
                                       /mnt/mountpointboot/zImage
    ---8<---

Regards,
Yann E. MORIN.

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#18 lore raw

PATCH v3 1/2 host-zynq-boot-bin: new package

Arnout, Jan, All,

On 2015-07-03 22:00 +0200, Arnout Vandecappelle spake thusly:

Quoted 2 lines · Yann E. MORIN
Quoted 1 line

On 2015-06-23 14:49 +0200, Jan Viktorin spake thusly:

[--SNIP--]

Quoted 6 lines
Quoted 3 lines

Since this is a host-only package, you need not specify either;
- install_staging already defaults to no,
- both are anyway only valid for target packages.

But actually, it's not a host package, it's a target package. Took me some time
to realize that however :-) See below.

Still, I am not sure, see below. ;-)

[--SNIP--]

Quoted 5 lines
Quoted 1 line

That mught be an indication that it should depend on host-python, no?

Actually, no, we actually require a system-python to exist. I think it also
needs to be python2 though we don't check for that. And to be honest, I have no idea why we require it...

I don't know why we require it for packages, but we at least need it for the manual.

I was added way back in 2010 byy Thomas P. to fix #1531.

Quoted 2 lines

But I certainly wouldn't like to have to build a host-python just to be able to
build the boot loader... So I'm glad there's no dependency on host-python.

Agreed.

Quoted 1 line
Quoted 1 line

Here's what I think should be done:

[--SNIP--]

Quoted 10 lines

That's what Jan originally had, but I told him to do it this way :-)

You can view zynq-boot-bin as something which really should be part of uboot.
The only point of this "program" is to create the bootloader. It will never be applied on anything except the bootloader. It doesn't need any additional configuration or command line arguments. So it would be quite pointless to burde the user with writing that stuff in a post-build script.

Perhaps, however, it should go into the boot/ directory instead of packages. It
is, after all, a pre-bootloader, like at91bootstrap.

Right, that would be a better location.

Still, I believe we should handle this tool as a host tool, to support users that build their bootloader outside of Buildroot (we already install similar tools for this reason).

Quoted 5 lines
Quoted 3 lines

Note: that's what we do for the Raspberry Pi, for example, where we install the 'mkknlimg' utility in $(HOST_DIR) and tell the user how to use it in the board readme file:

I think the same approach could be taken there.

I respectfully disagree. ;-)

rpi-firmware installs a utility to add a header (really, a trailler) to the kernel image. Since the user can build his kernel outside Buildroot, we still want to leave him/her the possibility to tag the kernel properly; hence we install this utility in $(HOST_DIR), either when doing the SDcard manually, or from a post-image script.

I believe we are here in a similar situation with host-zynq-boot-bin.

However, we might be a bit more helpful here, so we have a way to automatically run those commands in a sane, generic way, like we have with TARGET_FINALIZE_HOOKS for target-finalize, but this time for images.

Note: we might _technically_ be able tore-use TARGET_FINALIZE_HOOKS, but I'm a bit uneasy to hijack it to deal with images, when it was meant to deal with the content of $(TARGET_DIR).

Quoted 2 lines

Though I can't say I understand
much of all the hoops you have to jump through to boot an RPi.

Well, it's pretty similar to the zedboard case (from what I see in the zedboard readme):
- a first partition, FAT16 or FAT32, with a bunch of files in there:
- the GPU blob, its config file, the CPU init blob
- the kernel, its command line (in a text file)
- a second partition with the rootfs

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#19 lore raw

PATCH v3 1/2 host-zynq-boot-bin: new package

Hello Arnout, Yann,

I am glad you are interested in this little feature. My original goal was to deliver a simple out-of-the-box mechanism to easily create a bootable system for Zedboard without any additional steps and with the ability to turn it off easily if necessary.

I do not understand, how should this script be treated as a bootloader stuff. I see it just as a helper host tool like the uboot-tools are (a common host package). However, uboot-tools is integrated quite deeply, it creates uImage (done by Kernel build-system) and especially root file-system (done by Buildroot). I would expect that zynq-boot-bin.py works in a similar way.

I have no clue about the TARGET_FINALIZE_HOOKS but it sounds promising.

What I find quite a good idea is to use a post-<something> script. But for that purpose, I thinks a working script in the boards/avnet/zedboard exactly for this purpose should be provided together with a preset inside the zedboard_defconfig to use it as default. This creates an out-of-the-box working configuration that is easily customizable. But what about other Zynq-based boards (well, there is no one there at the moment, but...)? Could they share the same script?

Another point that was omitted here (but it is described in the readme.txt) is that the SPL searchs for uboot-dtb.img while booting. This file is however not installed in the images directory. Instead, user gets the u-boot.img that does not work together with the SPL (at least for me). This is confusing... First, I do not get the working SPL automatically, second, I do not get the right U-Boot image. From this point of view, I'd like the original patch-based implementation :). Is this also an issue for other boards?

I am about to:

* remove the _INSTALL_STAGING, _INSTALL_IMAGES settings,
* specify the license,
* put there the EXTRACT_CMDS to avoid failure when trying to extract the zynq-boot-bin.py as an tar archive (is this correct assumption?)
* put there the INSTALL_CMDS to install the zynq-boot-bin.py into HOST_DIR

The last step is not clear to me. I also found a kind of inspiration in fs/cpio:

34 $(BINARIES_DIR)/rootfs.cpio.uboot: $(BINARIES_DIR)/rootfs.cpio host-uboot-tools
35 $(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk \
36 -C none -d $<$(ROOTFS_CPIO_COMPRESS_EXT) $@

Would it be possible to define similar rules in uboot.mk?

$(BINARIES_DIR)/boot.bin: host-zynq-boot-bin

     python2 $(HOST_DIR)/usr/bin/zynq-boot-bin.py \
         -u $(@D)/spl/u-boot-spl.bin -o $@

Regards,
Jan

Quoted 94 lines · On Fri, 3 Jul 2015 23:51:04 +0200 "Yann E. MORIN" <[email protected]>…

Arnout, Jan, All,

On 2015-07-03 22:00 +0200, Arnout Vandecappelle spake thusly:

Quoted 2 lines · Yann E. MORIN
Quoted 1 line

On 2015-06-23 14:49 +0200, Jan Viktorin spake thusly:

[--SNIP--]

Quoted 6 lines
Quoted 3 lines

Since this is a host-only package, you need not specify either;
- install_staging already defaults to no,
- both are anyway only valid for target packages.

But actually, it's not a host package, it's a target package. Took
me some time to realize that however :-) See below.

Still, I am not sure, see below. ;-)

[--SNIP--]

Quoted 6 lines
Quoted 2 lines

That mught be an indication that it should depend on host-python, no?

Actually, no, we actually require a system-python to exist. I
think it also needs to be python2 though we don't check for that. And to be honest, I have no idea why we require it...

I don't know why we require it for packages, but we at least need it for the manual.

I was added way back in 2010 byy Thomas P. to fix #1531.

Quoted 3 lines

But I certainly wouldn't like to have to build a host-python just
to be able to build the boot loader... So I'm glad there's no dependency on host-python.

Agreed.

Quoted 1 line
Quoted 1 line

Here's what I think should be done:

[--SNIP--]

Quoted 10 lines

That's what Jan originally had, but I told him to do it this
way :-)

You can view zynq-boot-bin as something which really should be
part of uboot. The only point of this "program" is to create the bootloader. It will never be applied on anything except the bootloader. It doesn't need any additional configuration or command line arguments. So it would be quite pointless to burde the user with writing that stuff in a post-build script.

Quoted 2 lines

Perhaps, however, it should go into the boot/ directory instead of
packages. It is, after all, a pre-bootloader, like at91bootstrap.

Right, that would be a better location.

Still, I believe we should handle this tool as a host tool, to support users that build their bootloader outside of Buildroot (we already install similar tools for this reason).

Quoted 5 lines
Quoted 3 lines

Note: that's what we do for the Raspberry Pi, for example, where we install the 'mkknlimg' utility in $(HOST_DIR) and tell the user how to use it in the board readme file:

I think the same approach could be taken there.

I respectfully disagree. ;-)

rpi-firmware installs a utility to add a header (really, a trailler) to the kernel image. Since the user can build his kernel outside Buildroot, we still want to leave him/her the possibility to tag the kernel properly; hence we install this utility in $(HOST_DIR), either when doing the SDcard manually, or from a post-image script.

I believe we are here in a similar situation with host-zynq-boot-bin.

However, we might be a bit more helpful here, so we have a way to automatically run those commands in a sane, generic way, like we have with TARGET_FINALIZE_HOOKS for target-finalize, but this time for images.

Note: we might _technically_ be able tore-use TARGET_FINALIZE_HOOKS, but I'm a bit uneasy to hijack it to deal with images, when it was meant to deal with the content of $(TARGET_DIR).

Quoted 2 lines

Though I can't say I understand
much of all the hoops you have to jump through to boot an RPi.

Well, it's pretty similar to the zedboard case (from what I see in the zedboard readme):
- a first partition, FAT16 or FAT32, with a bunch of files in there:
- the GPU blob, its config file, the CPU init blob
- the kernel, its command line (in a text file)
- a second partition with the rootfs

Regards,
Yann E. MORIN.

Signature · 4 lines
  Jan Viktorin, PhD student   E-mail: iviktorin at fit.vutbr.cz
  DCS FIT VUT Brno, L310      Web: http://www.fit.vutbr.cz/~iviktorin
  Bozetechova 1, 612 66       Phone: +420 54114-1357
  Brno, Czech Republic
#20 lore raw

PATCH v3 1/2 host-zynq-boot-bin: new package

In reply to Jan Viktorin

Dear Jan Viktorin,

Quoted 10 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

The package creates file images/boot.bin to boot Xilinx Zynq based boards. It might not work with U-Boot older then 2015.07.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

After reading the discussion with Arnout and Yann, here is what I'd personally prefer to see for this:

* A host-zynq-boot-bin package, which only downloads and installs the Python script to $(HOST_DIR)/usr/bin. If the script is Python 2 only then you must make it depend on host-python, because the system Python can be either Python 2 or 3. If however, the script is Python 2 and Python 3 compatible, there is no need to add a host-python dependency, because we can use the system provided Python interpreter.

* One of the two following solutions:

- An extension of the U-Boot Config.in + uboot.mk to optionally generated a Zynq image. It would add host-zynq-boot-bin in the dependencies of U-Boot, and call the Python script at the right time. Something along the lines of:

ifeq ($(BR2_TARGET_UBOOT_ZYNQ_IMAGE),y)
define UBOOT_GENERATE_ZYNQ_IMAGE

	$(HOST_DIR)/usr/bin/python2 $(HOST_DIR)/usr/bin/zynq-..py -o $(BINARIES_DIR)/...

endef
UBOOT_DEPENDENCIES += host-zynq-boot-bin UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE endif

- Just not do anything special in U-Boot, and add an entry in menuconfig to enable the host-zynq-boot-bin package, and in your board configuration, write a post-build script that generates the final image.

Thomas

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

[Buildroot] [PATCH v4 0/7 Make Buildroot for Zedboard independent on Xilinx tools

Hello all,

here follows another version of the patch series. I have rewritten it based on the previous discussion with Yann, Arnout and Thomas.

The patch 1 is unrelated, I did not know whether to post it alone or if it is OK to put it here...

The host-zynq-boot-bin is just "download & install" now.

I've added a new output format of U-Boot to generate u-boot-dtb.img which is booted by the SPL. The generation of the BOOT.BIN file is moved into uboot.mk as suggested by Thomas. I am little bit unsure about the config BR2_TARGET_UBOOT_ZYNQ_IMAGE (the depends on/select). To enable the BOOT.BIN generation, the user must set the dtb.img format and enable SPL. However, the zedboard_defconfig does it so it might be OK.

The zedboard related changes are slightly modified but almost the same.

Regards
Jan Viktorin

Jan Viktorin (7):
docs/manual: Fix trivial typo
host-zynq-boot-bin: new package
boot/uboot: Add support for dtb.img format boot/uboot: Generate BOOT.BIN file when building for Xilinx Zynq
zedboard: Generate BOOT.BIN automatically
zedboard: Patch default U-Boot environment for zedboard
zedboard: Update readme.txt to reflect BOOT.BIN generation

 board/avnet/zedboard/readme.txt                    | 84 ++++++++++------------
 ...eate-zedboard-specific-U-Boot-environment.patch | 46 ++++++++++++
 boot/uboot/Config.in                               | 16 +++++
 boot/uboot/uboot.mk                                | 12 ++++
 configs/zedboard_defconfig                         |  9 +--
 docs/manual/adding-packages-python.txt             |  2 +-
 package/Config.in.host                             |  1 +
 package/zynq-boot-bin/Config.in.host               |  8 +++
 package/zynq-boot-bin/zynq-boot-bin.hash           |  2 +
 package/zynq-boot-bin/zynq-boot-bin.mk             | 22 ++++++
 10 files changed, 151 insertions(+), 51 deletions(-)
 create mode 100644 board/avnet/zedboard/uboot/0001-zynq-Create-zedboard-specific-U-Boot-environment.patch
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.hash
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
Signature · 10 lines
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
#22 lore raw

PATCH v4 1/7 docs/manual: Fix trivial typo

---
 docs/manual/adding-packages-python.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/manual/adding-packages-python.txt +1 -1
index f81d625..588dbf8 100644
@@ -143,7 +143,7 @@ therefore only use a few of them, or none.
 * +HOST_PYTHON_FOO_NEEDS_HOST_PYTHON+, to define the host python
   interpreter. The usage of this variable is limited to host
   packages. The two supported value are +python2+ and +python3+. It
-  will ensures the right host python package is available and will
+  will ensure the right host python package is available and will
   invoke it for the build. If some build steps are overloaded, the
   right python interpreter must be explicitly called in the commands.
 
Signature · 10 lines
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
#23 lore raw

PATCH v4 1/7 docs/manual: Fix trivial typo

Acked-by "Maxime Hadjinlian" <[email protected]>

Quoted 33 lines · Jan Viktorin
---
 docs/manual/adding-packages-python.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/manual/adding-packages-python.txt +1 -2
index f81d625..588dbf8 100644
@@ -143,7 +143,7 @@ therefore only use a few of them, or none.
 * +HOST_PYTHON_FOO_NEEDS_HOST_PYTHON+, to define the host python
   interpreter. The usage of this variable is limited to host
   packages. The two supported value are +python2+ and +python3+. It
-  will ensures the right host python package is available and will
+  will ensure the right host python package is available and will
   invoke it for the build. If some build steps are overloaded, the
   right python interpreter must be explicitly called in the commands.
 
--

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
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#24 lore raw

PATCH v4 1/7 docs/manual: Fix trivial typo

In reply to Jan Viktorin

Dear Jan Viktorin,

Quoted 4 lines · Jan Viktorin
---
 docs/manual/adding-packages-python.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thomas

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

PATCH v4 2/7 host-zynq-boot-bin: new package

In reply to Jan Viktorin

The package provides a Python script that can create the file BOOT.BIN to boot Xilinx Zynq based boards.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

---
 package/Config.in.host                   |  1 +
 package/zynq-boot-bin/Config.in.host     |  8 ++++++++
 package/zynq-boot-bin/zynq-boot-bin.hash |  2 ++
 package/zynq-boot-bin/zynq-boot-bin.mk   | 22 ++++++++++++++++++++++
 4 files changed, 33 insertions(+)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.hash
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
package/Config.in.host +1 -0
index 1e047aa..030c91f 100644
@@ -27,5 +27,6 @@ menu "Host utilities"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
+	source "package/zynq-boot-bin/Config.in.host"
 
 endmenu
package/zynq-boot-bin/Config.in.host new file +8 -0
new file mode 100644
index 0000000..bc151a7
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN
+	bool "host zynq-boot-bin"
+	depends on BR2_TARGET_UBOOT_SPL
+	help
+	  This is a simple Python script that creates BOOT.BIN file
+	  to boot Xilinx Zynq based on U-Boot's SPL.
+
+	  https://github.com/Xilinx/u-boot-xlnx
package/zynq-boot-bin/zynq-boot-bin.hash new file +2 -0
new file mode 100644
index 0000000..0bc23de
@@ -0,0 +1,2 @@
+# From https://raw.githubusercontent.com/Xilinx/u-boot-xlnx
+sha1	940331ee02b0007099effa61e382fe7ea4174054	zynq-boot-bin.py
package/zynq-boot-bin/zynq-boot-bin.mk new file +22 -0
new file mode 100644
index 0000000..3e9d63e
@@ -0,0 +1,22 @@
+################################################################################
+#
+# zynq-boot-bin
+#
+################################################################################
+
+ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1
+ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py
+ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools
+ZYNQ_BOOT_BIN_LICENSE = GPLv3+
+
+HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = host-python
+
+define HOST_ZYNQ_BOOT_BIN_EXTRACT_CMDS
+	@cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D)
+endef
+
+define HOST_ZYNQ_BOOT_BIN_INSTALL_CMDS
+	@cp $(@D)/$(ZYNQ_BOOT_BIN_SOURCE) $(HOST_DIR)/usr/bin/$(ZYNQ_BOOT_BIN_SOURCE)
+endef
+
+$(eval $(host-generic-package))
Signature · 10 lines
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
#26 lore raw

PATCH v4 2/7 host-zynq-boot-bin: new package

Dear Jan Viktorin,

Quoted 7 lines · Jan Viktorin

The package provides a Python script that can create the file BOOT.BIN to boot Xilinx Zynq based boards.

The script zynq-boot-bin.py is contained in the Xilinx repository of U-Boot (it is not in upstream).

Quoted 9 lines
---
 package/Config.in.host                   |  1 +
 package/zynq-boot-bin/Config.in.host     |  8 ++++++++
 package/zynq-boot-bin/zynq-boot-bin.hash |  2 ++
 package/zynq-boot-bin/zynq-boot-bin.mk   | 22 ++++++++++++++++++++++
 4 files changed, 33 insertions(+)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.hash
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk

I've done quite a few changes:

[Thomas:
- remove appearance of the package in menuconfig, U-Boot will depend on it directly, so there's no need for it to appear in menuconfig
- use $(INSTALL) instead of cp for the installation
- remove @ before the extract and install commands.]

and applied the patch. Thanks!

Thomas

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

PATCH v4 3/7 boot/uboot: Add support for dtb.img format

In reply to Jan Viktorin

Allow to generate u-boot-dtb.img. This is the same format as u-boot.img, however, it contains a built-in device-tree. This file is being loaded by the U-Boot SPL.

---
 boot/uboot/Config.in | 3 +++
 boot/uboot/uboot.mk  | 2 ++
 2 files changed, 5 insertions(+)
boot/uboot/Config.in +3 -0
index fa1741c..0554544 100644
@@ -109,6 +109,9 @@ config BR2_TARGET_UBOOT_FORMAT_BIN
 config BR2_TARGET_UBOOT_FORMAT_IMG
 	bool "u-boot.img"
 
+config BR2_TARGET_UBOOT_FORMAT_DTB_IMG
+	bool "u-boot-dtb.img"
+
 config BR2_TARGET_UBOOT_FORMAT_IMX
 	bool "u-boot.imx"
 
boot/uboot/uboot.mk +2 -0
index 2cfff28..e064a8e 100644
@@ -47,6 +47,8 @@ else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y)
 UBOOT_BIN = u-boot-nand.bin
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)
 UBOOT_BIN = u-boot.img
+else ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y)
+UBOOT_BIN = u-boot-dtb.img
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y)
 UBOOT_BIN = u-boot.imx
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y)
Signature · 10 lines
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
#28 lore raw

PATCH v4 3/7 boot/uboot: Add support for dtb.img format

Hi Jan, all

Quoted 38 lines · Jan Viktorin

Allow to generate u-boot-dtb.img. This is the same format as u-boot.img, however, it contains a built-in device-tree. This file is being loaded by the U-Boot SPL.

---
 boot/uboot/Config.in | 3 +++
 boot/uboot/uboot.mk  | 2 ++
 2 files changed, 5 insertions(+)
boot/uboot/Config.in +3 -0
index fa1741c..0554544 100644
@@ -109,6 +109,9 @@ config BR2_TARGET_UBOOT_FORMAT_BIN
 config BR2_TARGET_UBOOT_FORMAT_IMG
        bool "u-boot.img"
 
+config BR2_TARGET_UBOOT_FORMAT_DTB_IMG
+       bool "u-boot-dtb.img"
+
 config BR2_TARGET_UBOOT_FORMAT_IMX
        bool "u-boot.imx"
 
boot/uboot/uboot.mk +2 -1
index 2cfff28..e064a8e 100644
@@ -47,6 +47,8 @@ else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y)
 UBOOT_BIN = u-boot-nand.bin
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)
 UBOOT_BIN = u-boot.img
+else ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y)
+UBOOT_BIN = u-boot-dtb.img
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y)
 UBOOT_BIN = u-boot.imx
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y)
--
Quoted 2 lines

2.4.5

I agree with your patch, but I would prefer dtb_img entry to be before IMG. I know that the file is not properly organized but that's not a reason to worsen it.
Other than that (which could be fixed when merged) it's fine by me.

Reviewed-by "Maxime Hadjinlian" <[email protected]>

Quoted 12 lines

--

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

Brno, Czech Republic
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#29 lore raw

PATCH v4 3/7 boot/uboot: Add support for dtb.img format

In reply to Jan Viktorin

Dear Jan Viktorin,

Quoted 9 lines · Jan Viktorin

Allow to generate u-boot-dtb.img. This is the same format as u-boot.img, however, it contains a built-in device-tree. This file is being loaded by the U-Boot SPL.

---
 boot/uboot/Config.in | 3 +++
 boot/uboot/uboot.mk  | 2 ++
 2 files changed, 5 insertions(+)

Applied, thanks.

Thomas

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

PATCH v4 4/7 boot/uboot: Generate BOOT.BIN file when building for Xilinx Zynq

In reply to Jan Viktorin

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.

---
 boot/uboot/Config.in | 13 +++++++++++++
 boot/uboot/uboot.mk  | 10 ++++++++++
 2 files changed, 23 insertions(+)
boot/uboot/Config.in +13 -0
index 0554544..420573e 100644
@@ -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
boot/uboot/uboot.mk +10 -0
index e064a8e..b51bf56 100644
@@ -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)),)
Signature · 10 lines
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
#31 lore raw

PATCH v4 4/7 boot/uboot: Generate BOOT.BIN file when building for Xilinx Zynq

Dear Jan Viktorin,

Quoted 15 lines · Jan Viktorin

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

Quoted 8 lines

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

---
 boot/uboot/Config.in | 13 +++++++++++++
 boot/uboot/uboot.mk  | 10 ++++++++++
 2 files changed, 23 insertions(+)

I've made one change:

[Thomas: remove select of BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN, since this option no longer exists.]

and applied the patch. Thanks!

Thomas

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

PATCH v4 5/7 zedboard: Generate BOOT.BIN automatically

In reply to Jan Viktorin

The U-Boot v2015.07 builds working SPL without a manual intervention. The BOOT.BIN is generated from the standard SPL so no BR2_TARGET_UBOOT_SPL_NAME redefinition is needed. The SPL requires the u-boot-dtb.img file to boot properly.

---
 configs/zedboard_defconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
configs/zedboard_defconfig +4 -4
index 76688e9..cd6436c 100644
@@ -19,8 +19,8 @@ BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="zynq_zed"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Xilinx/u-boot-xlnx.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2014.1"
-BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2015.07-rc2"
+BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
 BR2_TARGET_UBOOT_SPL=y
-BR2_TARGET_UBOOT_SPL_NAME="boot.bin"
+BR2_TARGET_UBOOT_ZYNQ_IMAGE=y
Signature · 10 lines
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
#33 lore raw

PATCH v4 6/7 zedboard: Patch default U-Boot environment for zedboard

In reply to Jan Viktorin

This patch changes the U-Boot's default environment to boot Zedboard out-of-the-box from SD card.

The sdboot procedure tries to load a file system.bit into the Zynq's PL (only if it exists). It is also possible to alter the booting by an uEnv.txt file located on your SD card. The uEnv.txt is a plain text file with <key>=<value> pairs one per line.

---
 ...eate-zedboard-specific-U-Boot-environment.patch | 46 ++++++++++++++++++++++
 configs/zedboard_defconfig                         |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 board/avnet/zedboard/uboot/0001-zynq-Create-zedboard-specific-U-Boot-environment.patch
board/avnet/zedboard/uboot/0001-zynq-Create-zedboard-specific-U-Boot-environment.patch new file +46 -0
new file mode 100644
index 0000000..1971503
@@ -0,0 +1,46 @@
+From a4c0058967a551385da5e16d2787d9f704cab225 Mon Sep 17 00:00:00 2001
+From: Jan Viktorin <[email protected]>
+Date: Thu, 18 Jun 2015 16:26:02 +0200
+Subject: [PATCH 2/2] zynq: Create zedboard-specific U-Boot environment
+
+---
+ include/configs/zynq_zed.h | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/include/configs/zynq_zed.h b/include/configs/zynq_zed.h
+index 946de95..2400a88 100644
+--- a/include/configs/zynq_zed.h
++++ b/include/configs/zynq_zed.h
+@@ -24,4 +24,29 @@
+
+ #include <configs/zynq-common.h>
+
++#undef CONFIG_EXTRA_ENV_SETTINGS
++#define CONFIG_EXTRA_ENV_SETTINGS \
++	"envload=mmc info && if fatload mmc 0 0x1000 uEnv.txt;"\
++	" then echo Importing uEnv.txt; env import -t 0x1000"  \
++	" $filesize; fi;\0"                                    \
++	"bootcmd=run $modeboot\0"                              \
++	"modeboot=sdboot\0"                                    \
++	"baudrate=115200\0"                                    \
++	"bootenv=uEnv.txt\0"                                   \
++	"devicetree_image=zynq-zed.dtb\0"                      \
++	"kernel_image=uImage\0"                                \
++	"ramdisk_image=rootfs.cpio.uboot\0"                    \
++	"fpga_image=system.bit\0"                              \
++	"sdboot=echo Booting from SD...;"                      \
++	" run envload; run fpgaboot;"                          \
++	" fatload mmc 0 0x1000000 ${kernel_image}"             \
++	" && fatload mmc 0 0x2000000 ${ramdisk_image}"         \
++	" && fatload mmc 0 0x3000000 ${devicetree_image}"      \
++	" && bootm 0x1000000 0x2000000 0x3000000\0"            \
++	"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;\0"
++
+ #endif /* __CONFIG_ZYNQ_ZED_H */
+--
+2.4.3
+
configs/zedboard_defconfig +1 -0
index cd6436c..99720db 100644
@@ -21,6 +21,7 @@ BR2_TARGET_UBOOT_BOARDNAME="zynq_zed"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
 BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git"
 BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2015.07-rc2"
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/board/avnet/zedboard/uboot"
 BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_ZYNQ_IMAGE=y
Signature · 10 lines
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
#34 lore raw

PATCH v4 6/7 zedboard: Patch default U-Boot environment for zedboard

Dear Jan Viktorin,

Quoted 9 lines · Jan Viktorin

This patch changes the U-Boot's default environment to boot Zedboard out-of-the-box from SD card.

The sdboot procedure tries to load a file system.bit into the Zynq's PL (only if it exists). It is also possible to alter the booting by an uEnv.txt file located on your SD card. The uEnv.txt is a plain text file with <key>=<value> pairs one per line.

Quoted 6 lines
---
 ...eate-zedboard-specific-U-Boot-environment.patch | 46 ++++++++++++++++++++++
 configs/zedboard_defconfig                         |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 board/avnet/zedboard/uboot/0001-zynq-Create-zedboard-specific-U-Boot-environment.patch

Applied, thanks.

Thomas

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

PATCH v4 7/7 zedboard: Update readme.txt to reflect BOOT.BIN generation

In reply to Jan Viktorin
---
 board/avnet/zedboard/readme.txt | 84 +++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 46 deletions(-)
board/avnet/zedboard/readme.txt +38 -46
index a3f1f3e..e0ce024 100644
@@ -5,68 +5,60 @@ System-On-Chip.
 Zedboard information including schematics, reference designs, and manuals are
 available from http://www.zedboard.org .
 
-The U-Boot firmware for the Xilinx Zynq All Programmable SoC depends
-on some proprietary code. This dependency consists of a pair of
-files are available from the Xilinx SDK installation.
+Steps to create a working system for Zedboard:
 
-You will need these files from Xilinx SDK installation to generate
-the U-Boot firmware:
-	ps7_init.c
-	ps7_init.h
+1) make zedboard_defconfig
+2) make
+3) copy files BOOT.BIN, u-boot-dtb.img, rootfs.cpio.uboot,
+	uImage, zynq-zed.dtb into your SD card
+4) boot your Zedboard
 
-Buildroot will create the following files and place them in the
-<output>/images directory.
-	zynq-zed.dtb
-	rootfs.cpio.uboot
-	uImage
-	u-boot.img
-	boot.bin
+The expected output:
 
+ U-Boot SPL 2015.07-rc2 (Jun 18 2015 - 16:42:58)
+ mmc boot
+ 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
 
-uboot.bin  -- U-Boot SPL w/ Xilinx boot.bin wrapper
----------------------------------------------------
+ U-Boot 2015.07-rc2 (Jun 18 2015 - 16:42:58 +0200)
 
-Due to licensing issues, the files ps7_init.c/h are not able to be
-distributed with the U-Boot source code.  These files are required to make a
-boot.bin file.
-
-If you already have the Xilinx tools installed, the following sequence will
-unpack, patch and build the rfs, kernel, uboot, and uboot-spl.
-
-make zedboard_defconfig
-make uboot-patch
-cp ${XILINX}/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.{c,h} \
-output/build/uboot-xilinx-v2014.1/board/xilinx/zynq/
-
-After copying these files into the U-Boot source tree, you can
-continue the build with:
-
-make
-
-*Notice*
-While the build will successfully complete without the ps7_init.*
-files,  the uboot.bin file generated by this configuration will not
-function properly on the Zedboard.  Therefore, it is imperative that
-the ps7_init.* files be copied into the U-Boot source tree any time
-the clean, or uboot-dirclean targets are made.
+ Model: Zynq ZED Board
+ I2C:   ready
+ DRAM:  ECC disabled 512 MiB
+ MMC:   zynq_sdhci: 0
+ Using default environment
+ ...
 
+When using an older U-Boot then 2015.07, a working ps7_init.c
+file is required to be installed into the U-Boot directory
+structure. From 2015.07, the major Zynq-based boards are
+supported without any manual intervention.
 
 Resulting system
 ----------------
 A FAT32 partition should be created at the beginning of the SD Card
 and the following files should be installed:
-	/boot.bin
-	/devicetree.dtb
+	/BOOT.BIN
+	/zynq-zed.dtb
 	/uImage
-	/uramdisk.image.gz
-	/u-boot.img
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
 
 
 All needed files can be taken from output/images/
 
-boot.bin, uImage and u-boot.img are direct copies of the same files
+BOOT.BIN, uImage and u-boot-dtb.img are direct copies of the same files
 available on output/images/
 
-devicetree.dtb is just zynq-zed.dtb renamed.
+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:
 
-uramdisk.image.gz is rootfs.cpio.uboot renamed
+kernel_image=myimage
+modeboot=myboot
+myboot=...
Signature · 10 lines
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
#36 lore raw

PATCH v4 7/7 zedboard: Update readme.txt to reflect BOOT.BIN generation

Dear Jan Viktorin,

Quoted 4 lines · Jan Viktorin
---
 board/avnet/zedboard/readme.txt | 84 +++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 46 deletions(-)

Applied, thanks.

Thomas

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

PATCH v3 2/2 zedboard: Upgrade to U-Boot 2015.07

In reply to Jan Viktorin

From: Jan Viktorin <[email protected]>

Until recently, generation of a bootloader for the Avnet Zedboard (and in general all Xilinx Zynq based boards) has required to use the development tools by Xilinx (Vivado, XSDK) and to walk through a quite painful procedure to generate the First Stage Boot Loader (FSBL) and the bootable BOOT.BIN image.

This commit makes Buildroot independent on the Xilinx flow by utilizing U-Boot SPL and booting the Zynq's PL by U-Boot.

The FSBL generation is not a problem anymore with U-Boot 2015.07 where a generic ps7_init.c file is included and used to build the U-Boot SPL for various boards including Zedboard. 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

To create the BOOT.BIN automatically, the host-zynq-boot-bin package is required. It automatically creates the boot.bin.

The U-Boot 2015.07 is not released at the moment, so this commit is based on 2015.07-rc2. However, as soon as it is out, the download site of U-Boot can be redirected to the release archive instead of fetching it by git.

The attached patch (0001) creates a Zedboard+Buildroot specific U-Boot environment to boot smoothly from SD card. It tries to load a file system.bit into the Zynq's PL (only if it exists). It is also possible to alter the booting by an uEnv.txt file located on your SD card. The uEnv.txt is a plain text file with <key>=<value> pairs one per line.

---
Changes:
* v0->v1: patch transformed to host-zynq-boot-bin (new pkg)
* v1->v2: move all boot.bin related functions to host-zynq-boot-bin
* v3: unchanged (posted together with host-zynq-boot-bin)

 board/avnet/zedboard/readme.txt | 95 +++++++++++++++++++----------------------
 configs/zedboard_defconfig      |  7 +--
 2 files changed, 48 insertions(+), 54 deletions(-)
board/avnet/zedboard/readme.txt +44 -51
index a3f1f3e..b2dfe4b 100644
@@ -5,68 +5,61 @@ System-On-Chip.
 Zedboard information including schematics, reference designs, and manuals are
 available from http://www.zedboard.org .
 
-The U-Boot firmware for the Xilinx Zynq All Programmable SoC depends
-on some proprietary code. This dependency consists of a pair of
-files are available from the Xilinx SDK installation.
-
-You will need these files from Xilinx SDK installation to generate
-the U-Boot firmware:
-	ps7_init.c
-	ps7_init.h
-
-Buildroot will create the following files and place them in the
-<output>/images directory.
-	zynq-zed.dtb
-	rootfs.cpio.uboot
-	uImage
-	u-boot.img
-	boot.bin
-
-
-uboot.bin  -- U-Boot SPL w/ Xilinx boot.bin wrapper
----------------------------------------------------
-
-Due to licensing issues, the files ps7_init.c/h are not able to be
-distributed with the U-Boot source code.  These files are required to make a
-boot.bin file.
-
-If you already have the Xilinx tools installed, the following sequence will
-unpack, patch and build the rfs, kernel, uboot, and uboot-spl.
-
-make zedboard_defconfig
-make uboot-patch
-cp ${XILINX}/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.{c,h} \
-output/build/uboot-xilinx-v2014.1/board/xilinx/zynq/
-
-After copying these files into the U-Boot source tree, you can
-continue the build with:
-
-make
-
-*Notice*
-While the build will successfully complete without the ps7_init.*
-files,  the uboot.bin file generated by this configuration will not
-function properly on the Zedboard.  Therefore, it is imperative that
-the ps7_init.* files be copied into the U-Boot source tree any time
-the clean, or uboot-dirclean targets are made.
-
+Steps to create a working Buildroot for Zedboard:
+
+a) use U-Boot 2015.07 (is set by zedboard_defconfig)
+b) install host-zynq-boot-bin (done automatically by dependency system)
+--------------------------
+1) make zedboard_defconfig
+2) make UBOOT_BIN=u-boot-dtb.img
+3) copy files boot.bin, u-boot-dtb.img, rootfs.cpio.uboot,
+	uImage, zynq-zed.dtb into your SD card
+4) boot your Zedboard
+
+Note that I redefine variable UBOOT_BIN to u-boot-dtb.img
+(instead of u-boot.img) to be installed in to the images/
+directory. This binary works for the generated SPL:
+
+ U-Boot SPL 2015.07-rc2 (Jun 18 2015 - 16:42:58)
+ mmc boot
+ 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 2015.07-rc2 (Jun 18 2015 - 16:42:58 +0200)
+
+ Model: Zynq ZED Board
+ I2C:   ready
+ DRAM:  ECC disabled 512 MiB
+ MMC:   zynq_sdhci: 0
+ Using default environment
+ ...
 
 Resulting system
 ----------------
 A FAT32 partition should be created at the beginning of the SD Card
 and the following files should be installed:
 	/boot.bin
-	/devicetree.dtb
+	/zynq-zed.dtb
 	/uImage
-	/uramdisk.image.gz
-	/u-boot.img
+	/rootfs-cpio.uboot
+	/u-boot-dtb.img
 
 
 All needed files can be taken from output/images/
 
-boot.bin, uImage and u-boot.img are direct copies of the same files
+boot.bin, uImage and u-boot-dtb.img are direct copies of the same files
 available on output/images/
 
-devicetree.dtb is just zynq-zed.dtb renamed.
+The attachedpatchs of U-Boot enables to create boot.bin file
+automatically without the need of Xilinx tools. The U-Boot's
+environment is redefined there 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:
 
-uramdisk.image.gz is rootfs.cpio.uboot renamed
+kernel_image=myimage
+modeboot=myboot
+myboot=...
configs/zedboard_defconfig +4 -3
index 76688e9..7c76793 100644
@@ -19,8 +19,9 @@ BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="zynq_zed"
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
-BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Xilinx/u-boot-xlnx.git"
-BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2014.1"
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2015.07-rc2"
+BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/board/avnet/zedboard/uboot-2015.07"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
-BR2_TARGET_UBOOT_SPL_NAME="boot.bin"
+BR2_PACKAGE_HOST_ZYNQ_BOOT_BIN=y
Signature · 1 line
2.4.4
#38 lore raw

v3 cover Make Buildroot for Zedboard independent on Xilinx tools

In reply to Jan Viktorin

Hello,

will be the proposed patchs applied in the near future?

Regards
Jan

Quoted 27 lines · On Tue, 23 Jun 2015 14:49:09 +0200 Jan Viktorin <[email protected]>…

From: Jan Viktorin <[email protected]>

Hello,

thanks to Baruch and Arnout for comments. I think this the final version. The host-zynq-boot-bin now downloads just the python script (thank you for this tip, I was looking for such solution).

The second commit is unchanged.

Regards
Jan Viktorin

Jan Viktorin (2):
host-zynq-boot-bin: new package
zedboard: Upgrade to U-Boot 2015.07

 board/avnet/zedboard/readme.txt        | 95 ++++++++++++++++------------------
 configs/zedboard_defconfig             |  7 +--
 package/Config.in.host                 |  1 +
 package/zynq-boot-bin/Config.in.host   |  8 +++
 package/zynq-boot-bin/zynq-boot-bin.mk | 24 +++++++++
 5 files changed, 81 insertions(+), 54 deletions(-)
 create mode 100644 package/zynq-boot-bin/Config.in.host
 create mode 100644 package/zynq-boot-bin/zynq-boot-bin.mk
Signature · 4 lines
  Jan Viktorin, PhD student   E-mail: iviktorin at fit.vutbr.cz
  DCS FIT VUT Brno, L310      Web: http://www.fit.vutbr.cz/~iviktorin
  Bozetechova 1, 612 66       Phone: +420 54114-1357
  Brno, Czech Republic
#39 lore raw

v3 cover Make Buildroot for Zedboard independent on Xilinx tools

Jan, All,

On 2015-07-02 14:40 +0200, Jan Viktorin spake thusly:

Quoted 1 line

will be the proposed patchs applied in the near future?

Well, we need to review and test them...

We currently have 401 patches pending in our patch queue:
https://patchwork.ozlabs.org/project/buildroot/list/

Since there's not many of us doing reviews/tests, it takes time.

If you want to increase the likelyhood your patches are reviewed soon (and I've already started), you can help reduce the patch queue:

- get a patch (not yours), apply it to your Buildroot tree, build a configuration with that patch and test it (as much as you can, at least build-test in various target configurations: arm, mips... LE/BE, glibc/uClibc/musl, internal/external toolchain...) and report your findings to the list

- get a patch (not yours), look at it, and see if it fits in the Buildroot 'spirit' (code style, mandatory information, licensing...) and report to hte list.

See:
http://buildroot.net/downloads/manual/manual.html#_contributing_to_buildroot
http://buildroot.net/downloads/manual/manual.html#_reviewing_and_testing_patches

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#40 lore raw

v3 cover Make Buildroot for Zedboard independent on Xilinx tools

Hello Yann,

I see your point. I was just uncertain whether it was forgotten or if there is some issue I did not see. Now, I see you are doing very well, apologize. Recently, I've beated the contribution process (not as easy as it looks like when just passively watching the mailing list), probably I will beat also the review process after some time.

Regards
Jan

Quoted 32 lines · On Fri, 3 Jul 2015 19:40:05 +0200 "Yann E. MORIN" <[email protected]>…

Jan, All,

On 2015-07-02 14:40 +0200, Jan Viktorin spake thusly:

Quoted 1 line

will be the proposed patchs applied in the near future?

Well, we need to review and test them...

We currently have 401 patches pending in our patch queue:
https://patchwork.ozlabs.org/project/buildroot/list/

Since there's not many of us doing reviews/tests, it takes time.

If you want to increase the likelyhood your patches are reviewed soon (and I've already started), you can help reduce the patch queue:

- get a patch (not yours), apply it to your Buildroot tree, build a configuration with that patch and test it (as much as you can, at least build-test in various target configurations: arm, mips... LE/BE, glibc/uClibc/musl, internal/external toolchain...) and
report your findings to the list

- get a patch (not yours), look at it, and see if it fits in the Buildroot 'spirit' (code style, mandatory information,
licensing...) and report to hte list.

See:
http://buildroot.net/downloads/manual/manual.html#_contributing_to_buildroot
http://buildroot.net/downloads/manual/manual.html#_reviewing_and_testing_patches

Regards,
Yann E. MORIN.

#41 lore raw

PATCH 1/2 zedboard: Upgrade to Linux xilinx-v2015.1 (3.18)

In reply to Jan Viktorin

Dear Jan Viktorin,

Quoted 6 lines · Jan Viktorin

From: Jan Viktorin <[email protected]>

---
 configs/zedboard_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thomas

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