mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] Independent collection of patches
@ 2018-12-31  8:07 Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 1/5] 2d-primitives: fix no previous prototype warning Sam Ravnborg
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Sam Ravnborg @ 2018-12-31  8:07 UTC (permalink / raw)
  To: Barebox List; +Cc: Sam Ravnborg

Random collection of patches that accumulated the last weeks.
They are done on top of the next branch.

No dependencies between the patches.

	Sam

Sam Ravnborg (5):
      2d-primitives: fix no previous prototype warning
      images: fix force rebuild of piggy.o
      arm: fix no prototype for barebox_arm_reset_vector()
      at91sam9263ek: fix build of of_init
      video: mtl017: fix driver name variable

 arch/arm/boards/at91sam9263ek/Makefile | 2 +-
 arch/arm/include/asm/barebox-arm.h     | 2 ++
 drivers/video/mtl017.c                 | 4 ++--
 images/Makefile                        | 9 ++++-----
 lib/gui/2d-primitives.c                | 2 ++
 5 files changed, 11 insertions(+), 8 deletions(-)

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

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

* [PATCH v1 1/5] 2d-primitives: fix no previous prototype warning
  2018-12-31  8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
@ 2018-12-31  8:07 ` Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 2/5] images: fix force rebuild of piggy.o Sam Ravnborg
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2018-12-31  8:07 UTC (permalink / raw)
  To: Barebox List; +Cc: Sam Ravnborg

Fix the following warnings:

lib/gui/2d-primitives.c:88:6: warning: no
previous prototype for ‘gu_draw_line’ [-Wmissing-prototypes]
 void gu_draw_line(struct screen *sc,
      ^~~~~~~~~~~~
lib/gui/2d-primitives.c:174:6: warning: no
previous prototype for ‘gu_draw_circle’ [-Wmissing-prototypes]
 void gu_draw_circle(struct screen *sc,
      ^~~~~~~~~~~~~~

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 lib/gui/2d-primitives.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/gui/2d-primitives.c b/lib/gui/2d-primitives.c
index 82e59d9a6..940e82b7d 100644
--- a/lib/gui/2d-primitives.c
+++ b/lib/gui/2d-primitives.c
@@ -7,6 +7,8 @@
 #include <fs.h>
 #include <malloc.h>
 
+#include <gui/2d-primitives.h>
+
 static void __illuminate(struct fb_info *info,
 			 int x, int y,
 			 u8 r, u8 g, u8 b, u8 a)
-- 
2.12.0


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

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

* [PATCH v1 2/5] images: fix force rebuild of piggy.o
  2018-12-31  8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 1/5] 2d-primitives: fix no previous prototype warning Sam Ravnborg
@ 2018-12-31  8:07 ` Sam Ravnborg
  2019-01-03  9:06   ` Sascha Hauer
  2018-12-31  8:07 ` [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector() Sam Ravnborg
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Sam Ravnborg @ 2018-12-31  8:07 UTC (permalink / raw)
  To: Barebox List; +Cc: Sam Ravnborg

piggy.o would be build for every time barebox was built
This had the sideeffect that the image(s) would
always be rebuilt despite no changes

Fix this by adding piggy.o to targets
and avoid an extra command in the rule to create .pblb files

The patch includes the removal of a stray assignment

Fixes: 2078438662 ("Add multi images support")
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 images/Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/images/Makefile b/images/Makefile
index 8271a0d24..dfdc89811 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -43,7 +43,9 @@
 #
 
 quiet_cmd_objcopy_bin = OBJCOPYB $@
-      cmd_objcopy_bin = $(OBJCOPY) -O binary $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
+      cmd_objcopy_bin = \
+		$(OBJCOPY) -O binary $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ && \
+		$(objtree)/scripts/fix_size -f $@
 
 pbl-lds := $(obj)/pbl.lds
 extra-y += $(pbl-lds)
@@ -59,14 +61,11 @@ quiet_cmd_elf__ ?= LD      $@
 
 PBL_CPPFLAGS	+= -fdata-sections -ffunction-sections
 
-piggy_o := piggy.$(suffix_y).o
-
 $(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE
 	$(call if_changed,elf__,$(*F))
 
 $(obj)/%.pblb: $(obj)/%.pbl FORCE
 	$(call if_changed,objcopy_bin,$(*F))
-	$(Q)$(objtree)/scripts/fix_size -f $@
 
 $(obj)/%.s: $(obj)/% FORCE
 	$(call if_changed,disasm)
@@ -114,7 +113,7 @@ include $(srctree)/images/Makefile.xburst
 include $(srctree)/images/Makefile.at91
 include $(srctree)/images/Makefile.zynqmp
 
-targets += $(image-y) pbl.lds barebox.x barebox.z
+targets += $(image-y) pbl.lds barebox.x barebox.z piggy.o
 targets += $(patsubst %,%.pblb,$(pblb-y))
 targets += $(patsubst %,%.pbl,$(pblb-y))
 targets += $(patsubst %,%.s,$(pblb-y))
-- 
2.12.0


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

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

* [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()
  2018-12-31  8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 1/5] 2d-primitives: fix no previous prototype warning Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 2/5] images: fix force rebuild of piggy.o Sam Ravnborg
@ 2018-12-31  8:07 ` Sam Ravnborg
  2019-01-04  7:27   ` Sascha Hauer
  2018-12-31  8:07 ` [PATCH v1 4/5] at91sam9263ek: fix build of of_init Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 5/5] video: mtl017: fix driver name variable Sam Ravnborg
  4 siblings, 1 reply; 10+ messages in thread
From: Sam Ravnborg @ 2018-12-31  8:07 UTC (permalink / raw)
  To: Barebox List; +Cc: Sam Ravnborg

Fix the following warning:

PBLCC   arch/arm/boards/at91sam9261ek/pbl-lowlevel_init.o
arch/arm/boards/at91sam9261ek/lowlevel_init.c:120:26:
warning: no previous prototype for ‘barebox_arm_reset_vector’ [-Wmissing-prototypes]

Prototype added so it covers machs with their own
definition and the machs using the arm general variant

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/arm/include/asm/barebox-arm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index e065b479e..312685486 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -25,6 +25,7 @@
 #ifndef _BAREBOX_ARM_H_
 #define _BAREBOX_ARM_H_
 
+#include <init.h>
 #include <linux/sizes.h>
 #include <asm-generic/memory_layout.h>
 #include <linux/kernel.h>
@@ -58,6 +59,7 @@ void setup_c(void);
 void relocate_to_current_adr(void);
 void relocate_to_adr(unsigned long target);
 void __noreturn barebox_arm_entry(unsigned long membase, unsigned long memsize, void *boarddata);
+void __naked __bare_init barebox_arm_reset_vector(void);
 
 struct barebox_arm_boarddata {
 #define BAREBOX_ARM_BOARDDATA_MAGIC	0xabe742c3
-- 
2.12.0


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

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

* [PATCH v1 4/5] at91sam9263ek: fix build of of_init
  2018-12-31  8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
                   ` (2 preceding siblings ...)
  2018-12-31  8:07 ` [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector() Sam Ravnborg
@ 2018-12-31  8:07 ` Sam Ravnborg
  2018-12-31  8:07 ` [PATCH v1 5/5] video: mtl017: fix driver name variable Sam Ravnborg
  4 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2018-12-31  8:07 UTC (permalink / raw)
  To: Barebox List; +Cc: Sam Ravnborg

Fix mistake in Makefile that prevented build of
of_init.o

With this fix smc shows up in iomem like this:

  0xffffe400 - 0xffffe5ff (size 0x00000200) at91sam9-smc0
  0xffffea00 - 0xffffebff (size 0x00000200) at91sam9-smc1

And we get access to the files from defaultenv provided by the board

Fixes: b467c262b5a7 (at91sam9263ek: enable DT support)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 arch/arm/boards/at91sam9263ek/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boards/at91sam9263ek/Makefile b/arch/arm/boards/at91sam9263ek/Makefile
index 66083a239..d4d5e7639 100644
--- a/arch/arm/boards/at91sam9263ek/Makefile
+++ b/arch/arm/boards/at91sam9263ek/Makefile
@@ -1,7 +1,7 @@
 ifeq ($(CONFIG_OFDEVICE),)
 obj-y += init.o
 endif
-obj-$(CONFIG_OF_DEVICE) += of_init.o
+obj-$(CONFIG_OFDEVICE) += of_init.o
 
 lwl-y += lowlevel_init.o
 
-- 
2.12.0


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

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

* [PATCH v1 5/5] video: mtl017: fix driver name variable
  2018-12-31  8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
                   ` (3 preceding siblings ...)
  2018-12-31  8:07 ` [PATCH v1 4/5] at91sam9263ek: fix build of of_init Sam Ravnborg
@ 2018-12-31  8:07 ` Sam Ravnborg
  4 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2018-12-31  8:07 UTC (permalink / raw)
  To: Barebox List; +Cc: Sam Ravnborg

It look like a copy-paste bug that the twl_driver name
was used.
Rename to the more sensible mtl_driver

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/video/mtl017.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/mtl017.c b/drivers/video/mtl017.c
index 423fb8e4f..c04875cd0 100644
--- a/drivers/video/mtl017.c
+++ b/drivers/video/mtl017.c
@@ -268,8 +268,8 @@ static int mtl017_probe(struct device_d *dev)
 	return 0;
 }
 
