Re: imx7d dual core boot

2020-03-26 Thread Ahmad Fatoum
Hello, On 3/26/20 11:21 AM, Giorgio wrote: > Hi, > > I'm having problems booting a linux kernel image on an imx7d. > > What I want is to boot in nonsecure mode and that the kernel enables the > second core with the PSCI. > > What I see is that barebox crashes within the call to

Re: [PATCH 1/1] boards: liteboard: add i.MX6ULL revision

2020-03-26 Thread Ahmad Fatoum
Hi, On 3/26/20 7:34 PM, Bartosz Bilas wrote: > These changes introduce support for Grinn i.MX6ULL liteBoard revision. > There are no other changes except the CPU therefore the existing > board directory was used. > > Signed-off-by: Bartosz Bilas > --- > arch/arm/boards/grinn-liteboard/board.c

[PATCH v2 3/4] usb: gadget: dfu: Progressive erase if file is a mtd

2020-03-26 Thread Jules Maselbas
When downloading a firmware into a big flash partition the erase operation can take a long time to be complete from few seconds to minutes in extreme cases. During the erase the DFU gadget does not respond to any USB setup request, the host only see a stalled USB endpoint and cannot get responses

[PATCH v2 4/4] usb: gadget: dfu: Fix DFU mode interface descriptor

2020-03-26 Thread Jules Maselbas
The gadget driver set the bInterfaceProtocol value to 1 in the DFU interface descriptor. However this value is used to indicate that the gadget is in run-time mode and not ready for DFU. When ready for DFU operation the bInterfaceProtocol value must be set to 2 (DFU mode). >From the DFU 1.1

[PATCH v2 1/4] usb: gadget: dfu: Reset global variables on unbind

2020-03-26 Thread Jules Maselbas
Global variables must be reset to their default value before a new dfu_bind is done. Otherwise things wont work and are likely to cause a system crash due to a use after free: the global dfu_files was still pointing deallocated structure after unbind. Signed-off-by: Jules Maselbas ---

[PATCH v2 2/4] usb: gadget: dfu: Add manifestation phase

2020-03-26 Thread Jules Maselbas
When downloading a firmware into a big flash partition the erase operation can take a long time to be complete from few seconds to minutes in extreme cases. During the erase the DFU gadget does not respond to any USB setup request, the host only see a stalled USB endpoint and cannot get responses

[PATCH v2 0/4] usb: gadget: dfu: Fix timeout on erase when using big partition

2020-03-26 Thread Jules Maselbas
Hi, The two first patch are focused on two fixes for an issue I encountered when trying to use the DFU gadget on big flash partition (2MB). You can find more information in each patch, but here is a short summary of the issue: When downloading a firmware into a big flash partition the erase

[PATCH 1/1] boards: liteboard: add i.MX6ULL revision

2020-03-26 Thread Bartosz Bilas
These changes introduce support for Grinn i.MX6ULL liteBoard revision. There are no other changes except the CPU therefore the existing board directory was used. Signed-off-by: Bartosz Bilas --- arch/arm/boards/grinn-liteboard/board.c | 4 +- .../flash-header-liteboard-256mb.imxcfg

Re: Cross-compiling target tools

2020-03-26 Thread Yegor Yefremov
Hi Ahmad, On Thu, Mar 26, 2020 at 5:00 PM Ahmad Fatoum wrote: > > Hi, > > On 3/26/20 4:31 PM, Yegor Yefremov wrote: > > On Thu, Mar 26, 2020 at 7:36 AM Sascha Hauer wrote: > > With these changes I get the tools bareboxenv-target etc. cross-compiled: > > > > diff --git a/scripts/compiler.h

Re: Cross-compiling target tools

2020-03-26 Thread Ahmad Fatoum
Hi, On 3/26/20 4:31 PM, Yegor Yefremov wrote: > On Thu, Mar 26, 2020 at 7:36 AM Sascha Hauer wrote: > With these changes I get the tools bareboxenv-target etc. cross-compiled: > > diff --git a/scripts/compiler.h b/scripts/compiler.h > index 0891c3bfa..74cd98074 100644 > --- a/scripts/compiler.h

Re: Cross-compiling target tools

2020-03-26 Thread Yegor Yefremov
On Thu, Mar 26, 2020 at 7:36 AM Sascha Hauer wrote: > > Hi Yegor, > > On Wed, Mar 25, 2020 at 11:13:03PM +0100, Yegor Yefremov wrote: > > How should one compile the target tools like bareboxenv-target etc. I > > get the following error: > > > > ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C

imx7d dual core boot

2020-03-26 Thread Giorgio
Hi, I'm having problems booting a linux kernel image on an imx7d. What I want is to boot in nonsecure mode and that the kernel enables the second core with the PSCI. What I see is that barebox crashes within the call to __mmu_cache_on() in the file arch/arm/cpu/sm.c: int

Re: [PATCH 2/3] usb: gadget: dfu: Progressive erase if file is a mtd

2020-03-26 Thread Jules Maselbas
Hi Sascha, On Thu, Mar 26, 2020 at 07:03:11AM +0100, Sascha Hauer wrote: > Hi Jules, > > > > > @@ -132,6 +134,10 @@ struct file_list_entry *dfu_file_entry; > > static int dfufd = -EINVAL; > > static struct file_list *dfu_files; > > static int dfudetach; > > +static struct mtd_info_user

Re: Cross-compiling target tools

2020-03-26 Thread Sascha Hauer
Hi Yegor, On Wed, Mar 25, 2020 at 11:13:03PM +0100, Yegor Yefremov wrote: > How should one compile the target tools like bareboxenv-target etc. I > get the following error: > > ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C debian/build > make: Entering directory >

Re: [PATCH 15/24] usb: net: Allocate rx buffer dynamically

2020-03-26 Thread Sascha Hauer
Hi Jules, On Wed, Mar 25, 2020 at 03:18:00PM +0100, Jules Maselbas wrote: > Hi Sascha, > > > + undev->rx_buf = dma_alloc(undev->rx_urb_size); > Looks like this buffer is never free, same for tx_buf. Right, thanks for noting. Fixed. Regards Sascha -- Pengutronix e.K.

Re: [PATCH 3/3] kconfig: update to Linux 5.5

2020-03-26 Thread Sascha Hauer
On Wed, Mar 25, 2020 at 03:34:18PM +0900, Masahiro Yamada wrote: > The previous sync was Linux 5.3-rc3. This updates Kconfig to Linux 5.5. > > Signed-off-by: Masahiro Yamada > --- > scripts/kconfig/Makefile| 10 +++--- > scripts/kconfig/conf.c | 13 - >

Re: [PATCH 2/3] kbuild: change *FLAGS_.o to take the path relative to $(obj)

2020-03-26 Thread Sascha Hauer
On Wed, Mar 25, 2020 at 03:30:19PM +0900, Masahiro Yamada wrote: > [ Linux commit 54b8ae66ae1a3454a7645d159a482c31cd89ab33 ] > > I introduced a new variable, target-stem, which can be used also from > explicit rules. > > Signed-off-by: Masahiro Yamada > --- > scripts/Makefile.host| 14

Re: [PATCH 1/3] kbuild: remove clean-dirs syntax

2020-03-26 Thread Sascha Hauer
On Wed, Mar 25, 2020 at 03:30:02PM +0900, Masahiro Yamada wrote: > [ Linux comit 1634f2bfdb846ed0a8b73131a9dff7c420fb3fe1 ] > > The only the difference between clean-files and clean-dirs is the -r > option passed to the 'rm' command. > > You can always pass -r, and then remove the clean-dirs

Re: [PATCH 3/3] usb: gadget: dfu: Reset global variables on unbind

2020-03-26 Thread Sascha Hauer
On Tue, Mar 24, 2020 at 04:46:47PM +0100, Jules Maselbas wrote: > Global variables must be reset to their default value before a new > dfu_bind is done. Otherwise things wont work and are likely to cause > a system crash due to a use after free: the global dfu_files was still > pointing

Re: [PATCH 2/3] usb: gadget: dfu: Progressive erase if file is a mtd

2020-03-26 Thread Sascha Hauer
Hi Jules, On Tue, Mar 24, 2020 at 04:46:46PM +0100, Jules Maselbas wrote: > When downloading a firmware into a big flash partition the erase > operation can take a long time to be complete from few seconds to > minutes in extreme cases. During the erase the DFU gadget does not > respond to any