Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v6 0/2] u-boot additions for OMAP processors
@ 2012-05-17 20:11 Luca Ceresoli
  2012-05-17 20:11 ` [Buildroot] [PATCH v6 1/2] omap-u-boot-utils: add new host package Luca Ceresoli
  2012-05-17 20:11 ` [Buildroot] [PATCH v6 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli
  0 siblings, 2 replies; 5+ messages in thread
From: Luca Ceresoli @ 2012-05-17 20:11 UTC (permalink / raw)
  To: buildroot

The following changes since commit 56901908c63ed7b2aedffaa4b2143ce87a15d837:

  wpa_supplicant: explicitly disable libnl by default (2012-05-16 15:26:48 +0200)

are available in the git repository at:

  git at github.com:lucaceresoli/buildroot.git tags/omap-u-boot-utils-v6

for you to fetch changes up to 26d59393521b31d18671396f3dc71a6d076fe7da:

  u-boot: build signed image for OMAP processors (2012-05-17 16:11:20 +0200)

----------------------------------------------------------------
Luca Ceresoli (2):
      omap-u-boot-utils: add new host package
      u-boot: build signed image for OMAP processors

 boot/uboot/Config.in                           |   32 ++++++++++++++++++++++++
 boot/uboot/uboot.mk                            |   25 ++++++++++++++++++
 package/Config.in.host                         |    1 +
 package/omap-u-boot-utils/Config.in.host       |    8 ++++++
 package/omap-u-boot-utils/omap-u-boot-utils.mk |   21 ++++++++++++++++
 5 files changed, 87 insertions(+)
 create mode 100644 package/omap-u-boot-utils/Config.in.host
 create mode 100644 package/omap-u-boot-utils/omap-u-boot-utils.mk

----------------------------------------------------------------
Changed in v6:
 - use $() instead of ${} for make variables to be consistent with the
   Buildroot coding style.

Changed in v5:
 - Added Arnout's Acked-by tag.

Changed in v4:
 - more verbose help text for config options;
 - remove unneeded ifeq around the definition for UBOOT_BIN_IFT;
 - produce an error message if the user-specified cfg file does not exist;
 - use http URL, for helping people whose firewalls block git;
 - do not skip installation if the files are already installed.

New in v3:
 - update to the user-visible host packages policy discussed in
   mailing-list (Config.in.host etc) and listed 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.

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v6 1/2] omap-u-boot-utils: add new host package
  2012-05-17 20:11 [Buildroot] [PATCH v6 0/2] u-boot additions for OMAP processors Luca Ceresoli
@ 2012-05-17 20:11 ` Luca Ceresoli
  2012-05-19 20:34   ` Peter Korsgaard
  2012-05-17 20:11 ` [Buildroot] [PATCH v6 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli
  1 sibling, 1 reply; 5+ messages in thread
From: Luca Ceresoli @ 2012-05-17 20:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/Config.in.host                         |    1 +
 package/omap-u-boot-utils/Config.in.host       |    8 ++++++++
 package/omap-u-boot-utils/omap-u-boot-utils.mk |   21 +++++++++++++++++++++
 3 files changed, 30 insertions(+)
 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 861b736..9fcfede 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -1,6 +1,7 @@
 menu "Host utilities"
 
 source "package/lpc3250loader/Config.in.host"
+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..e2da9a1
--- /dev/null
+++ b/package/omap-u-boot-utils/omap-u-boot-utils.mk
@@ -0,0 +1,21 @@
+#############################################################
+#
+# omap-u-boot-utils
+#
+#############################################################
+
+OMAP_U_BOOT_UTILS_VERSION = 8aff852322
+OMAP_U_BOOT_UTILS_SITE = http://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 \
+		install -m 755 -D $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \
+	done
+endef
+
+$(eval $(call GENTARGETS,host))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v6 2/2] u-boot: build signed image for OMAP processors
  2012-05-17 20:11 [Buildroot] [PATCH v6 0/2] u-boot additions for OMAP processors Luca Ceresoli
  2012-05-17 20:11 ` [Buildroot] [PATCH v6 1/2] omap-u-boot-utils: add new host package Luca Ceresoli
@ 2012-05-17 20:11 ` Luca Ceresoli
  2012-05-19 20:34   ` Peter Korsgaard
  1 sibling, 1 reply; 5+ messages in thread
From: Luca Ceresoli @ 2012-05-17 20:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 boot/uboot/Config.in |   32 ++++++++++++++++++++++++++++++++
 boot/uboot/uboot.mk  |   25 +++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index f83cf4b..afc2f91 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -99,6 +99,38 @@ 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.
+	  This allows U-Boot to boot without the need for an
+	  intermediate bootloader (e.g. x-loader) if it is written
+	  on the first sector of the boot medium.
+	  This only works for some media, such as NAND. Check your
+	  chip documentation for details. You might also want to
+	  read the documentation of gpsign, the tool that generates
+	  the .ift image, at:
+	  https://github.com/nmenon/omap-u-boot-utils/blob/master/README
+
+if BR2_TARGET_UBOOT_OMAP_IFT
+
+config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG
+	string "gpsign Configuration Header config file"
+	help
+	  The Configuration Header (CH) config file defines the
+	  desired content of the CH for the signed image.
+	  It usually contains external RAM settings and
+	  possibly other external devices initialization.
+	  The omap-u-boot-utils software contains example
+	  configuration files for some boards:
+	  https://github.com/nmenon/omap-u-boot-utils/tree/master/configs
+
+endif
+
 menuconfig BR2_TARGET_UBOOT_NETWORK
 	bool "Custom Network Settings"
 	help
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 3119092..486773a 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -33,6 +33,7 @@ else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)
 UBOOT_BIN          = u-boot.img
 else
 UBOOT_BIN          = u-boot.bin
+UBOOT_BIN_IFT      = $(UBOOT_BIN).ift
 endif
 
 UBOOT_ARCH=$(KERNEL_ARCH)
@@ -88,12 +89,36 @@ 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)/
 	$(if $(BR2_TARGET_UBOOT_SPL),
 		cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(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
+ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),)
+$(error gpsign config file $(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG) not found. 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.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v6 1/2] omap-u-boot-utils: add new host package
  2012-05-17 20:11 ` [Buildroot] [PATCH v6 1/2] omap-u-boot-utils: add new host package Luca Ceresoli
@ 2012-05-19 20:34   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2012-05-19 20:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:

 Luca> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
 Luca> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v6 2/2] u-boot: build signed image for OMAP processors
  2012-05-17 20:11 ` [Buildroot] [PATCH v6 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli
@ 2012-05-19 20:34   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2012-05-19 20:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:

 Luca> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-19 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 20:11 [Buildroot] [PATCH v6 0/2] u-boot additions for OMAP processors Luca Ceresoli
2012-05-17 20:11 ` [Buildroot] [PATCH v6 1/2] omap-u-boot-utils: add new host package Luca Ceresoli
2012-05-19 20:34   ` Peter Korsgaard
2012-05-17 20:11 ` [Buildroot] [PATCH v6 2/2] u-boot: build signed image for OMAP processors Luca Ceresoli
2012-05-19 20:34   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox