Re: [PATCH 1/2] block: Do not write past block device boundary during a flush

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 10:06:24PM -0800, Andrey Smirnov wrote: > When calling I/O functions of underlying block device driver we always > need to make sure that its size is small enough to not go past > device's boundary. Not only in get_chunk() and block_cache(), but in > writebuffer_flush() as

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

2019-01-21 Thread Sascha Hauer
Hi Vivien, 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 5f99a8d40305 ("dts: VFxxx: Add aliases for ESDHC controllers"), > these

Re: [PATCH v3 1/3] fs/nfs: don't try to set nfs error code from mount rpc call

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 12:27:30PM +0100, Uwe Kleine-König wrote: > A packet from a mount rpc call doesn't have an NFS error field, so don't > try to access this. > > In the case of the MOUNT_UMOUNT procedure the reply package is short > such that accessing the u32 after the rpc_reply structure

Re: [PATCH] MIPS: drop *_MULTI_BOARDS atavisms

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 01:18:53PM +0300, Antony Pavlov wrote: > Signed-off-by: Antony Pavlov > --- > arch/mips/configs/ath79_defconfig | 1 - > arch/mips/configs/qemu-malta_defconfig | 1 - > arch/mips/mach-malta/Kconfig | 8 > 3 files changed, 10 deletions(-) >

Re: [PATCH v2] ubi: prevent null pointer reference

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 05:56:16PM +0100, Roland Hieber wrote: > After flashing a bogus UBI image, e.g. when the UBI is bigger than the > available flash size, it can happen that barebox hangs itself with a > stacktrace when the board code or the environment does a ubi_attach() on > boot: > >

Re: [HELP] Barebox porting

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 05:35:03PM +0100, Sam Ravnborg wrote: > On Mon, Jan 21, 2019 at 04:12:32PM +0100, Sascha Hauer wrote: > > On Mon, Jan 21, 2019 at 03:34:49PM +0300, Seraphim Dolbilov wrote: > > > Hi friends, > > > > > > I need some help with barebox environment management. I've added > >

[PATCH 2/2] block: Move shared code in get_chunk() out of if statement

