mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 10/12] ARM: i.MX53 loco: Switch to multi image support
Date: Tue, 25 Jun 2013 11:20:50 +0200	[thread overview]
Message-ID: <1372152052-5463-11-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1372152052-5463-1-git-send-email-s.hauer@pengutronix.de>

This converts the Freescale i.MX53 loco aka qsb board to
multi image. The image will be named:

barebox-freescale-imx53-loco.img

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/freescale-mx53-loco/lowlevel.c | 14 ++++++++++++--
 arch/arm/dts/Makefile                          |  2 ++
 arch/arm/mach-imx/Kconfig                      |  2 +-
 images/Makefile.imx                            |  7 +++++++
 4 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/freescale-mx53-loco/lowlevel.c b/arch/arm/boards/freescale-mx53-loco/lowlevel.c
index 60c28f7..d920524 100644
--- a/arch/arm/boards/freescale-mx53-loco/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-loco/lowlevel.c
@@ -1,9 +1,19 @@
 #include <common.h>
 #include <mach/esdctl.h>
 #include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
 
-void __naked barebox_arm_reset_vector(void)
+extern char __dtb_imx53_qsb_start[];
+
+ENTRY_FUNCTION(start_imx53_loco)(void)
 {
+	uint32_t fdt;
+
+	__barebox_arm_head();
+
 	arm_cpu_lowlevel_init();
-	imx53_barebox_entry(0);
+
+	fdt = (uint32_t)__dtb_imx53_qsb_start - get_runtime_offset();
+
+	imx53_barebox_entry(fdt);
 }
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b271618..19a1985 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-dmo-realq7.dtb \
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME))
 obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 
+pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o
+
 .SECONDARY: $(obj)/$(BUILTIN_DTB).dtb.S
 
 targets += dtbs
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 4f9ef3e..6560798 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -476,7 +476,7 @@ choice
 
 config MACH_FREESCALE_MX53_LOCO
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
-	select ARCH_IMX_INTERNAL_BOOT_USE_IMXIMAGE
+	select HAVE_PBL_MULTI_IMAGES
 	bool "Freescale i.MX53 LOCO"
 
 config MACH_FREESCALE_MX53_SMD
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 6334729..3a5b5f1 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -13,3 +13,10 @@ board = $(srctree)/arch/$(ARCH)/boards
 pblx-$(CONFIG_MACH_PCM038) += start_imx27_pcm038
 FILE_barebox-phytec-phycore-imx27.img = start_imx27_pcm038.pblx
 image-$(CONFIG_MACH_PCM038) += barebox-phytec-phycore-imx27.img
+
+# ----------------------- i.MX53 based boards ---------------------------
+pblx-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco
+CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-loco/flash-header.imxcfg
+imximage-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco.pblx.imximg
+FILE_barebox-freescale-imx53-loco.img = start_imx53_loco.pblx.imximg
+image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco.img
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-06-25  9:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  9:20 [PATCH] barebox " Sascha Hauer
2013-06-25  9:20 ` [PATCH 01/12] ARM: split barebox_arm_head in two separate functions Sascha Hauer
2013-06-25  9:20 ` [PATCH 02/12] ARM: pbl: move linker script to lib Sascha Hauer
2013-06-25  9:20 ` [PATCH 03/12] ARM: build dtbs unconditionally Sascha Hauer
2013-06-25  9:20 ` [PATCH 04/12] ARM: Add image end section Sascha Hauer
2013-06-25  9:20 ` [PATCH 05/12] imx-image: fix path to imx-image binary Sascha Hauer
2013-06-25  9:20 ` [PATCH 06/12] Add multi images support Sascha Hauer
2013-06-25  9:20 ` [PATCH 07/12] ARM: i.MX: Add multi images support Makefile Sascha Hauer
2013-06-25  9:20 ` [PATCH 08/12] ARM: i.MX27 pcm038: switch to multi image Sascha Hauer
2013-06-25  9:20 ` [PATCH 09/12] ARM: i.MX53 loco: Switch to imximage Sascha Hauer
2013-06-25  9:20 ` Sascha Hauer [this message]
2013-06-25  9:20 ` [PATCH 11/12] ARM: dmo realq7: switch to multi image support Sascha Hauer
2013-06-25  9:20 ` [PATCH 12/12] ARM: i.MX51 babbage: " Sascha Hauer
2013-06-25  9:26 ` [PATCH] barebox " Sascha Hauer
2013-06-26  5:27 ` Sascha Hauer
2013-06-26  5:27   ` [PATCH 1/2] ARM: Allow to pass a devicetree via boarddata Sascha Hauer
2013-06-26  5:27   ` [PATCH 2/2] ARM: dts: Add .S files as secondary target Sascha Hauer

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=1372152052-5463-11-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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