Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors
Date: Sun, 18 Mar 2012 18:33:30 +0100	[thread overview]
Message-ID: <201203181833.30988.arnout@mind.be> (raw)
In-Reply-To: <1331844852-4609-3-git-send-email-luca@lucaceresoli.net>

On Thursday 15 March 2012 21:54:12 Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> New in v3: rebase on current master.
> 
> New in v2: add depends on BR2_arm || BR2_armeb.
> ---
>  boot/uboot/Config.in |   16 ++++++++++++++++
>  boot/uboot/uboot.mk  |   24 ++++++++++++++++++++++++
>  2 files changed, 40 insertions(+), 0 deletions(-)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index c8db9fb..73e560f 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -92,6 +92,22 @@ config BR2_TARGET_UBOOT_FORMAT_LDR
>  
>  endchoice
>  
> +config BR2_TARGET_UBOOT_OMAP_IFT
> +	depends on BR2_TARGET_UBOOT_FORMAT_BIN
> +	depends on BR2_arm || BR2_armeb
> +	select BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS
> +	bool "produce a .ift signed image (OMAP)"
> +	help
> +	  Use gpsign to produce an image of u-boot.bin signed with
> +	  a Configuration Header for booting on OMAP processors.

 Could you add some explanation how it is to be used?  E.g.

The resulting u-boot.bin.ift can be written to the first
erase blocks of NAND.

(I don't know if this is correct!)

> +
> +if BR2_TARGET_UBOOT_OMAP_IFT
> +
> +config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG
> +	string "gpsign Configuration Header config file"

 A help text (that points to documentation of this config file)
would be nice.

> +
> +endif
> +
>  menuconfig BR2_TARGET_UBOOT_NETWORK
>  	bool "Custom Network Settings"
>  	help
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index db9de8d..074cbd0 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -31,6 +31,9 @@ else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y)
>  UBOOT_BIN          = u-boot-nand.bin
>  else
>  UBOOT_BIN          = u-boot.bin
> +ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y)
> +UBOOT_BIN_IFT      = ${UBOOT_BIN}.ift
> +endif

 The condition is not needed.

>  endif
>  
>  UBOOT_ARCH=$(KERNEL_ARCH)
> @@ -86,10 +89,31 @@ define UBOOT_BUILD_CMDS
>  		$(UBOOT_MAKE_TARGET)
>  endef
>  
> +define UBOOT_BUILD_OMAP_IFT
> +	${HOST_DIR}/usr/bin/gpsign -f $(@D)/u-boot.bin \
> +		-c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))
> +endef
> +
>  define UBOOT_INSTALL_IMAGES_CMDS
>  	cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
>  endef
>  
> +define UBOOT_INSTALL_OMAP_IFT_IMAGE
> +	cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/
> +endef
> +
> +ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y)
> +# we NEED a config file unless we're at make source
> +ifeq ($(filter source,$(MAKECMDGOALS)),)
> +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),)

 You could include a check for its existence (untested):
ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),)

(wildcard removes filenames which don't exist).


 Regards,
 Arnout

> +$(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting)
> +endif
> +endif
> +UBOOT_DEPENDENCIES += host-omap-u-boot-utils
> +UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT
> +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE
> +endif
> +
>  $(eval $(call GENTARGETS))
>  
>  ifeq ($(BR2_TARGET_UBOOT),y)
> 

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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

  reply	other threads:[~2012-03-18 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 20:54 [Buildroot] [PATCH v3 0/2] Add omap-u-boot-utils and build .ift OMAP image Luca Ceresoli
2012-03-15 20:54 ` [Buildroot] [PATCH v3 1/2] omap-u-boot-utils: add new host package Luca Ceresoli
2012-03-18 17:22   ` Arnout Vandecappelle
2012-03-19 14:56     ` Luca Ceresoli
2012-03-15 20:54 ` [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli
2012-03-18 17:33   ` Arnout Vandecappelle [this message]
2012-03-19 15:24     ` Luca Ceresoli

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=201203181833.30988.arnout@mind.be \
    --to=arnout@mind.be \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox