[PATCH v2 1/3] MIPS: tplink-mr3020: use ar9331_pbl_generic_start

2019-01-22 Thread Oleksij Rempel
From: Oleksij Rempel most ar9331 boards are almost identical. Remove as match duplicate code as possible. Signed-off-by: Oleksij Rempel --- arch/mips/boards/tplink-mr3020/lowlevel.S | 29 +-- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git

[PATCH v2 3/3] MIPS: ath79: add spi and sram bootstrap helpers

2019-01-22 Thread Oleksij Rempel
From: Oleksij Rempel At least some ath79 SoC have build in 32K RAM. It allow us to use lowlevel portion of barebox to bootstrap the system by using JTAG debugger (For example OpenOCD). Since ath79 has no reliable way to stop the CPU execution before reading SPI Flash, this can cause different

[PATCH v2 2/3] MIPS: black-swift: use ar9331_pbl_generic_start

2019-01-22 Thread Oleksij Rempel
From: Oleksij Rempel most ar9331 boards are almost identical. Remove as match duplicate code as possible. Signed-off-by: Oleksij Rempel --- arch/mips/boards/black-swift/lowlevel.S | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git

[PATCH v2 0/3] ath79: enhancements

2019-01-22 Thread Oleksij Rempel
changes v2 20190123: - squash bootstrap helper patches to one patch - rename helper macro - Add more comments Oleksij Rempel (3): MIPS: tplink-mr3020: use ar9331_pbl_generic_start MIPS: black-swift: use ar9331_pbl_generic_start MIPS: ath79: add spi and sram bootstrap helpers

[PATCH 7/7] misc: mem: Set correct size for /dev/mem

2019-01-22 Thread Andrey Smirnov
On 64-bit platfoms /dev/mem should have the size of 2^64 bytes, not 2^63 which would result from using S64_MAX. This also has a side effect of setting "size" in FILE to FILE_SIZE_STREAM, disabling a number of codepaths that are not applicable to /dev/mem anyway (see __read() and __write()).

[PATCH 6/7] fs: Add support for files larger than MAX_LFS_FILESIZE

