* [Buildroot] [PATCH v3 0/2] Add omap-u-boot-utils and build .ift OMAP image @ 2012-03-15 20:54 Luca Ceresoli 2012-03-15 20:54 ` [Buildroot] [PATCH v3 1/2] omap-u-boot-utils: add new host package Luca Ceresoli 2012-03-15 20:54 ` [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli 0 siblings, 2 replies; 7+ messages in thread From: Luca Ceresoli @ 2012-03-15 20:54 UTC (permalink / raw) To: buildroot Hi, this is v3 of a small patch series that I sent back in September (http://lists.busybox.net/pipermail/buildroot/2011-September/045813.html). It was not accepted at that time because it introduced a user-visible host package, which was not supported in Buildroot. This fired up a brief discussion, and the decision was made to allow these packages within a suitable infrastructure. This infrastructure is now in place (since about commit 6b04b2dda6bf87dc12), so here are again my two patches updated to the new scheme and refreshed in general. Luca Luca Ceresoli (2): omap-u-boot-utils: add new host package u-boot: build signed image for OMAP processors boot/uboot/Config.in | 16 ++++++++++++++++ boot/uboot/uboot.mk | 24 ++++++++++++++++++++++++ package/Config.in.host | 1 + package/omap-u-boot-utils/Config.in.host | 8 ++++++++ package/omap-u-boot-utils/omap-u-boot-utils.mk | 22 ++++++++++++++++++++++ 5 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 package/omap-u-boot-utils/Config.in.host create mode 100644 package/omap-u-boot-utils/omap-u-boot-utils.mk -- 1.7.5.4 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 1/2] omap-u-boot-utils: add new host package 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 ` Luca Ceresoli 2012-03-18 17:22 ` Arnout Vandecappelle 2012-03-15 20:54 ` [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli 1 sibling, 1 reply; 7+ messages in thread From: Luca Ceresoli @ 2012-03-15 20:54 UTC (permalink / raw) To: buildroot Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> --- New in v3: - update to the user-visible host packages policy discussed in mailing-list (Config.in.host etc) and list in the Host Tools menu - update to current GENTARGETS infrastructure - bump to the latest git snapshot, which fixes compilation with host gcc 4.6. New in v2: - xxx_SOURCE is useless with the git download method, remove it; - OMAP_U_BOOT_UTILS_TARGETS is used only once, hardcoded it. --- package/Config.in.host | 1 + package/omap-u-boot-utils/Config.in.host | 8 ++++++++ package/omap-u-boot-utils/omap-u-boot-utils.mk | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 package/omap-u-boot-utils/Config.in.host create mode 100644 package/omap-u-boot-utils/omap-u-boot-utils.mk diff --git a/package/Config.in.host b/package/Config.in.host index 1f49e79..184a69b 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -1,5 +1,6 @@ menu "Host utilities" +source "package/omap-u-boot-utils/Config.in.host" source "package/openocd/Config.in.host" source "package/sam-ba/Config.in.host" source "package/uboot-tools/Config.in.host" diff --git a/package/omap-u-boot-utils/Config.in.host b/package/omap-u-boot-utils/Config.in.host new file mode 100644 index 0000000..63fbdf5 --- /dev/null +++ b/package/omap-u-boot-utils/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS + bool "host omap-u-boot-utils" + help + U-Boot Utilities for Texas Instrument's OMAP platforms. + This is a set of tools to control U-Boot from scripts, generate + OMAP-specific signed image files and more. + + https://github.com/nmenon/omap-u-boot-utils diff --git a/package/omap-u-boot-utils/omap-u-boot-utils.mk b/package/omap-u-boot-utils/omap-u-boot-utils.mk new file mode 100644 index 0000000..324544e --- /dev/null +++ b/package/omap-u-boot-utils/omap-u-boot-utils.mk @@ -0,0 +1,22 @@ +############################################################# +# +# omap-u-boot-utils +# +############################################################# + +OMAP_U_BOOT_UTILS_VERSION = 8aff852322 +OMAP_U_BOOT_UTILS_SITE = git://github.com/nmenon/omap-u-boot-utils.git +OMAP_U_BOOT_UTILS_SITE_METHOD = git + +define HOST_OMAP_U_BOOT_UTILS_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_OMAP_U_BOOT_UTILS_INSTALL_CMDS + for f in gpsign pserial tagger ucmd ukermit ; do \ + [ -f ${HOST_DIR}/usr/bin/$$f ] || \ + install -m 755 -D $(@D)/$$f ${HOST_DIR}/usr/bin/$$f ; \ + done +endef + +$(eval $(call GENTARGETS,host)) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 1/2] omap-u-boot-utils: add new host package 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 0 siblings, 1 reply; 7+ messages in thread From: Arnout Vandecappelle @ 2012-03-18 17:22 UTC (permalink / raw) To: buildroot On Thursday 15 March 2012 21:54:11 Luca Ceresoli wrote: [snip] > +############################################################# > +# > +# omap-u-boot-utils > +# > +############################################################# > + > +OMAP_U_BOOT_UTILS_VERSION = 8aff852322 > +OMAP_U_BOOT_UTILS_SITE = git://github.com/nmenon/omap-u-boot-utils.git > +OMAP_U_BOOT_UTILS_SITE_METHOD = git SITE_METHOD is actually redundant because it is derived from the git:// prefix. Still, I prefer this site method. OTOH, for the URL, I prefer tu use the http URL. Many company firewalls block git traffic. > + > +define HOST_OMAP_U_BOOT_UTILS_BUILD_CMDS > + $(MAKE) -C $(@D) > +endef > + > +define HOST_OMAP_U_BOOT_UTILS_INSTALL_CMDS > + for f in gpsign pserial tagger ucmd ukermit ; do \ > + [ -f ${HOST_DIR}/usr/bin/$$f ] || \ Why this condition? The result is that when you bump the version and don't do a make clean, the old version will still be installed in the host directory. Regards, Arnout > + install -m 755 -D $(@D)/$$f ${HOST_DIR}/usr/bin/$$f ; \ > + done > +endef > + > +$(eval $(call GENTARGETS,host)) > -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 1/2] omap-u-boot-utils: add new host package 2012-03-18 17:22 ` Arnout Vandecappelle @ 2012-03-19 14:56 ` Luca Ceresoli 0 siblings, 0 replies; 7+ messages in thread From: Luca Ceresoli @ 2012-03-19 14:56 UTC (permalink / raw) To: buildroot Arnout Vandecappelle wrote: > On Thursday 15 March 2012 21:54:11 Luca Ceresoli wrote: > [snip] >> +############################################################# >> +# >> +# omap-u-boot-utils >> +# >> +############################################################# >> + >> +OMAP_U_BOOT_UTILS_VERSION = 8aff852322 >> +OMAP_U_BOOT_UTILS_SITE = git://github.com/nmenon/omap-u-boot-utils.git >> +OMAP_U_BOOT_UTILS_SITE_METHOD = git > SITE_METHOD is actually redundant because it is derived from the > git:// prefix. Still, I prefer this site method. > > OTOH, for the URL, I prefer tu use the http URL. Many company > firewalls block git traffic. I think you should start a company-wide petition against such a torture! ;) Anyway... I used to think github only supports https, but now I found out also http works, and is is even already used by other BR packages... I'll resubmit with an http URL. > >> + >> +define HOST_OMAP_U_BOOT_UTILS_BUILD_CMDS >> + $(MAKE) -C $(@D) >> +endef >> + >> +define HOST_OMAP_U_BOOT_UTILS_INSTALL_CMDS >> + for f in gpsign pserial tagger ucmd ukermit ; do \ >> + [ -f ${HOST_DIR}/usr/bin/$$f ] || \ > Why this condition? The result is that when you bump the version and > don't do a make clean, the old version will still be installed in the > host directory. Oops, will fix. Thanks, Luca ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors 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-15 20:54 ` Luca Ceresoli 2012-03-18 17:33 ` Arnout Vandecappelle 1 sibling, 1 reply; 7+ messages in thread From: Luca Ceresoli @ 2012-03-15 20:54 UTC (permalink / raw) To: buildroot 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. + +if BR2_TARGET_UBOOT_OMAP_IFT + +config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG + string "gpsign Configuration Header config file" + +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 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)),) +$(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) -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors 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 0 siblings, 1 reply; 7+ messages in thread From: Arnout Vandecappelle @ 2012-03-18 17:33 UTC (permalink / raw) To: buildroot 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v3 2/2] u-boot: build signed image for OMAP processors 2012-03-18 17:33 ` Arnout Vandecappelle @ 2012-03-19 15:24 ` Luca Ceresoli 0 siblings, 0 replies; 7+ messages in thread From: Luca Ceresoli @ 2012-03-19 15:24 UTC (permalink / raw) To: buildroot 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-19 15:24 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox