From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors
Date: Mon, 19 Mar 2012 16:24:30 +0100 [thread overview]
Message-ID: <4F674FAE.9040306@lucaceresoli.net> (raw)
In-Reply-To: <201203181833.30988.arnout@mind.be>
Arnout Vandecappelle wrote:
> 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.
I've added a few details to both options.
>
>> +
>> +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.
Yep, removed.
>
>> 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).
I don't think we have such a check for other similar cases, but since it is
anyway helping users I added it.
Luca
prev parent reply other threads:[~2012-03-19 15:24 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
2012-03-19 15:24 ` Luca Ceresoli [this message]
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=4F674FAE.9040306@lucaceresoli.net \
--to=luca@lucaceresoli.net \
--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