mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] random compile fixes
@ 2012-10-26  6:58 Sascha Hauer
  2012-10-26  6:58 ` [PATCH 01/15] pbl: Add missing FORCE Sascha Hauer
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

These came up during some randconfig builds. intended for master.

Sascha

----------------------------------------------------------------
Sascha Hauer (15):
      pbl: Add missing FORCE
      wd: Provide default value for watchdog timeout
      mtd: fix mtdraw_write/mtdraw_erase arguments
      ARM: let THUMB2 select EABI
      ARM Samsung: fix pbl build for tiny210 board
      ARM omap: pbl fixes
      ARM Samsung: Let Nand boot depend on ARCH_S3C24xx
      mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL
      misc JTAG: Let Jtag driver depend on GENERIC_GPIO
      mtd mxs nand: select NAND_BBT
      mtd nand i.MX: fix compilation for unsupported SoC
      of gpio: Build gpio helper only when gpiolib is selected
      pbl: provide hang() function for the pbl
      ARM omap spi image: relax size constrains
      ARM omap spi image: print error to stderr

 arch/arm/Kconfig                             |    1 +
 arch/arm/boards/friendlyarm-tiny210/Makefile |    1 +
 arch/arm/mach-omap/Makefile                  |    1 +
 arch/arm/mach-omap/omap3_generic.c           |    2 ++
 arch/arm/mach-samsung/Kconfig                |    1 +
 arch/arm/mach-samsung/Makefile               |    1 +
 commands/Kconfig                             |    1 +
 drivers/mfd/stmpe-i2c.c                      |    4 ++--
 drivers/misc/Kconfig                         |    1 +
 drivers/mtd/mtdraw.c                         |    4 ++--
 drivers/mtd/nand/Kconfig                     |    1 +
 drivers/mtd/nand/nand_imx.c                  |    3 +++
 drivers/of/Makefile                          |    2 +-
 pbl/misc.c                                   |    5 +++++
 scripts/Makefile.build                       |    4 ++--
 scripts/mk-am35xx-spi-image.c                |   10 ++++------
 16 files changed, 29 insertions(+), 13 deletions(-)

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

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

* [PATCH 01/15] pbl: Add missing FORCE
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
@ 2012-10-26  6:58 ` Sascha Hauer
  2012-10-26  6:58 ` [PATCH 02/15] wd: Provide default value for watchdog timeout Sascha Hauer
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

Otherwise the pbl files do not get rebuilt when the CFLAGS change.

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

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 383d73f..a95bbe4 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -241,7 +241,7 @@ endef
 
 # Built-in and composite module parts
 
-pbl-%.o: %.c
+pbl-%.o: %.c FORCE
 	$(call cmd,force_checksrc)
 	$(call if_changed_rule,pbl_cc_o_c)
 
@@ -284,7 +284,7 @@ cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
 quiet_cmd_pbl_as_o_S = PBLAS   $@
 cmd_pbl_as_o_S       = $(CC) -D__PBL__ $(a_flags) $(PBL_CPPFLAGS) -c -o $@ $<
 
-pbl-%.o: %.S
+pbl-%.o: %.S FORCE
 	$(call if_changed_dep,pbl_as_o_S)
 
 %.o: %.S FORCE
-- 
1.7.10.4


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

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

* [PATCH 02/15] wd: Provide default value for watchdog timeout
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
  2012-10-26  6:58 ` [PATCH 01/15] pbl: Add missing FORCE Sascha Hauer
@ 2012-10-26  6:58 ` Sascha Hauer
  2012-10-26  6:58 ` [PATCH 03/15] mtd: fix mtdraw_write/mtdraw_erase arguments Sascha Hauer
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

Otherwise barebox can't be built if the user did not specify a value.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/commands/Kconfig b/commands/Kconfig
index e934f29..16706d3 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -640,6 +640,7 @@ if CMD_WD
 
 config CMD_WD_DEFAULT_TIMOUT
 	int
+	default 0
 	prompt "default timeout"
 	help
 	  Define the default timeout value in [seconds] if the first call of
-- 
1.7.10.4


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

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

* [PATCH 03/15] mtd: fix mtdraw_write/mtdraw_erase arguments
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
  2012-10-26  6:58 ` [PATCH 01/15] pbl: Add missing FORCE Sascha Hauer
  2012-10-26  6:58 ` [PATCH 02/15] wd: Provide default value for watchdog timeout Sascha Hauer
@ 2012-10-26  6:58 ` Sascha Hauer
  2012-10-26  6:58 ` [PATCH 04/15] ARM: let THUMB2 select EABI Sascha Hauer
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

For the !CONFIG_MTD_WRITE case they still have ulong as offset
argument.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/mtdraw.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c
index f541802..079575c 100644
--- a/drivers/mtd/mtdraw.c
+++ b/drivers/mtd/mtdraw.c
@@ -258,11 +258,11 @@ static int mtdraw_erase(struct cdev *cdev, size_t count, loff_t _offset)
 }
 #else
 static ssize_t mtdraw_write(struct cdev *cdev, const void *buf, size_t count,
-			    ulong offset, ulong flags)
+			    loff_t offset, ulong flags)
 {
 	return 0;
 }
-static ssize_t mtdraw_erase(struct cdev *cdev, size_t count, ulong offset)
+static ssize_t mtdraw_erase(struct cdev *cdev, size_t count, loff_t offset)
 {
 	return 0;
 }
-- 
1.7.10.4


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

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

* [PATCH 04/15] ARM: let THUMB2 select EABI
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (2 preceding siblings ...)
  2012-10-26  6:58 ` [PATCH 03/15] mtd: fix mtdraw_write/mtdraw_erase arguments Sascha Hauer
@ 2012-10-26  6:58 ` Sascha Hauer
  2012-10-26  6:58 ` [PATCH 05/15] ARM Samsung: fix pbl build for tiny210 board Sascha Hauer
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

THUMB2 mode needs EABI to build, so select it.

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

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c1a963d..57b3ca7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -121,6 +121,7 @@ config AEABI
 
 config THUMB2_BAREBOX
 	select ARM_ASM_UNIFIED
+	select AEABI
 	depends on CPU_V7
 	bool "Compile barebox in thumb-2 mode (read help)"
 	help
-- 
1.7.10.4


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

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

* [PATCH 05/15] ARM Samsung: fix pbl build for tiny210 board
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (3 preceding siblings ...)
  2012-10-26  6:58 ` [PATCH 04/15] ARM: let THUMB2 select EABI Sascha Hauer
@ 2012-10-26  6:58 ` Sascha Hauer
  2012-10-26  6:58 ` [PATCH 06/15] ARM omap: pbl fixes Sascha Hauer
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

The Tiny210 needs lowlevel.o and memory setup in the pbl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/friendlyarm-tiny210/Makefile |    1 +
 arch/arm/mach-samsung/Makefile               |    1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boards/friendlyarm-tiny210/Makefile b/arch/arm/boards/friendlyarm-tiny210/Makefile
index 9c38e60..20060a5 100644
--- a/arch/arm/boards/friendlyarm-tiny210/Makefile
+++ b/arch/arm/boards/friendlyarm-tiny210/Makefile
@@ -1 +1,2 @@
 obj-y += tiny210.o lowlevel.o
+pbl-y += lowlevel.o
diff --git a/arch/arm/mach-samsung/Makefile b/arch/arm/mach-samsung/Makefile
index 0ffe370..46393e1 100644
--- a/arch/arm/mach-samsung/Makefile
+++ b/arch/arm/mach-samsung/Makefile
@@ -7,4 +7,5 @@ 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
+pbl-$(CONFIG_ARCH_S5PCxx) += mem-s5pcxx.o
 obj-$(CONFIG_S3C_LOWLEVEL_INIT) += $(obj-lowlevel-y)
-- 
1.7.10.4


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

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

* [PATCH 06/15] ARM omap: pbl fixes
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (4 preceding siblings ...)
  2012-10-26  6:58 ` [PATCH 05/15] ARM Samsung: fix pbl build for tiny210 board Sascha Hauer
@ 2012-10-26  6:58 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 07/15] ARM Samsung: Let Nand boot depend on ARCH_S3C24xx Sascha Hauer
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:58 UTC (permalink / raw)
  To: barebox

Omap3 pbl build may need omap3_clock.c. Also, do not use add_generic_device
in pbl

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-omap/Makefile        |    1 +
 arch/arm/mach-omap/omap3_generic.c |    2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
index f752bc7..3a6d50c 100644
--- a/arch/arm/mach-omap/Makefile
+++ b/arch/arm/mach-omap/Makefile
@@ -23,6 +23,7 @@ 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
+pbl-$(CONFIG_OMAP3_CLOCK_CONFIG) += omap3_clock.o
 obj-$(CONFIG_OMAP_GPMC) += gpmc.o devices-gpmc-nand.o
 obj-$(CONFIG_SHELL_NONE) += xload.o
 obj-$(CONFIG_I2C_TWL6030) += omap4_twl6030_mmc.o
diff --git a/arch/arm/mach-omap/omap3_generic.c b/arch/arm/mach-omap/omap3_generic.c
index 10eeacd..1e1308e 100644
--- a/arch/arm/mach-omap/omap3_generic.c
+++ b/arch/arm/mach-omap/omap3_generic.c
@@ -512,6 +512,7 @@ const struct gpmc_config omap3_nand_cfg = {
 	.size = GPMC_SIZE_16M,
 };
 
+#ifndef __PBL__
 static int omap3_gpio_init(void)
 {
 	add_generic_device("omap-gpio", 0, NULL, 0x48310000,
@@ -530,3 +531,4 @@ static int omap3_gpio_init(void)
 	return 0;
 }
 coredevice_initcall(omap3_gpio_init);
+#endif
-- 
1.7.10.4


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

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

* [PATCH 07/15] ARM Samsung: Let Nand boot depend on ARCH_S3C24xx
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (5 preceding siblings ...)
  2012-10-26  6:58 ` [PATCH 06/15] ARM omap: pbl fixes Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 08/15] mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL Sascha Hauer
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

It is only available on this SoC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-samsung/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-samsung/Kconfig b/arch/arm/mach-samsung/Kconfig
index 7312f5e..3a4d910 100644
--- a/arch/arm/mach-samsung/Kconfig
+++ b/arch/arm/mach-samsung/Kconfig
@@ -175,6 +175,7 @@ config S3C_SDRAM_INIT
 config S3C_NAND_BOOT
 	bool
 	prompt "Booting from NAND"
+	depends on ARCH_S3C24xx
 	select MTD
 	select NAND
 	select NAND_S3C24XX
-- 
1.7.10.4


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

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

* [PATCH 08/15] mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (6 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 07/15] ARM Samsung: Let Nand boot depend on ARCH_S3C24xx Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 09/15] misc JTAG: Let Jtag driver depend on GENERIC_GPIO Sascha Hauer
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mfd/stmpe-i2c.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index 12e95c1..d7c29cc 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -35,7 +35,7 @@ int stmpe_reg_read(struct stmpe *stmpe, u32 reg, u8 *val)
 
 	return ret == 1 ? 0 : ret;
 }
-EXPORT_SYMBOL(stmpe_reg_read)
+EXPORT_SYMBOL(stmpe_reg_read);
 
 int stmpe_reg_write(struct stmpe *stmpe, u32 reg, u8 val)
 {
@@ -45,7 +45,7 @@ int stmpe_reg_write(struct stmpe *stmpe, u32 reg, u8 val)
 
 	return ret == 1 ? 0 : ret;
 }
-EXPORT_SYMBOL(stmpe_reg_write)
+EXPORT_SYMBOL(stmpe_reg_write);
 
 int stmpe_set_bits(struct stmpe *stmpe, u32 reg, u8 mask, u8 val)
 {
-- 
1.7.10.4


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

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

* [PATCH 09/15] misc JTAG: Let Jtag driver depend on GENERIC_GPIO
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (7 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 08/15] mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 10/15] mtd mxs nand: select NAND_BBT Sascha Hauer
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

