All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Flandrin <lionel@svkt.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] u-boot: Add support for Altera mkpimage generation
Date: Thu, 26 Jan 2017 12:17:52 +0100	[thread overview]
Message-ID: <20170126111753.24948-1-lionel@svkt.org> (raw)
In-Reply-To: <20170126111604.24816-1-lionel@svkt.org>

This image format is used by Altera's SoC FPGAs BootROMs.

Signed-off-by: Lionel Flandrin <lionel@svkt.org>
---
 boot/uboot/Config.in | 30 ++++++++++++++++++++++++++++++
 boot/uboot/uboot.mk  | 12 ++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 4e629c0ef..30db8d8b4 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -255,6 +255,36 @@ config BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE
 
 endif
 
+config BR2_TARGET_UBOOT_FORMAT_MKPIMAGE
+       bool "u-boot-dtb.mkpimage (Altera SoC BootROMs)"
+       help
+          Altera's mkpimage format used on their SoCs.
+
+if BR2_TARGET_UBOOT_FORMAT_MKPIMAGE
+
+choice
+       prompt "mkpimage header"
+       default BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_V1
+       help
+         Select the header format for mkpimage
+
+config BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_V0
+       bool "Arria/Cyclone V (v0)"
+       help
+         Header version 1, used by the Arria V and Cyclone V SoCs
+
+config BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_V1
+       bool "Arria 10 (v1)"
+       help
+         Header version 1, used by the Arria10 SoC
+endchoice
+
+config BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_VERSION
+       int
+       default 0 if BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_V0
+       default 1 if BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_V1
+endif
+
 config BR2_TARGET_UBOOT_FORMAT_CUSTOM
 	bool "Custom (specify below)"
 	help
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 6b9d54454..d48521a26 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -104,6 +104,18 @@ UBOOT_MAKE_TARGET += u-boot.sb
 UBOOT_DEPENDENCIES += host-elftosb host-openssl
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_FORMAT_MKPIMAGE),y)
+define UBOOT_ALTERA_MKPIMAGE
+       $(HOST_DIR)/usr/bin/mkpimage \
+               --header-version $(BR2_TARGET_UBOOT_FORMAT_MKPIMAGE_VERSION) \
+               -o $(BINARIES_DIR)/u-boot-dtb.mkpimage \
+               $(@D)/u-boot-dtb.bin
+endef
+UBOOT_MAKE_TARGET += u-boot-dtb.bin
+UBOOT_DEPENDENCIES += host-mkpimage
+UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_ALTERA_MKPIMAGE
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
 UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
 endif
-- 
2.11.0

  reply	other threads:[~2017-01-26 11:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 11:16 [Buildroot] [PATCH 1/3] mkpimage: rewrite to support header version 1 Lionel Flandrin
2017-01-26 11:17 ` Lionel Flandrin [this message]
2017-01-26 11:17   ` [Buildroot] [PATCH 3/3] DEVELOPERS: Add Lionel Flandrin to package/mkpimage Lionel Flandrin
2017-01-26 11:25 ` [Buildroot] [PATCH 1/3] mkpimage: rewrite to support header version 1 Lionel Flandrin
2017-01-26 11:28   ` Lionel Flandrin
2017-01-27  8:17     ` Thomas Petazzoni
2017-01-27  9:52       ` Lionel Flandrin
2017-01-28  8:42         ` Thomas Petazzoni
2017-01-28 11:27           ` Lionel Flandrin
2017-01-30 10:33             ` [Buildroot] [PATCH 1/2] mkpimage: bump to latest barebox version Lionel Flandrin
2017-01-30 10:33               ` [Buildroot] [PATCH 2/2] u-boot: Add support for Altera mkpimage generation Lionel Flandrin
2017-02-09 22:33                 ` Thomas Petazzoni
2017-02-10  9:10                   ` Lionel Flandrin
2017-02-10  9:30                     ` Thomas Petazzoni
2017-02-10 13:21                       ` Lionel Flandrin
2017-02-13 13:59                 ` [Buildroot] [PATCH 1/2] u-boot: add an option to generate u-boot-dtb.bin Lionel Flandrin
2017-02-13 13:59                   ` [Buildroot] [PATCH 2/2] u-boot: add support for full image socfpga mkpimage support Lionel Flandrin
2017-02-13 14:27                     ` Thomas Petazzoni
2017-02-13 14:57                       ` Lionel Flandrin
2017-02-13 15:20                         ` Thomas Petazzoni
2017-02-13 15:33                     ` [Buildroot] [PATCH v2 2/2] u-boot: add support for full image socfpga mkpimage Lionel Flandrin
2017-03-05 21:31                       ` Thomas Petazzoni
2017-03-05 21:30                   ` [Buildroot] [PATCH 1/2] u-boot: add an option to generate u-boot-dtb.bin Thomas Petazzoni
2017-02-09 22:34               ` [Buildroot] [PATCH 1/2] mkpimage: bump to latest barebox version Thomas Petazzoni

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20170126111753.24948-1-lionel@svkt.org \
    --to=lionel@svkt.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

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

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