2019-01-21 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- common/block.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/block.c b/common/block.c index 3a031a4fc..291721876 100644 --- a/common/block.c +++ b/common/block.c @@ -133,13 +133,12 @@ static struct chunk *get_chunk(struct

[PATCH 1/2] block: Do not write past block device boundary during a flush

2019-01-21 Thread Andrey Smirnov
When calling I/O functions of underlying block device driver we always need to make sure that its size is small enough to not go past device's boundary. Not only in get_chunk() and block_cache(), but in writebuffer_flush() as well. Since the same code is used in three different places, move it

[PATCH 2/2] ARM: zii-vf610-dev: boot initrd from SD

2019-01-21 Thread Vivien Didelot
As for tftp, make use of the initramfs if one is present on the SD card. Signed-off-by: Vivien Didelot --- .../boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd| 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd

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

2019-01-21 Thread Vivien Didelot
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 5f99a8d40305 ("dts: VFxxx: Add aliases for ESDHC controllers"), these devices were renamed from mci0 and mci1 to mmc1 and mmc2. To fix this, completely drop

[PATCH v2] ubi: prevent null pointer reference

2019-01-21 Thread Roland Hieber
After flashing a bogus UBI image, e.g. when the UBI is bigger than the available flash size, it can happen that barebox hangs itself with a stacktrace when the board code or the environment does a ubi_attach() on boot: ERROR: ubi0 error: init_volumes: not enough PEBs, required 7478, available

Re: [PATCH] ubi: prevent null pointer reference

2019-01-21 Thread Roland Hieber
On Mon, Jan 21, 2019 at 05:29:26PM +0100, Roland Hieber wrote: > diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c > index 6959564a13..68302f4a33 100644 > --- a/drivers/mtd/ubi/vtbl.c > +++ b/drivers/mtd/ubi/vtbl.c > @@ -850,6 +850,12 @@ int ubi_read_volume_table(struct ubi_device *ubi,

Re: [PATCH] ARM: zii-vf610-dev: fix boot sd

2019-01-21 Thread Vivien Didelot
Hi Andrey, On Sat, 19 Jan 2019 12:39:45 -0800, Andrey Smirnov wrote: > On Fri, Jan 18, 2019 at 4:51 PM Vivien Didelot > wrote: > > > > The 'sd' boot is currently broken on zii-vf610-dev because there are no > > mci devices (anymore?), only mmc. > > Yeah, I forgot to update this part in

Re: [HELP] Barebox porting

2019-01-21 Thread Seraphim Dolbilov
21.01.2019, 19:35, "Sam Ravnborg" : > Or even better I think to add the path to: > DEFAULT_ENVIRONMENT_PATH Got that. However this option seems to be not so universal as if env is linked straight to binary image. --  Yours sincerely, Seraphim Dolbilov

Re: [HELP] Barebox porting

2019-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2019 at 04:12:32PM +0100, Sascha Hauer wrote: > On Mon, Jan 21, 2019 at 03:34:49PM +0300, Seraphim Dolbilov wrote: > > Hi friends, > > > > I need some help with barebox environment management. I've added env/config > > file > > to arch/arm/myboard/ directory, fixed Makefile with

[PATCH] ubi: prevent null pointer reference

2019-01-21 Thread Roland Hieber
After flashing a bogus UBI image, e.g. an image that is larger than the available flash size, it can happen that barebox hangs itself with a stacktrace when the board code or the environment does a ubi_attach() on boot: ERROR: ubi0 error: init_volumes: not enough PEBs, required 7478,

[PATCH 3/3] kconfig.h: update to v4.16-rc2

2019-01-21 Thread Masahiro Yamada
I intentionally copied this from a little bit old kernel version because Barebox cannot import commit 101110f6271c ("Kbuild: always define endianess in kconfig.h"). Signed-off-by: Masahiro Yamada --- include/linux/kconfig.h | 53 ++--- 1 file

[PATCH 2/3] scripts: fixdep: update to v5.0-rc3

2019-01-21 Thread Masahiro Yamada
The previous sync was commit c478aa16b191 ("scripts: fixdep: update from v3.10-rc1"). This updates it to Linux 5.0-rc3. It works for barebox as is. The code is much cleaner and optimized. Signed-off-by: Masahiro Yamada --- scripts/basic/fixdep.c | 331

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

2019-01-21 Thread Masahiro Yamada
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 compatibility checks 3156fd0529b5 kbuild: fix some minor typoes

Re: [HELP] Barebox porting

2019-01-21 Thread Seraphim Dolbilov
21.01.2019, 18:12, "Sascha Hauer" : > with bbenv-y it is only compiled it, but remains unused. You have to add > it using defaultenv_append_directory(). Well, it seems, I've solved this problem by adding path to my board's env to CONFIG_DEFAULT_ENVIRONMENT_PATH (without bbenv-y entry in

Re: [HELP] Barebox porting

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 03:34:49PM +0300, Seraphim Dolbilov wrote: > Hi friends, > > I need some help with barebox environment management. I've added env/config > file > to arch/arm/myboard/ directory, fixed Makefile with `bbenv-y += env` string, > but > this config file doesn't apply on

Re: [HELP] Barebox porting

2019-01-21 Thread Seraphim Dolbilov
Dear friends, Still cannot make my environment be compiled into barebox final image. Maybe I missed something? Which config parameters should be set to do this?.. --  Yours sincerely, Seraphim Dolbilov ___ barebox mailing list

Re: [HELP] Barebox porting

2019-01-21 Thread Seraphim Dolbilov
Hi friends, I need some help with barebox environment management. I've added env/config file to arch/arm/myboard/ directory, fixed Makefile with `bbenv-y += env` string, but this config file doesn't apply on barebox boots. What can be the reason for such a problem? -- Yours sincerely, Seraphim

[PATCH v3 3/3] fs/nfs: stop using a global variable for nfs packet payload

2019-01-21 Thread Uwe Kleine-König
The lifetime of the data provided by a global variable is hard to track. So move the data pointer into the nfs_priv structure and let rpc_req return the data to its callers which in turn are responsible to free it. The callers are changed to use a local variable accordingly. This makes it

[PATCH v3 1/3] fs/nfs: don't try to set nfs error code from mount rpc call

2019-01-21 Thread Uwe Kleine-König
A packet from a mount rpc call doesn't have an NFS error field, so don't try to access this. In the case of the MOUNT_UMOUNT procedure the reply package is short such that accessing the u32 after the rpc_reply structure is already after the end of the packet. Apart from the access to

[PATCH v3 2/3] fs/nfs: copy data from rpc replies to local storage

2019-01-21 Thread Uwe Kleine-König
The nfs code uses data provided to the packet handler after net_poll() returned. But the life time of this data already ended when net_poll() returns. Most of the time it is possible to get away here but on i.MX28 the data is overwritten since commit 82ec28929cc9 ("net: fec_imx: Do not use DMA

[PATCH] MIPS: drop *_MULTI_BOARDS atavisms

2019-01-21 Thread Antony Pavlov
Signed-off-by: Antony Pavlov --- arch/mips/configs/ath79_defconfig | 1 - arch/mips/configs/qemu-malta_defconfig | 1 - arch/mips/mach-malta/Kconfig | 8 3 files changed, 10 deletions(-) diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig

Re: [PATCH 02/10] ARM: imx: delete unused mach/iomux-mx50.h

2019-01-21 Thread Sascha Hauer
On Mon, Jan 21, 2019 at 12:32:32PM +0300, Alexander Shiyan wrote: > >Понедельник, 21 января 2019, 11:55 +03:00 от Sascha Hauer > >: > > > >On Sun, Jan 20, 2019 at 01:35:25PM +0300, Alexander Shiyan wrote: > >> This removes the stale mach/iomux-mx50.h include as there is no user of it. > >> > >>

Re: [PATCH 02/10] ARM: imx: delete unused mach/iomux-mx50.h

2019-01-21 Thread Alexander Shiyan
>Понедельник, 21 января 2019, 11:55 +03:00 от Sascha Hauer >: > >On Sun, Jan 20, 2019 at 01:35:25PM +0300, Alexander Shiyan wrote: >> This removes the stale mach/iomux-mx50.h include as there is no user of it. >> >> Signed-off-by: Alexander Shiyan < shc_w...@mail.ru > >> --- >>

Re: [PATCH 02/10] ARM: imx: delete unused mach/iomux-mx50.h

2019-01-21 Thread Sascha Hauer
On Sun, Jan 20, 2019 at 01:35:25PM +0300, Alexander Shiyan wrote: > This removes the stale mach/iomux-mx50.h include as there is no user of it. > > Signed-off-by: Alexander Shiyan > --- > arch/arm/mach-imx/include/mach/iomux-mx50.h | 943 > > 1 file changed, 943

Re: [PATCH] boot: make it a little bit less verbose

2019-01-21 Thread Sascha Hauer
On Fri, Jan 18, 2019 at 07:50:51PM -0500, Vivien Didelot wrote: > The current boot code prints too much error messages without much value > in them. This patch prints the error string when it makes sense and > simplifies the return path of bootscript_boot(). Make use of pr_err() > in boot_entry()

Re: [PATCH] defaultenv-2: centralize nfs commands for 'net'

2019-01-21 Thread Sascha Hauer
On Fri, Jan 18, 2019 at 07:50:39PM -0500, Vivien Didelot wrote: > Setting the nfsroot variable as well as the kernel bootargs for the > interface used to reach the server is specific to nfs, which are used > only if there's no initramfs to load from tftp. Move these statements > within the

Re: [PATCH] defaultenv-2: trigger DHCP before booting 'net'

2019-01-21 Thread Sascha Hauer
On Fri, Jan 18, 2019 at 07:50:18PM -0500, Vivien Didelot wrote: > Some variables may be set from DHCP requests, as shown below: > > barebox@ZII VF610 Development Board, Rev C:/ echo $global.hostname > dev-rev-c > barebox@ZII VF610 Development Board, Rev C:/ echo $global.net.server >

Re: [PATCH 14/16] mtd: nand: Kill the chip->scan_bbt() hook

2019-01-21 Thread Sascha Hauer
On Sun, Oct 28, 2018 at 10:26:38PM +0100, Ladislav Michl wrote: > Linux commit e80eba758151 adapted for Barebox: > > None of the existing drivers are overloading the ->scan_bbt() > method, let's get rid of it and replace calls to ->scan_bbt() > by nand_create_bbt() ones. > > Signed-off-by: