mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] pbl updates
@ 2012-08-10 20:00 Sascha Hauer
  2012-08-10 20:00 ` [PATCH 1/9] ARM eukrea cpuimx25: Move flash_header to seperate file Sascha Hauer
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:00 UTC (permalink / raw)
  To: barebox


Hi All,

The following makes the pbl support on most (all?) ARM boards. If it
doesn't work on your board, please report.

Sascha

The following changes since commit b859e325e928d19d5cfefa9a45c4ff1ebe502430:

  Merge tag 'pbl' of git://git.jcrosoft.org/barebox into for-next/pbl (2012-08-03 15:55:53 +0200)

are available in the git repository at:


  git://git.pengutronix.de/git/barebox.git work/pbl

for you to fetch changes up to 81aa36b58daa6517e01bb538db85126dc8dda8eb:

  ARM pbl: generate zbarebox.map in $(obj) (2012-08-10 21:49:37 +0200)

----------------------------------------------------------------
Sascha Hauer (9):
      ARM eukrea cpuimx25: Move flash_header to seperate file
      ARM s3c boards: Do not hardcode image sizes
      ARM boards: Make boards pbl safe
      ARM Makefile: Do not hardcode targets in MLO/netx/davinci/s5p
      ARM: fix netx/MLO/s5p image build for pbl
      ARM Makefile: generate a barebox-flash-image link
      ARM pbl: Fix zbarebox.S build
      ARM pbl: remove unnecessary FORCE
      ARM pbl: generate zbarebox.map in $(obj)

 arch/arm/Makefile                                 |   52 +++++++++++-------
 arch/arm/boards/a9m2410/Makefile                  |    1 +
 arch/arm/boards/a9m2410/a9m2410.c                 |    7 ---
 arch/arm/boards/a9m2440/Makefile                  |    1 +
 arch/arm/boards/a9m2440/a9m2440.c                 |    7 ---
 arch/arm/boards/ccxmx51/Makefile                  |    1 +
 arch/arm/boards/edb93xx/Makefile                  |    1 +
 arch/arm/boards/eukrea_cpuimx25/Makefile          |    3 +
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |   34 ------------
 arch/arm/boards/eukrea_cpuimx25/flash_header.c    |   61 +++++++++++++++++++++
 arch/arm/boards/eukrea_cpuimx27/Makefile          |    1 +
 arch/arm/boards/eukrea_cpuimx35/Makefile          |    2 +
 arch/arm/boards/eukrea_cpuimx51/Makefile          |    1 +
 arch/arm/boards/freescale-mx25-3-stack/Makefile   |    1 +
 arch/arm/boards/freescale-mx35-3-stack/Makefile   |    2 +
 arch/arm/boards/freescale-mx51-pdk/Makefile       |    1 +
 arch/arm/boards/freescale-mx53-loco/Makefile      |    1 +
 arch/arm/boards/freescale-mx53-smd/Makefile       |    1 +
 arch/arm/boards/freescale-mx6-arm2/Makefile       |    1 +
 arch/arm/boards/freescale-mx6-sabrelite/Makefile  |    1 +
 arch/arm/boards/friendlyarm-mini2440/Makefile     |    1 +
 arch/arm/boards/friendlyarm-mini2440/mini2440.c   |    7 ---
 arch/arm/boards/guf-cupid/Makefile                |    1 +
 arch/arm/boards/guf-neso/Makefile                 |    3 +-
 arch/arm/boards/imx21ads/Makefile                 |    1 +
 arch/arm/boards/imx27ads/Makefile                 |    1 +
 arch/arm/boards/karo-tx25/Makefile                |    1 +
 arch/arm/boards/karo-tx51/Makefile                |    3 +-
 arch/arm/boards/netx/Makefile                     |    2 +-
 arch/arm/boards/panda/Makefile                    |    4 +-
 arch/arm/boards/pcm027/Makefile                   |    1 +
 arch/arm/boards/pcm037/Makefile                   |    1 +
 arch/arm/boards/pcm038/Makefile                   |    1 +
 arch/arm/boards/pcm043/Makefile                   |    1 +
 arch/arm/boards/pcm049/Makefile                   |    1 +
 arch/arm/boards/phycard-a-xl2/Makefile            |    1 +
 arch/arm/boards/phycard-i.MX27/Makefile           |    1 +
 arch/arm/boards/scb9328/Makefile                  |    1 +
 arch/arm/boards/tqma53/Makefile                   |    1 +
 arch/arm/mach-ep93xx/Makefile                     |    1 +
 arch/arm/mach-imx/Makefile                        |    1 +
 arch/arm/mach-omap/Makefile                       |    3 +
 arch/arm/mach-samsung/Makefile                    |    2 +
 arch/arm/pbl/Makefile                             |    7 ++-
 drivers/mtd/nand/Makefile                         |    1 +
 drivers/mtd/nand/nand_s3c24xx.c                   |   10 ++++
 46 files changed, 156 insertions(+), 82 deletions(-)
 create mode 100644 arch/arm/boards/eukrea_cpuimx25/flash_header.c

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

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

* [PATCH 1/9] ARM eukrea cpuimx25: Move flash_header to seperate file
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
@ 2012-08-10 20:00 ` Sascha Hauer
  2012-08-10 20:00 ` [PATCH 2/9] ARM s3c boards: Do not hardcode image sizes Sascha Hauer
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:00 UTC (permalink / raw)
  To: barebox

The flash header is needed for pbl support, so move it to
separate file to be able to add it to pbl-y

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/eukrea_cpuimx25/Makefile          |    1 +
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |   34 ------------
 arch/arm/boards/eukrea_cpuimx25/flash_header.c    |   61 +++++++++++++++++++++
 3 files changed, 62 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm/boards/eukrea_cpuimx25/flash_header.c

diff --git a/arch/arm/boards/eukrea_cpuimx25/Makefile b/arch/arm/boards/eukrea_cpuimx25/Makefile
index 406c6f3..edd09a6 100644
--- a/arch/arm/boards/eukrea_cpuimx25/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx25/Makefile
@@ -22,3 +22,4 @@
 
 obj-y += lowlevel.o
 obj-y += eukrea_cpuimx25.o
+obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT) += flash_header.o
diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 0aac13c..a84288c 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -50,40 +50,6 @@
 #include <mach/devices-imx25.h>
 #include <asm/barebox-arm-head.h>
 
-void __naked __flash_header_start go(void)
-{
-	barebox_arm_head();
-}
-
-struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
-	{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000004, },
-	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x92100000, },
-	{ .ptr_type = 1, .addr = 0x80000400, .val = 0x12344321, },
-	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xa2100000, },
-	{ .ptr_type = 4, .addr = 0x80000000, .val = 0x12344321, },
-	{ .ptr_type = 4, .addr = 0x80000000, .val = 0x12344321, },
-	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xb2100000, },
-	{ .ptr_type = 1, .addr = 0x80000033, .val = 0xda, },
-	{ .ptr_type = 1, .addr = 0x81000000, .val = 0xff, },
-	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x82216080, },
-	{ .ptr_type = 4, .addr = 0xb8001004, .val = 0x00295729, },
-	{ .ptr_type = 4, .addr = 0x53f80008, .val = 0x20034000, },
-};
-
-struct imx_flash_header __flash_header_section flash_header = {
-	.app_code_jump_vector	= DEST_BASE + 0x1000,
-	.app_code_barker	= APP_CODE_BARKER,
-	.app_code_csf		= 0,
-	.dcd_ptr_ptr		= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd),
-	.super_root_key		= 0,
-	.dcd			= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd_barker),
-	.app_dest		= DEST_BASE,
-	.dcd_barker		= DCD_BARKER,
-	.dcd_block_len		= sizeof(dcd_entry),
-};
-
-unsigned long __image_len_section barebox_len = DCD_BAREBOX_SIZE;
-
 static struct fec_platform_data fec_info = {
 	.xcv_type	= RMII,
 	.phy_addr	= 0,
diff --git a/arch/arm/boards/eukrea_cpuimx25/flash_header.c b/arch/arm/boards/eukrea_cpuimx25/flash_header.c
new file mode 100644
index 0000000..344c7ff
--- /dev/null
+++ b/arch/arm/boards/eukrea_cpuimx25/flash_header.c
@@ -0,0 +1,61 @@
+/*
+ * (C) 2009 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
+ * (c) 2010 Eukrea Electromatique, Eric Bénard <eric@eukrea.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+#include <common.h>
+#include <mach/imx-flash-header.h>
+#include <mach/imx-regs.h>
+#include <asm/barebox-arm-head.h>
+
+void __naked __flash_header_start go(void)
+{
+	barebox_arm_head();
+}
+
+struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
+	{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000004, },
+	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x92100000, },
+	{ .ptr_type = 1, .addr = 0x80000400, .val = 0x12344321, },
+	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xa2100000, },
+	{ .ptr_type = 4, .addr = 0x80000000, .val = 0x12344321, },
+	{ .ptr_type = 4, .addr = 0x80000000, .val = 0x12344321, },
+	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0xb2100000, },
+	{ .ptr_type = 1, .addr = 0x80000033, .val = 0xda, },
+	{ .ptr_type = 1, .addr = 0x81000000, .val = 0xff, },
+	{ .ptr_type = 4, .addr = 0xb8001000, .val = 0x82216080, },
+	{ .ptr_type = 4, .addr = 0xb8001004, .val = 0x00295729, },
+	{ .ptr_type = 4, .addr = 0x53f80008, .val = 0x20034000, },
+};
+
+struct imx_flash_header __flash_header_section flash_header = {
+	.app_code_jump_vector	= DEST_BASE + 0x1000,
+	.app_code_barker	= APP_CODE_BARKER,
+	.app_code_csf		= 0,
+	.dcd_ptr_ptr		= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd),
+	.super_root_key		= 0,
+	.dcd			= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd_barker),
+	.app_dest		= DEST_BASE,
+	.dcd_barker		= DCD_BARKER,
+	.dcd_block_len		= sizeof(dcd_entry),
+};
+
+unsigned long __image_len_section barebox_len = DCD_BAREBOX_SIZE;
-- 
1.7.10.4


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

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

* [PATCH 2/9] ARM s3c boards: Do not hardcode image sizes
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
  2012-08-10 20:00 ` [PATCH 1/9] ARM eukrea cpuimx25: Move flash_header to seperate file Sascha Hauer
@ 2012-08-10 20:00 ` Sascha Hauer
  2012-08-10 20:00 ` [PATCH 3/9] ARM boards: Make boards pbl safe Sascha Hauer
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:00 UTC (permalink / raw)
  To: barebox; +Cc: Juergen Beisert

The existing nand_boot functions all do the same, so move it to
a common place. To be flexible enough for future boards the real
image size is used instead of hardcoded 256k.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Juergen Beisert <jbe@pengutronix.de>
---
 arch/arm/boards/a9m2410/a9m2410.c               |    7 -------
 arch/arm/boards/a9m2440/a9m2440.c               |    7 -------
 arch/arm/boards/friendlyarm-mini2440/mini2440.c |    7 -------
 drivers/mtd/nand/nand_s3c24xx.c                 |   10 ++++++++++
 4 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/arch/arm/boards/a9m2410/a9m2410.c b/arch/arm/boards/a9m2410/a9m2410.c
index fb3f1ba..8d97282 100644
--- a/arch/arm/boards/a9m2410/a9m2410.c
+++ b/arch/arm/boards/a9m2410/a9m2410.c
@@ -137,13 +137,6 @@ static int a9m2410_devices_init(void)
 
 device_initcall(a9m2410_devices_init);
 
-#ifdef CONFIG_S3C_NAND_BOOT
-void __bare_init nand_boot(void)
-{
-	s3c24x0_nand_load_image(_text, 256 * 1024, 0);
-}
-#endif
-
 static int a9m2410_console_init(void)
 {
 	s3c24xx_add_uart1();
diff --git a/arch/arm/boards/a9m2440/a9m2440.c b/arch/arm/boards/a9m2440/a9m2440.c
index 6beb72e..ac1c7a4 100644
--- a/arch/arm/boards/a9m2440/a9m2440.c
+++ b/arch/arm/boards/a9m2440/a9m2440.c
@@ -156,13 +156,6 @@ static int a9m2440_devices_init(void)
 
 device_initcall(a9m2440_devices_init);
 
-#ifdef CONFIG_S3C_NAND_BOOT
-void __bare_init nand_boot(void)
-{
-	s3c24x0_nand_load_image(_text, 256 * 1024, 0);
-}
-#endif
-
 static int a9m2440_console_init(void)
 {
 	s3c24xx_add_uart1();
diff --git a/arch/arm/boards/friendlyarm-mini2440/mini2440.c b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
index a032fbc..251287e 100644
--- a/arch/arm/boards/friendlyarm-mini2440/mini2440.c
+++ b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
@@ -324,13 +324,6 @@ static int mini2440_devices_init(void)
 
 device_initcall(mini2440_devices_init);
 
-#ifdef CONFIG_S3C_NAND_BOOT
-void __bare_init nand_boot(void)
-{
-	s3c24x0_nand_load_image(_text, 256 * 1024, 0);
-}
-#endif
-
 static int mini2440_console_init(void)
 {
 	/*
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c
index c629701..3d5732e 100644
--- a/drivers/mtd/nand/nand_s3c24xx.c
+++ b/drivers/mtd/nand/nand_s3c24xx.c
@@ -603,6 +603,16 @@ void __nand_boot_init s3c24x0_nand_load_image(void *dest, int size, int page)
 	disable_nand_controller(host);
 }
 
+#include <asm-generic/sections.h>
+
+void __nand_boot_init nand_boot(void)
+{
+	void *dest = _text;
+	int size = barebox_image_size;
+	int page = 0;
+
+	s3c24x0_nand_load_image(dest, size, page);
+}
 #ifdef CONFIG_NAND_S3C_BOOT_DEBUG
 #include <command.h>
 
-- 
1.7.10.4


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

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

* [PATCH 3/9] ARM boards: Make boards pbl safe
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
  2012-08-10 20:00 ` [PATCH 1/9] ARM eukrea cpuimx25: Move flash_header to seperate file Sascha Hauer
  2012-08-10 20:00 ` [PATCH 2/9] ARM s3c boards: Do not hardcode image sizes Sascha Hauer
@ 2012-08-10 20:00 ` Sascha Hauer
  2012-08-10 20:01 ` [PATCH 4/9] ARM Makefile: Do not hardcode targets in MLO/netx/davinci/s5p Sascha Hauer
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:00 UTC (permalink / raw)
  To: barebox

With pbl support enabled most boards need a pbl-y for their lowlevel
stuff.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/a9m2410/Makefile                 |    1 +
 arch/arm/boards/a9m2440/Makefile                 |    1 +
 arch/arm/boards/ccxmx51/Makefile                 |    1 +
 arch/arm/boards/edb93xx/Makefile                 |    1 +
 arch/arm/boards/eukrea_cpuimx25/Makefile         |    2 ++
 arch/arm/boards/eukrea_cpuimx27/Makefile         |    1 +
 arch/arm/boards/eukrea_cpuimx35/Makefile         |    2 ++
 arch/arm/boards/eukrea_cpuimx51/Makefile         |    1 +
 arch/arm/boards/freescale-mx25-3-stack/Makefile  |    1 +
 arch/arm/boards/freescale-mx35-3-stack/Makefile  |    2 ++
 arch/arm/boards/freescale-mx51-pdk/Makefile      |    1 +
 arch/arm/boards/freescale-mx53-loco/Makefile     |    1 +
 arch/arm/boards/freescale-mx53-smd/Makefile      |    1 +
 arch/arm/boards/freescale-mx6-arm2/Makefile      |    1 +
 arch/arm/boards/freescale-mx6-sabrelite/Makefile |    1 +
 arch/arm/boards/friendlyarm-mini2440/Makefile    |    1 +
 arch/arm/boards/guf-cupid/Makefile               |    1 +
 arch/arm/boards/guf-neso/Makefile                |    3 +--
 arch/arm/boards/imx21ads/Makefile                |    1 +
 arch/arm/boards/imx27ads/Makefile                |    1 +
 arch/arm/boards/karo-tx25/Makefile               |    1 +
 arch/arm/boards/karo-tx51/Makefile               |    3 ++-
 arch/arm/boards/netx/Makefile                    |    2 +-
 arch/arm/boards/panda/Makefile                   |    4 +++-
 arch/arm/boards/pcm027/Makefile                  |    1 +
 arch/arm/boards/pcm037/Makefile                  |    1 +
 arch/arm/boards/pcm038/Makefile                  |    1 +
 arch/arm/boards/pcm043/Makefile                  |    1 +
 arch/arm/boards/pcm049/Makefile                  |    1 +
 arch/arm/boards/phycard-a-xl2/Makefile           |    1 +
 arch/arm/boards/phycard-i.MX27/Makefile          |    1 +
 arch/arm/boards/scb9328/Makefile                 |    1 +
 arch/arm/boards/tqma53/Makefile                  |    1 +
 arch/arm/mach-ep93xx/Makefile                    |    1 +
 arch/arm/mach-imx/Makefile                       |    1 +
 arch/arm/mach-omap/Makefile                      |    3 +++
 arch/arm/mach-samsung/Makefile                   |    2 ++
 drivers/mtd/nand/Makefile                        |    1 +
 38 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boards/a9m2410/Makefile b/arch/arm/boards/a9m2410/Makefile
index 63026f0..6842c84 100644
--- a/arch/arm/boards/a9m2410/Makefile
+++ b/arch/arm/boards/a9m2410/Makefile
@@ -1,3 +1,4 @@
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += a9m2410.o
diff --git a/arch/arm/boards/a9m2440/Makefile b/arch/arm/boards/a9m2440/Makefile
index 779e83d..8a8f36d 100644
--- a/arch/arm/boards/a9m2440/Makefile
+++ b/arch/arm/boards/a9m2440/Makefile
@@ -1,4 +1,5 @@
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += a9m2440.o
 obj-$(CONFIG_MACH_A9M2410DEV) += a9m2410dev.o
diff --git a/arch/arm/boards/ccxmx51/Makefile b/arch/arm/boards/ccxmx51/Makefile
index 249927e..f9eb2db 100644
--- a/arch/arm/boards/ccxmx51/Makefile
+++ b/arch/arm/boards/ccxmx51/Makefile
@@ -1,2 +1,3 @@
 obj-y					+= flash_header.o ccxmx51.o
+pbl-y					+= flash_header.o
 obj-$(CONFIG_MACH_CCMX51_BASEBOARD)	+= ccxmx51js.o
diff --git a/arch/arm/boards/edb93xx/Makefile b/arch/arm/boards/edb93xx/Makefile
index e19cd7b..945c963 100644
--- a/arch/arm/boards/edb93xx/Makefile
+++ b/arch/arm/boards/edb93xx/Makefile
@@ -1,2 +1,3 @@
 
 obj-y += edb93xx.o flash_cfg.o pll_cfg.o sdram_cfg.o
+pbl-y += edb93xx.o flash_cfg.o pll_cfg.o sdram_cfg.o
diff --git a/arch/arm/boards/eukrea_cpuimx25/Makefile b/arch/arm/boards/eukrea_cpuimx25/Makefile
index edd09a6..cc01cf9 100644
--- a/arch/arm/boards/eukrea_cpuimx25/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx25/Makefile
@@ -21,5 +21,7 @@
 #
 
 obj-y += lowlevel.o
+pbl-y += lowlevel.o
 obj-y += eukrea_cpuimx25.o
 obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT) += flash_header.o
+pbl-$(CONFIG_ARCH_IMX_INTERNAL_BOOT) += flash_header.o
diff --git a/arch/arm/boards/eukrea_cpuimx27/Makefile b/arch/arm/boards/eukrea_cpuimx27/Makefile
index 5d958fa..fe6d376 100644
--- a/arch/arm/boards/eukrea_cpuimx27/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx27/Makefile
@@ -1,3 +1,4 @@
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += eukrea_cpuimx27.o
diff --git a/arch/arm/boards/eukrea_cpuimx35/Makefile b/arch/arm/boards/eukrea_cpuimx35/Makefile
index 32ffe42..234c1ba 100644
--- a/arch/arm/boards/eukrea_cpuimx35/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx35/Makefile
@@ -21,5 +21,7 @@
 #
 
 obj-y					+= lowlevel.o
+pbl-y					+= lowlevel.o
 obj-y					+= eukrea_cpuimx35.o
 obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT)	+= flash_header.o
+pbl-$(CONFIG_ARCH_IMX_INTERNAL_BOOT)	+= flash_header.o
diff --git a/arch/arm/boards/eukrea_cpuimx51/Makefile b/arch/arm/boards/eukrea_cpuimx51/Makefile
index 0f781c0..ce81ffa 100644
--- a/arch/arm/boards/eukrea_cpuimx51/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx51/Makefile
@@ -1,2 +1,3 @@
 obj-y += eukrea_cpuimx51.o
 obj-y += flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/boards/freescale-mx25-3-stack/Makefile b/arch/arm/boards/freescale-mx25-3-stack/Makefile
index ab853e0..ff70e1b 100644
--- a/arch/arm/boards/freescale-mx25-3-stack/Makefile
+++ b/arch/arm/boards/freescale-mx25-3-stack/Makefile
@@ -21,4 +21,5 @@
 #
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += 3stack.o
diff --git a/arch/arm/boards/freescale-mx35-3-stack/Makefile b/arch/arm/boards/freescale-mx35-3-stack/Makefile
index a8ea4a3..3f224f6 100644
--- a/arch/arm/boards/freescale-mx35-3-stack/Makefile
+++ b/arch/arm/boards/freescale-mx35-3-stack/Makefile
@@ -1,4 +1,6 @@
 
 obj-y					+= lowlevel_init.o
+pbl-y					+= lowlevel_init.o
 obj-y					+= 3stack.o
 obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT)	+= flash_header.o
+pbl-$(CONFIG_ARCH_IMX_INTERNAL_BOOT)	+= flash_header.o
diff --git a/arch/arm/boards/freescale-mx51-pdk/Makefile b/arch/arm/boards/freescale-mx51-pdk/Makefile
index b56ce7f..d08bb68 100644
--- a/arch/arm/boards/freescale-mx51-pdk/Makefile
+++ b/arch/arm/boards/freescale-mx51-pdk/Makefile
@@ -1,2 +1,3 @@
 obj-y += board.o
 obj-y += flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/boards/freescale-mx53-loco/Makefile b/arch/arm/boards/freescale-mx53-loco/Makefile
index b56ce7f..d08bb68 100644
--- a/arch/arm/boards/freescale-mx53-loco/Makefile
+++ b/arch/arm/boards/freescale-mx53-loco/Makefile
@@ -1,2 +1,3 @@
 obj-y += board.o
 obj-y += flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/boards/freescale-mx53-smd/Makefile b/arch/arm/boards/freescale-mx53-smd/Makefile
index b56ce7f..d08bb68 100644
--- a/arch/arm/boards/freescale-mx53-smd/Makefile
+++ b/arch/arm/boards/freescale-mx53-smd/Makefile
@@ -1,2 +1,3 @@
 obj-y += board.o
 obj-y += flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/boards/freescale-mx6-arm2/Makefile b/arch/arm/boards/freescale-mx6-arm2/Makefile
index ad2e1be..11199d2 100644
--- a/arch/arm/boards/freescale-mx6-arm2/Makefile
+++ b/arch/arm/boards/freescale-mx6-arm2/Makefile
@@ -1 +1,2 @@
 obj-y += board.o flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/Makefile b/arch/arm/boards/freescale-mx6-sabrelite/Makefile
index ad2e1be..11199d2 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/Makefile
+++ b/arch/arm/boards/freescale-mx6-sabrelite/Makefile
@@ -1 +1,2 @@
 obj-y += board.o flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/boards/friendlyarm-mini2440/Makefile b/arch/arm/boards/friendlyarm-mini2440/Makefile
index 856fed0..f56e803 100644
--- a/arch/arm/boards/friendlyarm-mini2440/Makefile
+++ b/arch/arm/boards/friendlyarm-mini2440/Makefile
@@ -1,2 +1,3 @@
 
 obj-y += mini2440.o lowlevel_init.o
+pbl-y += lowlevel_init.o
diff --git a/arch/arm/boards/guf-cupid/Makefile b/arch/arm/boards/guf-cupid/Makefile
index 3a06cf4..69208aa 100644
--- a/arch/arm/boards/guf-cupid/Makefile
+++ b/arch/arm/boards/guf-cupid/Makefile
@@ -21,4 +21,5 @@
 #
 
 obj-y += lowlevel.o
+pbl-y += lowlevel.o
 obj-y += board.o
diff --git a/arch/arm/boards/guf-neso/Makefile b/arch/arm/boards/guf-neso/Makefile
index 2b6eb02..89f0aba 100644
--- a/arch/arm/boards/guf-neso/Makefile
+++ b/arch/arm/boards/guf-neso/Makefile
@@ -1,5 +1,4 @@
-
 obj-y += lowlevel.o
+pbl-y += lowlevel.o
 obj-y += board.o
 obj-y += pll_init.o
-
diff --git a/arch/arm/boards/imx21ads/Makefile b/arch/arm/boards/imx21ads/Makefile
index 7993fde..e18f7d9 100644
--- a/arch/arm/boards/imx21ads/Makefile
+++ b/arch/arm/boards/imx21ads/Makefile
@@ -1,2 +1,3 @@
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += imx21ads.o
diff --git a/arch/arm/boards/imx27ads/Makefile b/arch/arm/boards/imx27ads/Makefile
index bdc905f..88d1baf 100644
--- a/arch/arm/boards/imx27ads/Makefile
+++ b/arch/arm/boards/imx27ads/Makefile
@@ -1,3 +1,4 @@
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += imx27ads.o
diff --git a/arch/arm/boards/karo-tx25/Makefile b/arch/arm/boards/karo-tx25/Makefile
index e909a2c..90f244b 100644
--- a/arch/arm/boards/karo-tx25/Makefile
+++ b/arch/arm/boards/karo-tx25/Makefile
@@ -21,4 +21,5 @@
 #
 
 obj-y += lowlevel.o
+pbl-y += lowlevel.o
 obj-y += board.o
diff --git a/arch/arm/boards/karo-tx51/Makefile b/arch/arm/boards/karo-tx51/Makefile
index e8f710e..6f51586 100644
--- a/arch/arm/boards/karo-tx51/Makefile
+++ b/arch/arm/boards/karo-tx51/Makefile
@@ -1,2 +1,3 @@
 obj-y += tx51.o
-obj-y += flash_header.o
+obj-$(CONFIG_ARCH_IMX_INTERNAL_BOOT) += flash_header.o
+pbl-$(CONFIG_ARCH_IMX_INTERNAL_BOOT) += flash_header.o
diff --git a/arch/arm/boards/netx/Makefile b/arch/arm/boards/netx/Makefile
index 8b33fec..ad694cd 100644
--- a/arch/arm/boards/netx/Makefile
+++ b/arch/arm/boards/netx/Makefile
@@ -1,2 +1,2 @@
 obj-y += netx.o platform.o
-
+pbl-y += platform.o
diff --git a/arch/arm/boards/panda/Makefile b/arch/arm/boards/panda/Makefile
index c55e26e..53b9d5b 100644
--- a/arch/arm/boards/panda/Makefile
+++ b/arch/arm/boards/panda/Makefile
@@ -1 +1,3 @@
-obj-y += board.o lowlevel.o mux.o
+obj-y += board.o
+obj-y += lowlevel.o mux.o
+pbl-y += lowlevel.o mux.o
diff --git a/arch/arm/boards/pcm027/Makefile b/arch/arm/boards/pcm027/Makefile
index e3830e4..1602c0a 100644
--- a/arch/arm/boards/pcm027/Makefile
+++ b/arch/arm/boards/pcm027/Makefile
@@ -1,2 +1,3 @@
 obj-y += board.o
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
diff --git a/arch/arm/boards/pcm037/Makefile b/arch/arm/boards/pcm037/Makefile
index 7d36b77..dfe180c 100644
--- a/arch/arm/boards/pcm037/Makefile
+++ b/arch/arm/boards/pcm037/Makefile
@@ -21,4 +21,5 @@
 #
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += pcm037.o
diff --git a/arch/arm/boards/pcm038/Makefile b/arch/arm/boards/pcm038/Makefile
index 6cd3a5b..2c1b74d 100644
--- a/arch/arm/boards/pcm038/Makefile
+++ b/arch/arm/boards/pcm038/Makefile
@@ -1,2 +1,3 @@
 obj-y					+= lowlevel.o pcm038.o
+pbl-y					+= lowlevel.o
 obj-$(CONFIG_MACH_PCM970_BASEBOARD)	+= pcm970.o
diff --git a/arch/arm/boards/pcm043/Makefile b/arch/arm/boards/pcm043/Makefile
index 6753bbe..961ffcc 100644
--- a/arch/arm/boards/pcm043/Makefile
+++ b/arch/arm/boards/pcm043/Makefile
@@ -21,4 +21,5 @@
 #
 
 obj-y += lowlevel.o
+pbl-y += lowlevel.o
 obj-y += pcm043.o
diff --git a/arch/arm/boards/pcm049/Makefile b/arch/arm/boards/pcm049/Makefile
index 1bb7212..df3764c 100644
--- a/arch/arm/boards/pcm049/Makefile
+++ b/arch/arm/boards/pcm049/Makefile
@@ -1 +1,2 @@
 obj-y += board.o mux.o lowlevel.o
+pbl-y += lowlevel.o mux.o
diff --git a/arch/arm/boards/phycard-a-xl2/Makefile b/arch/arm/boards/phycard-a-xl2/Makefile
index 1d23d72..23958c2 100644
--- a/arch/arm/boards/phycard-a-xl2/Makefile
+++ b/arch/arm/boards/phycard-a-xl2/Makefile
@@ -18,3 +18,4 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 obj-y += pca-a-xl2.o mux.o lowlevel.o
+pbl-y += mux.o lowlevel.o
diff --git a/arch/arm/boards/phycard-i.MX27/Makefile b/arch/arm/boards/phycard-i.MX27/Makefile
index fd52350..60253e5 100644
--- a/arch/arm/boards/phycard-i.MX27/Makefile
+++ b/arch/arm/boards/phycard-i.MX27/Makefile
@@ -1,3 +1,4 @@
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += pca100.o
diff --git a/arch/arm/boards/scb9328/Makefile b/arch/arm/boards/scb9328/Makefile
index db6fd7e..69d3970 100644
--- a/arch/arm/boards/scb9328/Makefile
+++ b/arch/arm/boards/scb9328/Makefile
@@ -1,3 +1,4 @@
 
 obj-y += lowlevel_init.o
+pbl-y += lowlevel_init.o
 obj-y += scb9328.o
diff --git a/arch/arm/boards/tqma53/Makefile b/arch/arm/boards/tqma53/Makefile
index b56ce7f..d08bb68 100644
--- a/arch/arm/boards/tqma53/Makefile
+++ b/arch/arm/boards/tqma53/Makefile
@@ -1,2 +1,3 @@
 obj-y += board.o
 obj-y += flash_header.o
+pbl-y += flash_header.o
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index d401164..5615394 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -1,3 +1,4 @@
 obj-y += clocksource.o gpio.o led.o header.o
 
 obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel_init.o
+pbl-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel_init.o led.o
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 2ff537a..82a86d7 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_IMX_CLKO)	+= clko.o
 obj-$(CONFIG_IMX_IIM)	+= iim.o
 obj-$(CONFIG_NAND_IMX) += nand.o
 obj-$(CONFIG_ARCH_IMX_EXTERNAL_BOOT_NAND) += external-nand-boot.o
+pbl-$(CONFIG_ARCH_IMX_EXTERNAL_BOOT_NAND) += external-nand-boot.o
 obj-y += speed.o
 obj-y += devices.o
 obj-y += boot.o
diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
index 87078ae..f087f4b 100644
--- a/arch/arm/mach-omap/Makefile
+++ b/arch/arm/mach-omap/Makefile
@@ -20,9 +20,12 @@
 # MA 02111-1307 USA
 #
 obj-$(CONFIG_ARCH_OMAP) += syslib.o
+pbl-$(CONFIG_ARCH_OMAP) += syslib.o
 obj-$(CONFIG_OMAP_CLOCK_SOURCE_S32K) += s32k_clksource.o
 obj-$(CONFIG_ARCH_OMAP3) += omap3_core.o omap3_generic.o auxcr.o
+pbl-$(CONFIG_ARCH_OMAP3) += omap3_core.o omap3_generic.o auxcr.o
 obj-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o
+pbl-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o
 obj-$(CONFIG_OMAP3_CLOCK_CONFIG) += omap3_clock.o
 obj-$(CONFIG_OMAP_GPMC) += gpmc.o devices-gpmc-nand.o
 obj-$(CONFIG_SHELL_NONE) += xload.o
diff --git a/arch/arm/mach-samsung/Makefile b/arch/arm/mach-samsung/Makefile
index 39aa269..0ffe370 100644
--- a/arch/arm/mach-samsung/Makefile
+++ b/arch/arm/mach-samsung/Makefile
@@ -2,6 +2,8 @@ obj-y += s3c-timer.o generic.o
 obj-$(CONFIG_RESET_SOURCE) += reset_source.o
 obj-lowlevel-$(CONFIG_ARCH_S3C24xx) += lowlevel-s3c24x0.o
 obj-lowlevel-$(CONFIG_ARCH_S5PCxx) += lowlevel-s5pcxx.o
+pbl-$(CONFIG_ARCH_S3C24xx) += lowlevel-s3c24x0.o
+pbl-$(CONFIG_ARCH_S5PCxx) += lowlevel-s5pcxx.o
 obj-$(CONFIG_ARCH_S3C24xx) += gpio-s3c24x0.o clocks-s3c24xx.o mem-s3c24x0.o
 obj-$(CONFIG_ARCH_S3C64xx) += gpio-s3c64xx.o clocks-s3c64xx.o mem-s3c64xx.o
 obj-$(CONFIG_ARCH_S5PCxx) += gpio-s5pcxx.o clocks-s5pcxx.o mem-s5pcxx.o
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 8c08c9f..d52c272 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -14,4 +14,5 @@ obj-$(CONFIG_NAND_IMX)			+= nand_imx.o
 obj-$(CONFIG_NAND_OMAP_GPMC)		+= nand_omap_gpmc.o nand_omap_bch_decoder.o
 obj-$(CONFIG_NAND_ATMEL)		+= atmel_nand.o
 obj-$(CONFIG_NAND_S3C24XX)		+= nand_s3c24xx.o
+pbl-$(CONFIG_NAND_S3C24XX)		+= nand_s3c24xx.o
 obj-$(CONFIG_NAND_MXS)			+= nand_mxs.o
-- 
1.7.10.4


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

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

* [PATCH 4/9] ARM Makefile: Do not hardcode targets in MLO/netx/davinci/s5p
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
                   ` (2 preceding siblings ...)
  2012-08-10 20:00 ` [PATCH 3/9] ARM boards: Make boards pbl safe Sascha Hauer
@ 2012-08-10 20:01 ` Sascha Hauer
  2012-08-10 20:01 ` [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl Sascha Hauer
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:01 UTC (permalink / raw)
  To: barebox

use $< rather than barebox.bin directly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Makefile |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index be4ef30..89f645b 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -161,7 +161,7 @@ LDFLAGS_barebox += -static --gc-sections
 endif
 
 barebox.netx: barebox.bin
-	$(Q)scripts/gen_netx_image -i barebox.bin -o barebox.netx		\
+	$(Q)scripts/gen_netx_image -i $< -o barebox.netx		\
 		--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL)			\
 		--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL)		\
 		--memctrl=$(CONFIG_NETX_MEM_CTRL)			\
@@ -173,7 +173,7 @@ KBUILD_IMAGE := barebox.netx
 endif
 
 barebox.s5p: barebox.bin
-	$(Q)scripts/s5p_cksum barebox.bin barebox.s5p
+	$(Q)scripts/s5p_cksum $< barebox.s5p
 
 ifeq ($(CONFIG_ARCH_S5PCxx),y)
 KBUILD_IMAGE := barebox.s5p
@@ -181,8 +181,8 @@ endif
 
 MLO: barebox.bin
 	@echo "  IFT    " $@
-	$(Q)scripts/omap_signGP barebox.bin $(TEXT_BASE) 1
-	$(Q)test -e barebox.bin.ift && mv barebox.bin.ift MLO
+	$(Q)scripts/omap_signGP $< $(TEXT_BASE) 1
+	$(Q)test -e $<.ift && mv $<.ift MLO
 
 ifeq ($(CONFIG_OMAP_BUILD_IFT),y)
 KBUILD_IMAGE := MLO
@@ -190,8 +190,8 @@ endif
 
 barebox.ubl: barebox.bin
 	@echo "  UBL    " $@
-	$(Q)scripts/mkublheader barebox.bin > barebox.ubl
-	$(Q)cat barebox.bin >> barebox.ubl
+	$(Q)scripts/mkublheader $< > barebox.ubl
+	$(Q)cat $< >> barebox.ubl
 
 ifeq ($(CONFIG_ARCH_DAVINCI),y)
 KBUILD_IMAGE := barebox.ubl
-- 
1.7.10.4


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

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

* [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
                   ` (3 preceding siblings ...)
  2012-08-10 20:01 ` [PATCH 4/9] ARM Makefile: Do not hardcode targets in MLO/netx/davinci/s5p Sascha Hauer
@ 2012-08-10 20:01 ` Sascha Hauer
  2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-10 20:01 ` [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link Sascha Hauer
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:01 UTC (permalink / raw)
  To: barebox

If pbl support is enabled only zbarebox.bin was built, but
not the SoC specific images. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Makefile |   35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 89f645b..63bc9be 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -160,7 +160,16 @@ CPPFLAGS += -fdata-sections -ffunction-sections
 LDFLAGS_barebox += -static --gc-sections
 endif
 
-barebox.netx: barebox.bin
+ifdef CONFIG_IMAGE_COMPRESSION
+KBUILD_BINARY := arch/arm/pbl/zbarebox.bin
+KBUILD_TARGET := zbarebox.bin
+$(KBUILD_BINARY): $(KBUILD_TARGET)
+else
+KBUILD_BINARY := barebox.bin
+KBUILD_TARGET := barebox.bin
+endif
+
+barebox.netx: $(KBUILD_BINARY)
 	$(Q)scripts/gen_netx_image -i $< -o barebox.netx		\
 		--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL)			\
 		--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL)		\
@@ -169,36 +178,36 @@ barebox.netx: barebox.bin
 		--cookie=$(CONFIG_NETX_COOKIE);
 
 ifeq ($(machine-y),netx)
-KBUILD_IMAGE := barebox.netx
+KBUILD_TARGET := barebox.netx
+KBUILD_BINARY := $(KBUILD_TARGET)
 endif
 
-barebox.s5p: barebox.bin
+barebox.s5p: $(KBUILD_BINARY)
 	$(Q)scripts/s5p_cksum $< barebox.s5p
 
 ifeq ($(CONFIG_ARCH_S5PCxx),y)
-KBUILD_IMAGE := barebox.s5p
+KBUILD_TARGET := barebox.s5p
+KBUILD_BINARY := $(KBUILD_TARGET)
 endif
 
-MLO: barebox.bin
+MLO: $(KBUILD_BINARY)
 	@echo "  IFT    " $@
 	$(Q)scripts/omap_signGP $< $(TEXT_BASE) 1
 	$(Q)test -e $<.ift && mv $<.ift MLO
 
 ifeq ($(CONFIG_OMAP_BUILD_IFT),y)
-KBUILD_IMAGE := MLO
+KBUILD_TARGET := MLO
+KBUILD_BINARY := $(KBUILD_TARGET)
 endif
 
-barebox.ubl: barebox.bin
+barebox.ubl: $(KBUILD_BINARY)
 	@echo "  UBL    " $@
 	$(Q)scripts/mkublheader $< > barebox.ubl
 	$(Q)cat $< >> barebox.ubl
 
 ifeq ($(CONFIG_ARCH_DAVINCI),y)
-KBUILD_IMAGE := barebox.ubl
-endif
-
-ifdef CONFIG_IMAGE_COMPRESSION
-KBUILD_IMAGE := zbarebox.bin
+KBUILD_TARGET := barebox.ubl
+KBUILD_BINARY := $(KBUILD_TARGET)
 endif
 
 pbl := arch/arm/pbl
@@ -208,7 +217,7 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
 archclean:
 	$(MAKE) $(clean)=$(pbl)
 
-all: $(KBUILD_IMAGE)
+all: $(KBUILD_BINARY)
 
 archprepare: maketools
 maketools:
-- 
1.7.10.4


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

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

* [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
                   ` (4 preceding siblings ...)
  2012-08-10 20:01 ` [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl Sascha Hauer
@ 2012-08-10 20:01 ` Sascha Hauer
  2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-10 20:01 ` [PATCH 7/9] ARM pbl: Fix zbarebox.S build Sascha Hauer
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:01 UTC (permalink / raw)
  To: barebox

Depending on the SoC a barebox.bin, barebox.netx, barebox.s5p, MLO image
is generated. With pbl support there now is an additional
arch/arm/pbl/zbarebox.bin image.

To help the user to determine which image should be flashed to his device,
generate a barebox-flash-image link.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Makefile |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 63bc9be..9d9247f 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -217,7 +217,10 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
 archclean:
 	$(MAKE) $(clean)=$(pbl)
 
-all: $(KBUILD_BINARY)
+barebox-flash-image: $(KBUILD_BINARY)
+	$(Q)ln -sf $(KBUILD_BINARY) barebox-flash-image
+
+all: barebox-flash-image
 
 archprepare: maketools
 maketools:
@@ -242,4 +245,4 @@ common-y += arch/arm/lib/ arch/arm/cpu/
 
 lds-y	:= arch/arm/lib/barebox.lds
 
-CLEAN_FILES += include/generated/mach-types.h arch/arm/lib/barebox.lds
+CLEAN_FILES += include/generated/mach-types.h arch/arm/lib/barebox.lds barebox-flash-image
-- 
1.7.10.4


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

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

* [PATCH 7/9] ARM pbl: Fix zbarebox.S build
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
                   ` (5 preceding siblings ...)
  2012-08-10 20:01 ` [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link Sascha Hauer
@ 2012-08-10 20:01 ` Sascha Hauer
  2012-08-11  9:38   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-10 20:01 ` [PATCH 8/9] ARM pbl: remove unnecessary FORCE Sascha Hauer
  2012-08-10 20:01 ` [PATCH 9/9] ARM pbl: generate zbarebox.map in $(obj) Sascha Hauer
  8 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:01 UTC (permalink / raw)
  To: barebox

zbarebox.S target did not work for pbl. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/pbl/Makefile |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index 143da8b..dc6ae7e 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -16,6 +16,9 @@ $(obj)/zbarebox.bin:	$(obj)/zbarebox FORCE
 	$(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
 	@echo '  Barebox: $@ is ready'
 
+quiet_cmd_disasm = DISASM  $@
+      cmd_disasm = $(OBJDUMP) -d $< > $@
+
 $(obj)/zbarebox.S: $(obj)/zbarebox FORCE
 	$(call if_changed,disasm)
 
-- 
1.7.10.4


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

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

* [PATCH 8/9] ARM pbl: remove unnecessary FORCE
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
                   ` (6 preceding siblings ...)
  2012-08-10 20:01 ` [PATCH 7/9] ARM pbl: Fix zbarebox.S build Sascha Hauer
@ 2012-08-10 20:01 ` Sascha Hauer
  2012-08-11  9:39   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-10 20:01 ` [PATCH 9/9] ARM pbl: generate zbarebox.map in $(obj) Sascha Hauer
  8 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:01 UTC (permalink / raw)
  To: barebox

With this FORCE the compressed image is rebuilt even if it is
unchanged, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/pbl/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index dc6ae7e..b1cdd85 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -37,7 +37,7 @@ quiet_cmd_zbarebox__ ?= LD      $@
 $(obj)/zbarebox: $(zbarebox-lds) $(zbarebox-common) FORCE
 	$(call if_changed,zbarebox__)
 
-$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin FORCE
+$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin
 	$(call if_changed,$(suffix_y))
 
 $(obj)/$(piggy_o): $(obj)/piggy.$(suffix_y) FORCE
-- 
1.7.10.4


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

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

* [PATCH 9/9] ARM pbl: generate zbarebox.map in $(obj)
  2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
                   ` (7 preceding siblings ...)
  2012-08-10 20:01 ` [PATCH 8/9] ARM pbl: remove unnecessary FORCE Sascha Hauer
@ 2012-08-10 20:01 ` Sascha Hauer
  8 siblings, 0 replies; 19+ messages in thread
From: Sascha Hauer @ 2012-08-10 20:01 UTC (permalink / raw)
  To: barebox

All other linker generated files are there, too, so it seems logical
to put the map file there aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/pbl/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index b1cdd85..2cf7ad4 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -23,7 +23,7 @@ $(obj)/zbarebox.S: $(obj)/zbarebox FORCE
 	$(call if_changed,disasm)
 
 PBL_CPPFLAGS		+= -fdata-sections -ffunction-sections
-LDFLAGS_zbarebox	:= -Map zbarebox.map
+LDFLAGS_zbarebox	:= -Map $(obj)/zbarebox.map
 LDFLAGS_zbarebox	+= -static --gc-sections
 zbarebox-common := $(barebox-pbl-common) $(obj)/$(piggy_o)
 zbarebox-lds := $(obj)/zbarebox.lds
-- 
1.7.10.4


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

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

* Re: [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl
  2012-08-10 20:01 ` [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl Sascha Hauer
@ 2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-12 12:09     ` Sascha Hauer
  0 siblings, 1 reply; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-11  9:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> If pbl support is enabled only zbarebox.bin was built, but
> not the SoC specific images. Fix this.
yeah it does the trick but I do not like the makefile target
we need to create cmd and use the $(call xxx,ifchanged) mecanism

Best Regards,
J.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/Makefile |   35 ++++++++++++++++++++++-------------
>  1 file changed, 22 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 89f645b..63bc9be 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -160,7 +160,16 @@ CPPFLAGS += -fdata-sections -ffunction-sections
>  LDFLAGS_barebox += -static --gc-sections
>  endif
>  
> -barebox.netx: barebox.bin
> +ifdef CONFIG_IMAGE_COMPRESSION
> +KBUILD_BINARY := arch/arm/pbl/zbarebox.bin
> +KBUILD_TARGET := zbarebox.bin
> +$(KBUILD_BINARY): $(KBUILD_TARGET)
> +else
> +KBUILD_BINARY := barebox.bin
> +KBUILD_TARGET := barebox.bin
> +endif
> +
> +barebox.netx: $(KBUILD_BINARY)
>  	$(Q)scripts/gen_netx_image -i $< -o barebox.netx		\
>  		--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL)			\
>  		--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL)		\
> @@ -169,36 +178,36 @@ barebox.netx: barebox.bin
>  		--cookie=$(CONFIG_NETX_COOKIE);
>  
>  ifeq ($(machine-y),netx)
> -KBUILD_IMAGE := barebox.netx
> +KBUILD_TARGET := barebox.netx
> +KBUILD_BINARY := $(KBUILD_TARGET)
>  endif
>  
> -barebox.s5p: barebox.bin
> +barebox.s5p: $(KBUILD_BINARY)
>  	$(Q)scripts/s5p_cksum $< barebox.s5p
>  
>  ifeq ($(CONFIG_ARCH_S5PCxx),y)
> -KBUILD_IMAGE := barebox.s5p
> +KBUILD_TARGET := barebox.s5p
> +KBUILD_BINARY := $(KBUILD_TARGET)
>  endif
>  
> -MLO: barebox.bin
> +MLO: $(KBUILD_BINARY)
>  	@echo "  IFT    " $@
>  	$(Q)scripts/omap_signGP $< $(TEXT_BASE) 1
>  	$(Q)test -e $<.ift && mv $<.ift MLO
>  
>  ifeq ($(CONFIG_OMAP_BUILD_IFT),y)
> -KBUILD_IMAGE := MLO
> +KBUILD_TARGET := MLO
> +KBUILD_BINARY := $(KBUILD_TARGET)
>  endif
>  
> -barebox.ubl: barebox.bin
> +barebox.ubl: $(KBUILD_BINARY)
>  	@echo "  UBL    " $@
>  	$(Q)scripts/mkublheader $< > barebox.ubl
>  	$(Q)cat $< >> barebox.ubl
>  
>  ifeq ($(CONFIG_ARCH_DAVINCI),y)
> -KBUILD_IMAGE := barebox.ubl
> -endif
> -
> -ifdef CONFIG_IMAGE_COMPRESSION
> -KBUILD_IMAGE := zbarebox.bin
> +KBUILD_TARGET := barebox.ubl
> +KBUILD_BINARY := $(KBUILD_TARGET)
>  endif
>  
>  pbl := arch/arm/pbl
> @@ -208,7 +217,7 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
>  archclean:
>  	$(MAKE) $(clean)=$(pbl)
>  
> -all: $(KBUILD_IMAGE)
> +all: $(KBUILD_BINARY)
>  
>  archprepare: maketools
>  maketools:
> -- 
> 1.7.10.4
> 

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

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

* Re: [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link
  2012-08-10 20:01 ` [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link Sascha Hauer
@ 2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-12 13:23     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-11  9:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> Depending on the SoC a barebox.bin, barebox.netx, barebox.s5p, MLO image
> is generated. With pbl support there now is an additional
> arch/arm/pbl/zbarebox.bin image.
> 
> To help the user to determine which image should be flashed to his device,
> generate a barebox-flash-image link.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/Makefile |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 63bc9be..9d9247f 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -217,7 +217,10 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
>  archclean:
>  	$(MAKE) $(clean)=$(pbl)
>  
> -all: $(KBUILD_BINARY)
> +barebox-flash-image: $(KBUILD_BINARY)
> +	$(Q)ln -sf $(KBUILD_BINARY) barebox-flash-image
please create a command

Best Regards,
J.

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

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

* Re: [PATCH 7/9] ARM pbl: Fix zbarebox.S build
  2012-08-10 20:01 ` [PATCH 7/9] ARM pbl: Fix zbarebox.S build Sascha Hauer
@ 2012-08-11  9:38   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-11  9:38 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> zbarebox.S target did not work for pbl. Fix this.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/pbl/Makefile |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
> index 143da8b..dc6ae7e 100644
> --- a/arch/arm/pbl/Makefile
> +++ b/arch/arm/pbl/Makefile
> @@ -16,6 +16,9 @@ $(obj)/zbarebox.bin:	$(obj)/zbarebox FORCE
>  	$(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE))
>  	@echo '  Barebox: $@ is ready'
>  
> +quiet_cmd_disasm = DISASM  $@
> +      cmd_disasm = $(OBJDUMP) -d $< > $@
I saw this too we need to move it to Makefile.lib
as it's not arm specific

Best Regards,
J.

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

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

* Re: [PATCH 8/9] ARM pbl: remove unnecessary FORCE
  2012-08-10 20:01 ` [PATCH 8/9] ARM pbl: remove unnecessary FORCE Sascha Hauer
@ 2012-08-11  9:39   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-12 12:36     ` Sascha Hauer
  0 siblings, 1 reply; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-11  9:39 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> With this FORCE the compressed image is rebuilt even if it is
> unchanged, so remove it.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/pbl/Makefile |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
> index dc6ae7e..b1cdd85 100644
> --- a/arch/arm/pbl/Makefile
> +++ b/arch/arm/pbl/Makefile
> @@ -37,7 +37,7 @@ quiet_cmd_zbarebox__ ?= LD      $@
>  $(obj)/zbarebox: $(zbarebox-lds) $(zbarebox-common) FORCE
>  	$(call if_changed,zbarebox__)
>  
> -$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin FORCE
> +$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin
>  	$(call if_changed,$(suffix_y))
no sure about this one

IIRC we need it I saw issue without it

Best Regards,
J.

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

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

* Re: [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl
  2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-12 12:09     ` Sascha Hauer
  2012-08-12 13:21       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-08-12 12:09 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Sat, Aug 11, 2012 at 11:37:02AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> > If pbl support is enabled only zbarebox.bin was built, but
> > not the SoC specific images. Fix this.
> yeah it does the trick but I do not like the makefile target
> we need to create cmd and use the $(call xxx,ifchanged) mecanism

Can do, but this would be subject to another patch. This patch only changes
the dependencies, but not what is done.

Sascha

> 
> Best Regards,
> J.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/Makefile |   35 ++++++++++++++++++++++-------------
> >  1 file changed, 22 insertions(+), 13 deletions(-)
> > 
> > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> > index 89f645b..63bc9be 100644
> > --- a/arch/arm/Makefile
> > +++ b/arch/arm/Makefile
> > @@ -160,7 +160,16 @@ CPPFLAGS += -fdata-sections -ffunction-sections
> >  LDFLAGS_barebox += -static --gc-sections
> >  endif
> >  
> > -barebox.netx: barebox.bin
> > +ifdef CONFIG_IMAGE_COMPRESSION
> > +KBUILD_BINARY := arch/arm/pbl/zbarebox.bin
> > +KBUILD_TARGET := zbarebox.bin
> > +$(KBUILD_BINARY): $(KBUILD_TARGET)
> > +else
> > +KBUILD_BINARY := barebox.bin
> > +KBUILD_TARGET := barebox.bin
> > +endif
> > +
> > +barebox.netx: $(KBUILD_BINARY)
> >  	$(Q)scripts/gen_netx_image -i $< -o barebox.netx		\
> >  		--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL)			\
> >  		--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL)		\
> > @@ -169,36 +178,36 @@ barebox.netx: barebox.bin
> >  		--cookie=$(CONFIG_NETX_COOKIE);
> >  
> >  ifeq ($(machine-y),netx)
> > -KBUILD_IMAGE := barebox.netx
> > +KBUILD_TARGET := barebox.netx
> > +KBUILD_BINARY := $(KBUILD_TARGET)
> >  endif
> >  
> > -barebox.s5p: barebox.bin
> > +barebox.s5p: $(KBUILD_BINARY)
> >  	$(Q)scripts/s5p_cksum $< barebox.s5p
> >  
> >  ifeq ($(CONFIG_ARCH_S5PCxx),y)
> > -KBUILD_IMAGE := barebox.s5p
> > +KBUILD_TARGET := barebox.s5p
> > +KBUILD_BINARY := $(KBUILD_TARGET)
> >  endif
> >  
> > -MLO: barebox.bin
> > +MLO: $(KBUILD_BINARY)
> >  	@echo "  IFT    " $@
> >  	$(Q)scripts/omap_signGP $< $(TEXT_BASE) 1
> >  	$(Q)test -e $<.ift && mv $<.ift MLO
> >  
> >  ifeq ($(CONFIG_OMAP_BUILD_IFT),y)
> > -KBUILD_IMAGE := MLO
> > +KBUILD_TARGET := MLO
> > +KBUILD_BINARY := $(KBUILD_TARGET)
> >  endif
> >  
> > -barebox.ubl: barebox.bin
> > +barebox.ubl: $(KBUILD_BINARY)
> >  	@echo "  UBL    " $@
> >  	$(Q)scripts/mkublheader $< > barebox.ubl
> >  	$(Q)cat $< >> barebox.ubl
> >  
> >  ifeq ($(CONFIG_ARCH_DAVINCI),y)
> > -KBUILD_IMAGE := barebox.ubl
> > -endif
> > -
> > -ifdef CONFIG_IMAGE_COMPRESSION
> > -KBUILD_IMAGE := zbarebox.bin
> > +KBUILD_TARGET := barebox.ubl
> > +KBUILD_BINARY := $(KBUILD_TARGET)
> >  endif
> >  
> >  pbl := arch/arm/pbl
> > @@ -208,7 +217,7 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
> >  archclean:
> >  	$(MAKE) $(clean)=$(pbl)
> >  
> > -all: $(KBUILD_IMAGE)
> > +all: $(KBUILD_BINARY)
> >  
> >  archprepare: maketools
> >  maketools:
> > -- 
> > 1.7.10.4
> > 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 8/9] ARM pbl: remove unnecessary FORCE
  2012-08-11  9:39   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-12 12:36     ` Sascha Hauer
  2012-08-12 13:24       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2012-08-12 12:36 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Sat, Aug 11, 2012 at 11:39:31AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> > With this FORCE the compressed image is rebuilt even if it is
> > unchanged, so remove it.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/pbl/Makefile |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
> > index dc6ae7e..b1cdd85 100644
> > --- a/arch/arm/pbl/Makefile
> > +++ b/arch/arm/pbl/Makefile
> > @@ -37,7 +37,7 @@ quiet_cmd_zbarebox__ ?= LD      $@
> >  $(obj)/zbarebox: $(zbarebox-lds) $(zbarebox-common) FORCE
> >  	$(call if_changed,zbarebox__)
> >  
> > -$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin FORCE
> > +$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin
> >  	$(call if_changed,$(suffix_y))
> no sure about this one
> 
> IIRC we need it I saw issue without it

Can you check what issues there are?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl
  2012-08-12 12:09     ` Sascha Hauer
@ 2012-08-12 13:21       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-12 13:21 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 14:09 Sun 12 Aug     , Sascha Hauer wrote:
> On Sat, Aug 11, 2012 at 11:37:02AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> > > If pbl support is enabled only zbarebox.bin was built, but
> > > not the SoC specific images. Fix this.
> > yeah it does the trick but I do not like the makefile target
> > we need to create cmd and use the $(call xxx,ifchanged) mecanism
> 
> Can do, but this would be subject to another patch. This patch only changes
> the dependencies, but not what is done.
agreed but as we touch it we really need to clean it
and do not add more as with the ln

Best Regards,
J.
> 
> Sascha
> 
> > 
> > Best Regards,
> > J.
> > > 
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > >  arch/arm/Makefile |   35 ++++++++++++++++++++++-------------
> > >  1 file changed, 22 insertions(+), 13 deletions(-)
> > > 
> > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> > > index 89f645b..63bc9be 100644
> > > --- a/arch/arm/Makefile
> > > +++ b/arch/arm/Makefile
> > > @@ -160,7 +160,16 @@ CPPFLAGS += -fdata-sections -ffunction-sections
> > >  LDFLAGS_barebox += -static --gc-sections
> > >  endif
> > >  
> > > -barebox.netx: barebox.bin
> > > +ifdef CONFIG_IMAGE_COMPRESSION
> > > +KBUILD_BINARY := arch/arm/pbl/zbarebox.bin
> > > +KBUILD_TARGET := zbarebox.bin
> > > +$(KBUILD_BINARY): $(KBUILD_TARGET)
> > > +else
> > > +KBUILD_BINARY := barebox.bin
> > > +KBUILD_TARGET := barebox.bin
> > > +endif
> > > +
> > > +barebox.netx: $(KBUILD_BINARY)
> > >  	$(Q)scripts/gen_netx_image -i $< -o barebox.netx		\
> > >  		--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL)			\
> > >  		--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL)		\
> > > @@ -169,36 +178,36 @@ barebox.netx: barebox.bin
> > >  		--cookie=$(CONFIG_NETX_COOKIE);
> > >  
> > >  ifeq ($(machine-y),netx)
> > > -KBUILD_IMAGE := barebox.netx
> > > +KBUILD_TARGET := barebox.netx
> > > +KBUILD_BINARY := $(KBUILD_TARGET)
> > >  endif
> > >  
> > > -barebox.s5p: barebox.bin
> > > +barebox.s5p: $(KBUILD_BINARY)
> > >  	$(Q)scripts/s5p_cksum $< barebox.s5p
> > >  
> > >  ifeq ($(CONFIG_ARCH_S5PCxx),y)
> > > -KBUILD_IMAGE := barebox.s5p
> > > +KBUILD_TARGET := barebox.s5p
> > > +KBUILD_BINARY := $(KBUILD_TARGET)
> > >  endif
> > >  
> > > -MLO: barebox.bin
> > > +MLO: $(KBUILD_BINARY)
> > >  	@echo "  IFT    " $@
> > >  	$(Q)scripts/omap_signGP $< $(TEXT_BASE) 1
> > >  	$(Q)test -e $<.ift && mv $<.ift MLO
> > >  
> > >  ifeq ($(CONFIG_OMAP_BUILD_IFT),y)
> > > -KBUILD_IMAGE := MLO
> > > +KBUILD_TARGET := MLO
> > > +KBUILD_BINARY := $(KBUILD_TARGET)
> > >  endif
> > >  
> > > -barebox.ubl: barebox.bin
> > > +barebox.ubl: $(KBUILD_BINARY)
> > >  	@echo "  UBL    " $@
> > >  	$(Q)scripts/mkublheader $< > barebox.ubl
> > >  	$(Q)cat $< >> barebox.ubl
> > >  
> > >  ifeq ($(CONFIG_ARCH_DAVINCI),y)
> > > -KBUILD_IMAGE := barebox.ubl
> > > -endif
> > > -
> > > -ifdef CONFIG_IMAGE_COMPRESSION
> > > -KBUILD_IMAGE := zbarebox.bin
> > > +KBUILD_TARGET := barebox.ubl
> > > +KBUILD_BINARY := $(KBUILD_TARGET)
> > >  endif
> > >  
> > >  pbl := arch/arm/pbl
> > > @@ -208,7 +217,7 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
> > >  archclean:
> > >  	$(MAKE) $(clean)=$(pbl)
> > >  
> > > -all: $(KBUILD_IMAGE)
> > > +all: $(KBUILD_BINARY)
> > >  
> > >  archprepare: maketools
> > >  maketools:
> > > -- 
> > > 1.7.10.4
> > > 
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link
  2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-12 13:23     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-12 13:23 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 11:37 Sat 11 Aug     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> > Depending on the SoC a barebox.bin, barebox.netx, barebox.s5p, MLO image
> > is generated. With pbl support there now is an additional
> > arch/arm/pbl/zbarebox.bin image.
> > 
> > To help the user to determine which image should be flashed to his device,
> > generate a barebox-flash-image link.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/Makefile |    7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> > index 63bc9be..9d9247f 100644
> > --- a/arch/arm/Makefile
> > +++ b/arch/arm/Makefile
> > @@ -217,7 +217,10 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
> >  archclean:
> >  	$(MAKE) $(clean)=$(pbl)
> >  
> > -all: $(KBUILD_BINARY)
> > +barebox-flash-image: $(KBUILD_BINARY)
> > +	$(Q)ln -sf $(KBUILD_BINARY) barebox-flash-image
I re-think about it and I think we need a common ways acrosse arch

othersize it will be confusing

Best Regards,
J.

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

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

* Re: [PATCH 8/9] ARM pbl: remove unnecessary FORCE
  2012-08-12 12:36     ` Sascha Hauer
@ 2012-08-12 13:24       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 19+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-12 13:24 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 14:36 Sun 12 Aug     , Sascha Hauer wrote:
> On Sat, Aug 11, 2012 at 11:39:31AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 22:01 Fri 10 Aug     , Sascha Hauer wrote:
> > > With this FORCE the compressed image is rebuilt even if it is
> > > unchanged, so remove it.
> > > 
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > >  arch/arm/pbl/Makefile |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
> > > index dc6ae7e..b1cdd85 100644
> > > --- a/arch/arm/pbl/Makefile
> > > +++ b/arch/arm/pbl/Makefile
> > > @@ -37,7 +37,7 @@ quiet_cmd_zbarebox__ ?= LD      $@
> > >  $(obj)/zbarebox: $(zbarebox-lds) $(zbarebox-common) FORCE
> > >  	$(call if_changed,zbarebox__)
> > >  
> > > -$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin FORCE
> > > +$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin
> > >  	$(call if_changed,$(suffix_y))
> > no sure about this one
> > 
> > IIRC we need it I saw issue without it
> 
> Can you check what issues there are?
will do next week

if we can apply it after will be nice

Best Regards,
J.
> 
> Sascha
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

end of thread, other threads:[~2012-08-12 13:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10 20:00 [PATCH] pbl updates Sascha Hauer
2012-08-10 20:00 ` [PATCH 1/9] ARM eukrea cpuimx25: Move flash_header to seperate file Sascha Hauer
2012-08-10 20:00 ` [PATCH 2/9] ARM s3c boards: Do not hardcode image sizes Sascha Hauer
2012-08-10 20:00 ` [PATCH 3/9] ARM boards: Make boards pbl safe Sascha Hauer
2012-08-10 20:01 ` [PATCH 4/9] ARM Makefile: Do not hardcode targets in MLO/netx/davinci/s5p Sascha Hauer
2012-08-10 20:01 ` [PATCH 5/9] ARM: fix netx/MLO/s5p image build for pbl Sascha Hauer
2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 12:09     ` Sascha Hauer
2012-08-12 13:21       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 20:01 ` [PATCH 6/9] ARM Makefile: generate a barebox-flash-image link Sascha Hauer
2012-08-11  9:37   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 13:23     ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 20:01 ` [PATCH 7/9] ARM pbl: Fix zbarebox.S build Sascha Hauer
2012-08-11  9:38   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 20:01 ` [PATCH 8/9] ARM pbl: remove unnecessary FORCE Sascha Hauer
2012-08-11  9:39   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-12 12:36     ` Sascha Hauer
2012-08-12 13:24       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 20:01 ` [PATCH 9/9] ARM pbl: generate zbarebox.map in $(obj) Sascha Hauer

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