It uses the gpio functions, so let it depend on GENERIC_GPIO.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/misc/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index c3d31ec..699046b 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -11,6 +11,7 @@ if MISC_DEVICES
 
 config JTAG
 	tristate "JTAG Bitbang driver"
+	depends on GENERIC_GPIO
 	help
 	  Controls JTAG chains connected to I/O pins
 
-- 
1.7.10.4


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

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

* [PATCH 10/15] mtd mxs nand: select NAND_BBT
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (8 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 09/15] misc JTAG: Let Jtag driver depend on GENERIC_GPIO Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 11/15] mtd nand i.MX: fix compilation for unsupported SoC Sascha Hauer
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

The driver won't compile without it, so select it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/nand/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 6889b44..3876a14 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -55,6 +55,7 @@ config NAND_IMX
 
 config NAND_MXS
 	bool
+	select NAND_BBT
 	prompt "i.MX23/28 NAND driver"
 	depends on MXS_APBH_DMA
 
-- 
1.7.10.4


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

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

* [PATCH 11/15] mtd nand i.MX: fix compilation for unsupported SoC
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (9 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 10/15] mtd mxs nand: select NAND_BBT Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 12/15] of gpio: Build gpio helper only when gpiolib is selected Sascha Hauer
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

Add a default case when all if(nfc_is_*) else if()
return false to prevent a compiler warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/nand/nand_imx.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index b1b7f55..ef927c5 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -1175,6 +1175,9 @@ static int __init imxnd_probe(struct device_d *dev)
 		oob_smallpage = &nandv2_hw_eccoob_smallpage;
 		oob_largepage = &nandv2_hw_eccoob_largepage;
 		oob_4kpage = &nandv2_hw_eccoob_4k;
+	} else {
+		err = -EINVAL;
+		goto escan;
 	}
 
 	host->dev = dev;
-- 
1.7.10.4


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

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

* [PATCH 12/15] of gpio: Build gpio helper only when gpiolib is selected
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (10 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 11/15] mtd nand i.MX: fix compilation for unsupported SoC Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 13/15] pbl: provide hang() function for the pbl Sascha Hauer
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

Otherwise the functions needed by the helper won't be available.

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

diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index c14aaec..5a5960d 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -1,3 +1,3 @@
 obj-y += base.o
-obj-y += gpio.o
+obj-$(CONFIG_GPIOLIB) += gpio.o
 obj-y += partition.o
-- 
1.7.10.4


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

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

* [PATCH 13/15] pbl: provide hang() function for the pbl
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (11 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 12/15] of gpio: Build gpio helper only when gpiolib is selected Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 14/15] ARM omap spi image: relax size constrains Sascha Hauer
  2012-10-26  6:59 ` [PATCH 15/15] ARM omap spi image: print error to stderr Sascha Hauer
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 pbl/misc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pbl/misc.c b/pbl/misc.c
index 47e9cea..a2cb44d 100644
--- a/pbl/misc.c
+++ b/pbl/misc.c
@@ -4,6 +4,11 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 
+void __noreturn hang(void)
+{
+	while (1);
+}
+
 void __noreturn panic(const char *fmt, ...)
 {
 	while(1);
-- 
1.7.10.4


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

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

* [PATCH 14/15] ARM omap spi image: relax size constrains
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (12 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 13/15] pbl: provide hang() function for the pbl Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  2012-10-26  6:59 ` [PATCH 15/15] ARM omap spi image: print error to stderr Sascha Hauer
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

The omap spi utility requires the image size to be a multiple of four
bytes. This seems unnecessary, we can just pad with a few bytes to
get the required alignment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 scripts/mk-am35xx-spi-image.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/scripts/mk-am35xx-spi-image.c b/scripts/mk-am35xx-spi-image.c
index ec311fd..1372fbd 100644
--- a/scripts/mk-am35xx-spi-image.c
+++ b/scripts/mk-am35xx-spi-image.c
@@ -95,10 +95,6 @@ int main(int argc, char *argv[])
 		perror("ftello");
 		exit(EXIT_FAILURE);
 	}
-	if (pos % 4) {
-		printf("error: image size must be a multiple of 4 bytes\n");
-		exit(EXIT_FAILURE);
-	}
 	if (pos > 0x100000) {
 		printf("error: image should be smaller than 1 MiB\n");
 		exit(EXIT_FAILURE);
@@ -109,6 +105,8 @@ int main(int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 
+	pos = (pos + 3) & ~3;
+
 	/* image size */
 	temp = htobe32((uint32_t)pos);
 	fwrite(&temp, sizeof(uint32_t), 1, stdout);
@@ -121,7 +119,7 @@ int main(int argc, char *argv[])
 		size = fread(&temp, 1, sizeof(uint32_t), input);
 		if (!size)
 			break;
-		if (size != 4) {
+		if (size < 4 && !feof(input)) {
 			perror("fread");
 			exit(EXIT_FAILURE);
 		}
-- 
1.7.10.4


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

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

* [PATCH 15/15] ARM omap spi image: print error to stderr
  2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
                   ` (13 preceding siblings ...)
  2012-10-26  6:59 ` [PATCH 14/15] ARM omap spi image: relax size constrains Sascha Hauer
@ 2012-10-26  6:59 ` Sascha Hauer
  14 siblings, 0 replies; 16+ messages in thread
From: Sascha Hauer @ 2012-10-26  6:59 UTC (permalink / raw)
  To: barebox

Since the utility outputs the image on stdout we have to print the
error messages to stderr in order to see them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 scripts/mk-am35xx-spi-image.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mk-am35xx-spi-image.c b/scripts/mk-am35xx-spi-image.c
index 1372fbd..74e79db 100644
--- a/scripts/mk-am35xx-spi-image.c
+++ b/scripts/mk-am35xx-spi-image.c
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 	if (pos > 0x100000) {
-		printf("error: image should be smaller than 1 MiB\n");
+		fprintf(stderr, "error: image should be smaller than 1 MiB\n");
 		exit(EXIT_FAILURE);
 	}
 
-- 
1.7.10.4


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

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

end of thread, other threads:[~2012-10-26  6:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-26  6:58 [PATCH] random compile fixes Sascha Hauer
2012-10-26  6:58 ` [PATCH 01/15] pbl: Add missing FORCE Sascha Hauer
2012-10-26  6:58 ` [PATCH 02/15] wd: Provide default value for watchdog timeout Sascha Hauer
2012-10-26  6:58 ` [PATCH 03/15] mtd: fix mtdraw_write/mtdraw_erase arguments Sascha Hauer
2012-10-26  6:58 ` [PATCH 04/15] ARM: let THUMB2 select EABI Sascha Hauer
2012-10-26  6:58 ` [PATCH 05/15] ARM Samsung: fix pbl build for tiny210 board Sascha Hauer
2012-10-26  6:58 ` [PATCH 06/15] ARM omap: pbl fixes Sascha Hauer
2012-10-26  6:59 ` [PATCH 07/15] ARM Samsung: Let Nand boot depend on ARCH_S3C24xx Sascha Hauer
2012-10-26  6:59 ` [PATCH 08/15] mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL Sascha Hauer
2012-10-26  6:59 ` [PATCH 09/15] misc JTAG: Let Jtag driver depend on GENERIC_GPIO Sascha Hauer
2012-10-26  6:59 ` [PATCH 10/15] mtd mxs nand: select NAND_BBT Sascha Hauer
2012-10-26  6:59 ` [PATCH 11/15] mtd nand i.MX: fix compilation for unsupported SoC Sascha Hauer
2012-10-26  6:59 ` [PATCH 12/15] of gpio: Build gpio helper only when gpiolib is selected Sascha Hauer
2012-10-26  6:59 ` [PATCH 13/15] pbl: provide hang() function for the pbl Sascha Hauer
2012-10-26  6:59 ` [PATCH 14/15] ARM omap spi image: relax size constrains Sascha Hauer
2012-10-26  6:59 ` [PATCH 15/15] ARM omap spi image: print error to stderr Sascha Hauer

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