-static struct driver_d twl_driver = {
+static struct driver_d mtl_driver = {
 	.name  = "mtl017",
 	.probe = mtl017_probe,
 };
-device_i2c_driver(twl_driver);
+device_i2c_driver(mtl_driver);
-- 
2.12.0


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

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

* Re: [PATCH v1 2/5] images: fix force rebuild of piggy.o
  2018-12-31  8:07 ` [PATCH v1 2/5] images: fix force rebuild of piggy.o Sam Ravnborg
@ 2019-01-03  9:06   ` Sascha Hauer
  0 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2019-01-03  9:06 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Barebox List

On Mon, Dec 31, 2018 at 09:07:22AM +0100, Sam Ravnborg wrote:
> piggy.o would be build for every time barebox was built
> This had the sideeffect that the image(s) would
> always be rebuilt despite no changes
> 
> Fix this by adding piggy.o to targets
> and avoid an extra command in the rule to create .pblb files
> 
> The patch includes the removal of a stray assignment
> 
> Fixes: 2078438662 ("Add multi images support")

This adds multi images support, but the actual change that this patch
fixes came with 5a1a5ed253 ("ARM: images: use piggydata").

I changed that while applying.

Thanks,
 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] 10+ messages in thread

* Re: [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()
  2018-12-31  8:07 ` [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector() Sam Ravnborg
@ 2019-01-04  7:27   ` Sascha Hauer
  2019-01-06 20:38     ` Sam Ravnborg
  0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2019-01-04  7:27 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Barebox List

On Mon, Dec 31, 2018 at 09:07:23AM +0100, Sam Ravnborg wrote:
> Fix the following warning:
> 
> PBLCC   arch/arm/boards/at91sam9261ek/pbl-lowlevel_init.o
> arch/arm/boards/at91sam9261ek/lowlevel_init.c:120:26:
> warning: no previous prototype for ‘barebox_arm_reset_vector’ [-Wmissing-prototypes]
> 
> Prototype added so it covers machs with their own
> definition and the machs using the arm general variant
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/arm/include/asm/barebox-arm.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
> index e065b479e..312685486 100644
> --- a/arch/arm/include/asm/barebox-arm.h
> +++ b/arch/arm/include/asm/barebox-arm.h
> @@ -25,6 +25,7 @@
>  #ifndef _BAREBOX_ARM_H_
>  #define _BAREBOX_ARM_H_
>  
> +#include <init.h>
>  #include <linux/sizes.h>
>  #include <asm-generic/memory_layout.h>
>  #include <linux/kernel.h>
> @@ -58,6 +59,7 @@ void setup_c(void);
>  void relocate_to_current_adr(void);
>  void relocate_to_adr(unsigned long target);
>  void __noreturn barebox_arm_entry(unsigned long membase, unsigned long memsize, void *boarddata);
> +void __naked __bare_init barebox_arm_reset_vector(void);

I had to drop this one as it breaks compilation on some boards. Some
boards need r0 from the ROM so they have:

void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)

We have to harmonize these first. I suggest to use

void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)

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] 10+ messages in thread

* Re: [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()
  2019-01-04  7:27   ` Sascha Hauer
@ 2019-01-06 20:38     ` Sam Ravnborg
  2019-01-07  7:41       ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: Sam Ravnborg @ 2019-01-06 20:38 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

Hi Sasha.

> > +void __naked __bare_init barebox_arm_reset_vector(void);
> 
> I had to drop this one as it breaks compilation on some boards. Some
> boards need r0 from the ROM so they have:
> 
> void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)
> 
> We have to harmonize these first.
Sorry - I did not test more than a few boards.

> I suggest to use
> 
> void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
Like the prototype we have for the multi images.
I added this to the TODO list in the doc I just posted.

	Sam

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

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

* Re: [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()
  2019-01-06 20:38     ` Sam Ravnborg
@ 2019-01-07  7:41       ` Sascha Hauer
  0 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2019-01-07  7:41 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Barebox List

On Sun, Jan 06, 2019 at 09:38:11PM +0100, Sam Ravnborg wrote:
> Hi Sasha.
> 
> > > +void __naked __bare_init barebox_arm_reset_vector(void);
> > 
> > I had to drop this one as it breaks compilation on some boards. Some
> > boards need r0 from the ROM so they have:
> > 
> > void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)
> > 
> > We have to harmonize these first.
> Sorry - I did not test more than a few boards.

Don't worry, that's what my compile tests are good for.

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] 10+ messages in thread

end of thread, other threads:[~2019-01-07  7:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-31  8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
2018-12-31  8:07 ` [PATCH v1 1/5] 2d-primitives: fix no previous prototype warning Sam Ravnborg
2018-12-31  8:07 ` [PATCH v1 2/5] images: fix force rebuild of piggy.o Sam Ravnborg
2019-01-03  9:06   ` Sascha Hauer
2018-12-31  8:07 ` [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector() Sam Ravnborg
2019-01-04  7:27   ` Sascha Hauer
2019-01-06 20:38     ` Sam Ravnborg
2019-01-07  7:41       ` Sascha Hauer
2018-12-31  8:07 ` [PATCH v1 4/5] at91sam9263ek: fix build of of_init Sam Ravnborg
2018-12-31  8:07 ` [PATCH v1 5/5] video: mtl017: fix driver name variable Sam Ravnborg

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