Re: Linking issue with ld.bfd 2.28.0.20170307

2017-04-19 Thread Панов Андрей
Hi! U-boot has fix for this issue: http://git.denx.de/?p=u-boot.git;a=commit;h=e391b1e64b0bd65709a28a4764afe4f32d408243 With attached patch I was able to build barebox with new ld. Tested on imx6 arch only. 19.04.2017, 13:31, "Sascha Hauer" : > Hi Holger, > > On Mon, Apr 17, 2017 at 07:35:19AM

[PATCH] state: Fix error return value

2017-04-19 Thread Sascha Hauer
When the backend phandle cannot be resolved we jump to the error return path without initializing ret. Fix this. Signed-off-by: Sascha Hauer --- common/state/state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/state/state.c b/common/state/state.c index 8369aedac6..6db77f2c18 10064

Re: gpio-keys on barebox 2015.11

2017-04-19 Thread Sascha Hauer
Hi Zdenek, On Wed, Apr 19, 2017 at 12:39:14PM +0200, Zdenek Svachula wrote: >Hi Sascha > >yes. I look in these >I also  enable initcall debug output and see >initcall-> at25_driver_register+0x1/0x14 >initcall-> at24_init+0x1/0x18 >initcall-> gpio_keys_driver_register+0x1/0

Fwd: gpio-keys on barebox 2015.11

2017-04-19 Thread Zdenek Svachula
Hi Sascha yes. I look in these I also enable initcall debug output and see initcall-> at25_driver_register+0x1/0x14 initcall-> at24_init+0x1/0x18 initcall-> gpio_keys_driver_register+0x1/0xc initcall-> imx_keypad_driver_register+0x1/0xc initcall-> imx_wd_driver_register+0x1/0xc initcall-> null_in

Re: Linking issue with ld.bfd 2.28.0.20170307

2017-04-19 Thread Sascha Hauer
Hi Holger, On Mon, Apr 17, 2017 at 07:35:19AM +0200, Holger Freyther wrote: > > > On 30. Mar 2017, at 20:49, Holger Freyther wrote: > > > > Hi, > > Hi! > > > I am rebuilding the bootloader with gcc6 and the above version > > of binutils and it is failing to link with .bfd but is working > > w

Re: Howto set var from command output

2017-04-19 Thread Ian Abbott
On 19/04/17 11:14, Sascha Hauer wrote: On Wed, Apr 19, 2017 at 06:04:17PM +0800, 张忠山 wrote: Hush does not support command substitution In barebox is there some to set var from a command output? Or is there a command to do it? There is no way to set a variable from a command output, mostly bec

Re: [PATCH 2/2] of: base: of_new_property(): use xstrdup() instead of strdup()

2017-04-19 Thread Sascha Hauer
On Wed, Apr 19, 2017 at 01:20:26PM +0300, Antony Pavlov wrote: > On Mon, 17 Apr 2017 13:42:10 +0300 > Antony Pavlov wrote: > > > At the moment of_new_property() uses xfunctions for memory > > allocation so we can use xstrdup() instead of strdup() > > for code simplification. > > > > A side effec

Re: Howto set var from command output

2017-04-19 Thread Sascha Hauer
On Wed, Apr 19, 2017 at 06:04:17PM +0800, 张忠山 wrote: > Hush does not support command substitution > In barebox is there some to set var from a command output? > Or is there a command to do it? There is no way to set a variable from a command output, mostly because this would be really hard to imp

Re: [PATCH 2/2] of: base: of_new_property(): use xstrdup() instead of strdup()

2017-04-19 Thread Antony Pavlov
On Mon, 17 Apr 2017 13:42:10 +0300 Antony Pavlov wrote: > At the moment of_new_property() uses xfunctions for memory > allocation so we can use xstrdup() instead of strdup() > for code simplification. > > A side effect of this commmit is that > the of_new_property() function can't return NULL >

Howto set var from command output

2017-04-19 Thread 张忠山
Hush does not support command substitution In barebox is there some to set var from a command output? Or is there a command to do it? ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

Re: [PATCH v2] mci: add Marvell Dove SDHCI driver

2017-04-19 Thread Sascha Hauer
On Tue, Apr 18, 2017 at 11:15:58AM +0200, Michael Grzeschik wrote: > This adds a driver for the SDHCI controller found on Marvell Dove SoCs. > Despite a missing pinctrl driver, corresponding MPP config has to be > set on a per board basis. > > This driver was succesfully tested with Solidrun Dove

Re: [PATCH 1/2] mtd: spi-nor: cadence: change devicetree bindings to upstream

2017-04-19 Thread Sascha Hauer
On Tue, Apr 18, 2017 at 04:46:14PM +0200, Steffen Trumtrar wrote: > Upstream devicetree bindings where changed to use "cdns,is-decoded-cs" > instead of "external-decoder". Use it. > Also, get rid of the clock-names "qspi_clk" dependency. > > Signed-off-by: Steffen Trumtrar > --- > arch/arm/mach-

Re: gpio-keys on barebox 2015.11

2017-04-19 Thread Sascha Hauer
On Wed, Apr 19, 2017 at 10:49:48AM +0200, Zdenek Svachula wrote: > Hi Sascha, > > My board is Phytec phyFLEX-i.MX6 Quad Carrier-Board. > I look to commit 7a037a952da8083e2eddcb2b2e180f0629e83758 Author: > Sascha Hauer > Date: Fri Feb 14 11:55:02 2014 +0100 > > input: gpio-keys: Add device

Re: [PATCH 0/2] of: base: some simplifications

2017-04-19 Thread Sascha Hauer
On Mon, Apr 17, 2017 at 01:42:08PM +0300, Antony Pavlov wrote: > Antony Pavlov (2): > of: base: exclude memcpy-like code from of_property_write_u8_array() > of: base: of_new_property(): use xstrdup() instead of strdup() > > drivers/of/base.c | 14 ++ > 1 file changed, 2 insertions

Re: [PATCH 01/14] at91sam9x5ek: Convert to mult-image build

2017-04-19 Thread Sascha Hauer
On Sun, Apr 16, 2017 at 10:24:12AM +0200, Sam Ravnborg wrote: > > --- /dev/null > > +++ b/images/Makefile.at91 > > @@ -0,0 +1,7 @@ > > +# > > +# barebox image generation Makefile for AT91 images > > +# > > + > > +pblx-$(MACH_AT91SAM9X5EK) += start_at91sam9x5ek > > +FILE_barebox-at91sam9x5ek.img = s

[PATCH] ARM: at91sam9x5ek: Actually build image

2017-04-19 Thread Sascha Hauer
The Kconfig variable is named CONFIG_MACH_AT91SAM9X5EK, not MACH_AT91SAM9X5EK. Reported-by: Sam Ravnborg Signed-off-by: Sascha Hauer --- images/Makefile.at91 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/Makefile.at91 b/images/Makefile.at91 index 686d5011ef..dc6

Re: [PATCH v2 00/11] AT91, at91sam9x5ek updates (part II/III)

2017-04-19 Thread Sascha Hauer
Hi Sam, On Sat, Apr 15, 2017 at 11:50:42PM +0200, Sam Ravnborg wrote: > Hi Andrey. > > While trying to port my proprietary at91sam9263 based board > I have stumbled over how the early init works. > And so far I have used at91sam9x5ek as reference. > > If I follow the code paths for sam9x5 it loo

Re: gpio-keys on barebox 2015.11

2017-04-19 Thread Zdenek Svachula
Hi Sascha, My board is Phytec phyFLEX-i.MX6 Quad Carrier-Board. I look to commit 7a037a952da8083e2eddcb2b2e180f0629e83758 Author: Sascha Hauer Date: Fri Feb 14 11:55:02 2014 +0100 input: gpio-keys: Add devicetree probe support Signed-off-by: Sascha Hauer that seem ok. I look also i

Re: [PATCH 16/42] state: Drop cache bucket

2017-04-19 Thread Sascha Hauer
Hi Sam, On Sat, Apr 15, 2017 at 10:53:25AM +0200, Sam Ravnborg wrote: > > + if (memcmp(bucket->buf, buf, len)) > > + goto refresh; > > + > > + return 0; > > + > > +refresh: > > + ret = bucket->write(bucket, buf, len); > > In the code above we check needs_refresh and len. > But nee

Re: [PATCH] mtd: nand_omap_gpmc: fix BCH error correction

2017-04-19 Thread Sascha Hauer
Hi Matt, On Fri, Apr 14, 2017 at 11:32:05AM -0700, Matt Reimer wrote: > BCH error detection and correction was only looking at the first > of four syndrome polynomials, which meant it was failing to detect > and correct bitflips in the last 3/4 of the data. In effect, only > the first 512 bytes of

[PATCH] state: backend_storage: Set needs_refresh back to 0 after refreshing

2017-04-19 Thread Sascha Hauer
Set needs_refresh back to 0 after refreshing so that we do not refresh it again without need. This would only happen when we read the state from the storage multiple times, which normally is not the case. However, it's more consistent like this. Reported-by: Sam Ravnborg Signed-off-by: Sascha Hau

[PATCH] state: backend_bucket_circular: Do not leak memory

2017-04-19 Thread Sascha Hauer
buf was just allocated, free it before returning an error. Reported-by: Sam Ravnborg Signed-off-by: Sascha Hauer --- common/state/backend_bucket_circular.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bu

Re: cp: incorrect behaviour when copying recursively

2017-04-19 Thread Sascha Hauer
Hi Peter, On Fri, Apr 14, 2017 at 01:10:51PM +0300, Peter Mamonov wrote: > Hi, > > The "cp -r " command omits top directory, when the trailing "/" is > present in the string. Here is the test case: I can confirm that. It turned out this is because we used GNU basename in barebox, but we shoul

[PATCH 2/3] cp: Use posix_basename() on source argument

2017-04-19 Thread Sascha Hauer
The GNU basename version does not work with strings which have a trailing slash. Use posix_basename instead. With this cp -r can properly work on source arguments which have a trailing slash, i.e. "cp /dir1/ dst". Reported-by: Peter Mamonov Signed-off-by: Sascha Hauer --- commands/cp.c | 3 ++-

[PATCH 1/3] libgen: implement posix_basename

2017-04-19 Thread Sascha Hauer
There are two different versions of basename(): The GNU version and the POSIX version. The GNU version never modifies its argument and returns the empty string when path has a trailing slash, and in particular also when it is "/". The POSIX version modifies its argument and thus works properly with

[PATCH 3/3] commands: basename: Use posix_basename()

2017-04-19 Thread Sascha Hauer
The Linux shell basename command uses the POSIX basename version, so the same for barebox. Signed-off-by: Sascha Hauer --- commands/basename.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/basename.c b/commands/basename.c index 028b0e0f24..c1a28e9e1d 100644 --- a/c