2019-01-22 Thread Andrey Smirnov
On 64-bit platforms /dev/mem exceeds the size supported by loff_t and needs special treatment within the rest of FS API. Specifically lseek() needs to be modified to make sure it does the right thing. Prievious attempt at fixing this issue by using IS_ERR_VALUE() e10efc5080 ("fs: fix memory

[PATCH 2/7] commands: Get rid of mem_rw_buf

2019-01-22 Thread Andrey Smirnov
There doesn't seem to be any good reason for all of the memory commands (md, mw, etc.) to rely on a shared pre-allocated buffer anymore. So, to simplify things, drop the shared buffer and adjust all of the utilites to allocate needed memory. Signed-off-by: Andrey Smirnov --- commands/md.c |

[PATCH 4/7] fs: Change error checking logic for fsdrv->lseek() call

2019-01-22 Thread Andrey Smirnov
On 32-bit systems, cheking for IS_ERR_VALUE(pos) is not correct. Expanding that code we get (loff_t cast is added for clarity): (loff_t)pos >= (unsigned long)-MAX_ERRNO given that loff_t is a 64-bit signed value, any perfectly valid seek offset that is greater than 0xc000 will result in

[PATCH 5/7] fs: Calculate new position before validtiy check in lseek()

2019-01-22 Thread Andrey Smirnov
Calculate new position before validtiy check in lseek() to simplify code a bit as well as make following commit simpler. This should be harmless thing to do, since we don't actually use calculated value unless it passes the validity check. Signed-off-by: Andrey Smirnov --- fs/fs.c | 8

[PATCH 0/7] 32-bit lseek and /dev/mem fixes/improvements

2019-01-22 Thread Andrey Smirnov
Everyone: This series is a result of my attempt to fix a regression in lseek() on 32-bit platforms. The regression manifested in lseek() unable to seek past ~4GiB mark caused and was caused by usage of IS_ERR_VALUE() (see commit messages for more detailed explanation). My goal was to both get rid

[PATCH 3/7] commands: Move /dev/mem driver to drivers/misc

2019-01-22 Thread Andrey Smirnov
With all other code gone from commands/mem.c, move it into driver/misc, where it fits better. While at it, expose it directly via a Kconfig options instead of relying on CONFIG_COMPILE_MEMORY Signed-off-by: Andrey Smirnov --- commands/Kconfig | 17 -- commands/Makefile | 1 -

[PATCH 1/7] commands: Move mem_parse_options() to lib/misc.c

2019-01-22 Thread Andrey Smirnov
As a first step of de-cluttering /dev/mem related code, move mem_parse_options() out of commands/mem.c into lib/misc.c where it seem to fit better. With this change we no longer explicitly turn this code off using CONFIG_COMPILE_MEMORY and instead rely on LTO to get rid of it when it's not being

Re: [PATCH 1/2] ARM: zii-vf610-dev: fix boot from SD

2019-01-22 Thread Andrey Smirnov
On Tue, Jan 22, 2019 at 9:07 AM Vivien Didelot wrote: > > Hi Sascha, > > On Tue, 22 Jan 2019 08:40:03 +0100, Sascha Hauer > wrote: > > On Mon, Jan 21, 2019 at 12:53:04PM -0500, Vivien Didelot wrote: > > > VF610 Dev Rev B and VF610 Dev Rev C boot from SD card attached to > > > SDHCI1, and CFU1,

[PATCH v2] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning

2019-01-22 Thread Antony Pavlov
The patch fixes the following compiler's warning: In file included from include/common.h:33:0, from arch/arm/mach-zynq/zynq.c:18: arch/arm/include/asm/io.h:4:0: warning: "IO_SPACE_LIMIT" redefined #define IO_SPACE_LIMIT 0 In file included from arch/arm/mach-zynq/zynq.c:17:0:

Re: [PATCH 1/2] ARM: zii-vf610-dev: fix boot from SD

2019-01-22 Thread Sascha Hauer
On Tue, Jan 22, 2019 at 12:07:02PM -0500, Vivien Didelot wrote: > Hi Sascha, > > On Tue, 22 Jan 2019 08:40:03 +0100, Sascha Hauer > wrote: > > On Mon, Jan 21, 2019 at 12:53:04PM -0500, Vivien Didelot wrote: > > > VF610 Dev Rev B and VF610 Dev Rev C boot from SD card attached to > > > SDHCI1,

Re: [PATCH 1/2] ARM: zii-vf610-dev: fix boot from SD

2019-01-22 Thread Vivien Didelot
Hi Sascha, On Tue, 22 Jan 2019 08:40:03 +0100, Sascha Hauer wrote: > On Mon, Jan 21, 2019 at 12:53:04PM -0500, Vivien Didelot wrote: > > VF610 Dev Rev B and VF610 Dev Rev C boot from SD card attached to > > SDHCI1, and CFU1, SPU3 and SCU4 boot from eMMC attached to SDHCI2. > > > > Since

Re: [HELP] Barebox porting

2019-01-22 Thread Seraphim Dolbilov
How can I get an output of a shell command in hush shell? Backticks and $() cannot do not work :( --  Yours sincerely, Seraphim Dolbilov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

Re: [HELP] Barebox porting

2019-01-22 Thread Sascha Hauer
On Tue, Jan 22, 2019 at 05:07:23PM +0300, Seraphim Dolbilov wrote: > Hi, Sascha > > 22.01.2019, 09:33, "Sascha Hauer" : > > This only works when you want to add something to the environment for > > all boards. When you only want to change the environment for a single > > board then

Re: [HELP] Barebox porting

2019-01-22 Thread Seraphim Dolbilov
Hi, Sascha 22.01.2019, 09:33, "Sascha Hauer" : > This only works when you want to add something to the environment for > all boards. When you only want to change the environment for a single > board then defaultenv_append_directory() is the right choice. Thanks, did so! However, environment is

Re: [PATCH] imd: model and compatible missing in metadata

2019-01-22 Thread Uwe Kleine-König
Hello, On Tue, Jan 22, 2019 at 09:10:40AM +0100, Scherer, Thorsten wrote: > i spent some time trying to understand the usage of imd_used etc. > > In another reply I stated: > > 'I misread the documenation on IMD as "of_compatible and model will be > figured out and put into the proper location

Re: [PATCH] imd: model and compatible missing in metadata

2019-01-22 Thread Scherer, Thorsten
Hello, i spent some time trying to understand the usage of imd_used etc. In another reply I stated: 'I misread the documenation on IMD as "of_compatible and model will be figured out and put into the proper location by barebox".' I am not so sure, if that is really the case. As far as i

Re: [PATCH 1/3] kbuild: cherry-pick changes from Linux v5.0-rc3

2019-01-22 Thread Sascha Hauer
On Tue, Jan 22, 2019 at 01:25:10AM +0900, Masahiro Yamada wrote: > Not synced completely. > > Just cherry-picking low-hanging fruits. > > 0b35786d77ba kbuild: call make once for all targets when O=.. is used > 5e54d5e5fbc1 kbuild: kill EXTRA_ARFLAGS > 836caba77c29 kbuild: kill backward