[PATCH] readline: make ctrl-u to work like linux console

2019-10-15 Thread sendpatch
From: DU HUANPENG currtly, the ctrl-u discards the whole line, in most linux boxes, ctrl-u just erase characters before cursor to the begginning of the line. this patch make ctrl-u to do this. Signed-off-by: DU HUANPENG --- lib/readline.c | 34 +++--- 1 file

Re: [PATCH] readline: make ctrl-u to work like linux console

2019-10-15 Thread duhuanpeng
> currtly, the ctrl-u discards the whole line, in most linux > boxes, ctrl-u just remove character before cursor. > this patch make ctrl-u to do this. Hello, sorry for the typo, it should be characters. Regards, duhuanpeng ___ barebox mailing list

[PATCH v2] MIPS: init cache before using it

2019-10-15 Thread Oleksij Rempel
flush_cache_all() uses 'struct cpuinfo_mips current_cpu_data' data fields. These data fields are initialized in r4k_cache_init(). However in the current implementation the r4k_cache_init() function is called __AFTER__ relocate_code(). Suggested-by: Antony Pavlov Signed-off-by: Oleksij Rempel

[PATCH] kbuild: remove ar-option

2019-10-15 Thread Masahiro Yamada
Linux commit 13dc8c029cab ("kbuild: remove ar-option and KBUILD_ARFLAGS") removed this already. Barebox has never used this macro. Signed-off-by: Masahiro Yamada --- scripts/Kbuild.include | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include

Re: [PATCH] MIPS: init cache before flashing it

2019-10-15 Thread Oleksij Rempel
On Tue, Oct 15, 2019 at 11:41:06PM +0300, Antony Pavlov wrote: > On Tue, 15 Oct 2019 18:09:45 +0200 > Oleksij Rempel wrote: > > Hi! > > Please review this thread > http://lists.infradead.org/pipermail/barebox/2019-June/038530.html > AFAIR we have to clear BSS before calling r4k_cache_init().

Re: [PATCH] MIPS: init cache before flashing it

2019-10-15 Thread Oleksij Rempel
Hi Antony, On Tue, Oct 15, 2019 at 11:41:06PM +0300, Antony Pavlov wrote: > On Tue, 15 Oct 2019 18:09:45 +0200 > Oleksij Rempel wrote: > > Hi! > > Please review this thread > http://lists.infradead.org/pipermail/barebox/2019-June/038530.html > AFAIR we have to clear BSS before calling

[PATCH] readline: make ctrl-u to work like linux console

2019-10-15 Thread sendpatch
From: DU HUANPENG currtly, the ctrl-u discards the whole line, in most linux boxes, ctrl-u just remove character before cursor. this patch make ctrl-u to do this. Signed-off-by: DU HUANPENG --- lib/readline.c | 34 +++--- 1 file changed, 31 insertions(+), 3

[PATCH] readline: make ctrl-u to work like linux console

2019-10-15 Thread sendpatch
From: DU HUANPENG currtly, the ctrl-u discards the whole line, in most linux boxes, ctrl-u just remove character before cursor. this patch make ctrl-u to do this. Signed-off-by: DU HUANPENG --- lib/readline.c | 34 +++--- 1 file changed, 31 insertions(+), 3

readling, ctrl-u is not working like linux console

2019-10-15 Thread duhuanpeng
Hi, I find it the barebox console's ctrl-u is not working like my linux host. for now, the barebox's ctrl-u discard the whole line. but the linux consle just remove characters before cursor. is the barebox ctrl-u follows any standard, if not, how about make it just works like linux(ah, it is gnu

[PATCH] readline: make ctrl-u to work like linux console

2019-10-15 Thread sendpatch
From: DU HUANPENG currtly, the ctrl-u discards the whole line, in most linux boxes, ctrl-u just remove character before cursor. this patch make ctrl-u to do this. Signed-off-by: DU HUANPENG --- lib/readline.c | 31 +-- 1 file changed, 29 insertions(+), 2

Re: setup for a working framebuffer in qemu

2019-10-15 Thread Antony Pavlov
On Tue, 15 Oct 2019 17:08:42 +0200 Denis Roio wrote: > > hi all! noob question here, hope you don't mind > > is there a recommended, matching configuration to run barebox in qemu > with a working /dev/fb0 ? > > > I have made some tries already with no success: > > - qemu emulated mips-malta

Re: [PATCH] MIPS: init cache before flashing it

2019-10-15 Thread Antony Pavlov
On Tue, 15 Oct 2019 18:09:45 +0200 Oleksij Rempel wrote: Hi! Please review this thread http://lists.infradead.org/pipermail/barebox/2019-June/038530.html AFAIR we have to clear BSS before calling r4k_cache_init(). -- Best regards,   Antony Pavlov > Cache information was not initialized on

[PATCH] console_simple: fix linking error when ARCH_HAS_CTRLC enabled

2019-10-15 Thread iu87m888m
From: DU HUANPENG this error happens in sandbox with simple console, sandbox has ARCH_HAS_CTRLC enabled by default $ make sandbox_defconfig $ make menuconfig (select CONFIG_SHELL_SIMPLE) $ make LD barebox common/built-in.o: In function `__pr_memory_display':

Re: [PATCH] fix compile error when set CONFIG_CONSOLE_SIMPLE=y

2019-10-15 Thread duhuanpeng
Hi, my patch didn't work with sanbox. maybe I missed understand the macro ARCH_HAS_CTRLC I will fix it and send a new patch soon. sorry. du huanpeng ___ barebox mailing list barebox@lists.infradead.org

[PATCH] MIPS: init cache before flashing it

2019-10-15 Thread Oleksij Rempel
Cache information was not initialized on flush_cache_all(). This was the reason for relatively slow boot speed on MIPS. Signed-off-by: Oleksij Rempel --- arch/mips/lib/reloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c index

[PATCH] libfile: copy_file: prevent spurious error message

2019-10-15 Thread Robert Karszniewicz
Signed-off-by: Robert Karszniewicz --- lib/libfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libfile.c b/lib/libfile.c index 3f3ec21..319e66b 100644 --- a/lib/libfile.c +++ b/lib/libfile.c @@ -349,6 +349,7 @@ int copy_file(const char *src, const char *dst, int verbose)

Re: setup for a working framebuffer in qemu

2019-10-15 Thread Ahmad Fatoum
Hello Denis, On 10/15/19 5:08 PM, Denis Roio wrote: > > hi all! noob question here, hope you don't mind > > is there a recommended, matching configuration to run barebox in qemu > with a working /dev/fb0 ? Easiest way is to use barebox sandbox. It has a SDL fb driver. > > > I have made some

setup for a working framebuffer in qemu

2019-10-15 Thread Denis Roio
hi all! noob question here, hope you don't mind is there a recommended, matching configuration to run barebox in qemu with a working /dev/fb0 ? I have made some tries already with no success: - qemu emulated mips-malta boots, but no fb0 - qemu emulated vexpress boots, but no fb0 - qemu

Re: MFGTools from NXP

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 4:41 PM, Mihaita Ivascu wrote: > barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/ fastboot devices -l That's what you run on your host system, not on the target. -- Pengutronix e.K. | | Industrial Linux Solutions |

Re: MFGTools from NXP

2019-10-15 Thread Mihaita Ivascu
Hello, Thanks for your link. I have tried and got to the step shown in the attachment. Looked here: https://www.barebox.org/doc/latest/user/usb.html#usb-gadget-autostart-support did not understand how to create and execute a script from the host. For me the imx6ul board must be in

Re: MFGTools from NXP

2019-10-15 Thread Ahmad Fatoum
Hello, On 10/15/19 4:07 PM, Mihaita Ivascu wrote: > Hello, > >does anyone have experience with using imx_usb_loader to flash the > barebox on a NAND(mtd partition)? If yes some reference scripts would > be helpful for me. Or where should I look for an example? Check out this thread:

Re: MFGTools from NXP

2019-10-15 Thread Mihaita Ivascu
Hello, does anyone have experience with using imx_usb_loader to flash the barebox on a NAND(mtd partition)? If yes some reference scripts would be helpful for me. Or where should I look for an example? Thanks, Mihaita Ivascu On Mon, Oct 14, 2019 at 3:07 PM Mihaita Ivascu wrote: > >

Re: [PATCH 2/5] scripts: Add rsatoc tool

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 3:15 PM, Sascha Hauer wrote: > On Tue, Oct 15, 2019 at 12:21:31PM +0200, Ahmad Fatoum wrote: >> Hello Sascha, >> >> On 10/15/19 9:55 AM, Sascha Hauer wrote: >>> The rsatoc tool converts rsa public keys into C structs suitable to >>> compile with barebox. Most of the openssl rsa related

Re: [PATCH 2/5] scripts: Add rsatoc tool

2019-10-15 Thread Sascha Hauer
On Tue, Oct 15, 2019 at 12:21:31PM +0200, Ahmad Fatoum wrote: > Hello Sascha, > > On 10/15/19 9:55 AM, Sascha Hauer wrote: > > The rsatoc tool converts rsa public keys into C structs suitable to > > compile with barebox. Most of the openssl rsa related stuff has been > > taken from the U-Boot

Re: imx7d enable second core

2019-10-15 Thread Ahmad Fatoum
Hello Giorgio, On 10/15/19 2:11 PM, Giorgio Dal Molin wrote: > Hi Ahmad, > > thanks for answering, > > actually I've already done some tests with the 'smc' DEBUG command but I think > and the results I got are not the expected ones. > > (I must admit I'm not really an expert upon this PSCI

Re: imx7d enable second core

2019-10-15 Thread Giorgio Dal Molin
Hi Ahmad, thanks for answering, actually I've already done some tests with the 'smc' DEBUG command but I think and the results I got are not the expected ones. (I must admit I'm not really an expert upon this PSCI subsystem of the imx7, so I could be making some trivial errors...) For example,

Re: imx7d enable second core

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 1:37 PM, Ahmad Fatoum wrote: > If you #define DEBUG in arch/arm/cpu/psci.c, a smc command is enabled that can > be used to test ARM_PSCI_0_2_CPU_ON. This might aid you in your debug effort. Should've added that I don't have an answer for your original question, just figured I should

Re: imx7d enable second core

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 1:29 PM, Giorgio Dal Molin wrote: > Hi, > > can anyone please confirm that a recent barebox version (v2019.10 or v2019.09) > is able to boot a linux kernel so that it can enable the second cpu core ? If you #define DEBUG in arch/arm/cpu/psci.c, a smc command is enabled that can be

imx7d enable second core

2019-10-15 Thread Giorgio Dal Molin
Hi, can anyone please confirm that a recent barebox version (v2019.10 or v2019.09) is able to boot a linux kernel so that it can enable the second cpu core ? It actually used to work in the past but now I only get one core running: Loading ARM Linux zImage '/mnt/boot/kernel.img' Loading

Re: [PATCH 2/5] scripts: Add rsatoc tool

2019-10-15 Thread Ahmad Fatoum
Hello Sascha, On 10/15/19 9:55 AM, Sascha Hauer wrote: > The rsatoc tool converts rsa public keys into C structs suitable to > compile with barebox. Most of the openssl rsa related stuff has been > taken from the U-Boot mkimage tool. I don't have any FIT image or RSA options enabled, yet my

[PATCH v2 2/3] mci: add support for stm32mp sd/mmc controller

2019-10-15 Thread Oleksij Rempel
This driver was ported from u-boot v2019.10. Instead of devicetree compatible it is using ARM AMBA id. So, there is no need to patch devicetree with different compatible as it was implemented in u-boot. Signed-off-by: Oleksij Rempel --- drivers/mci/Kconfig| 8 + drivers/mci/Makefile

[PATCH v2 1/3] ARM: stm32mp: enable ARM_AMBA

2019-10-15 Thread Oleksij Rempel
It is needed for mci/sd/mmc driver. Signed-off-by: Oleksij Rempel --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 30a380f2f2..5e110bfff7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -199,6 +199,7 @@ config

[PATCH v2 3/3] ARM: dts: stm32mp157a-dk1: overwrite regulator for sdmmc node

2019-10-15 Thread Oleksij Rempel
There is currently no driver for the STPMIC1, which supplies the 3v3 rail into the SDMMC2. The regulator is on on boot though, so lets replace it with a fixed regulator till we have a regulator driver for the STPMIC1. Signed-off-by: Oleksij Rempel [afa: replaced /delete-node/ with

v2019.10.0

2019-10-15 Thread Sascha Hauer
Hi All, I just released our October Release barebox-2019.10.0. The STM32MP1 support continues to evolve, this time we have I2C, watchdog and PMIC drivers. The OMAP Nand driver gained BCH16 support and with it support for the Error Location Module (ELM). One bug fixed that someone might have

Re: [PATCH 4/5] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 9:59 AM, Sascha Hauer wrote: > On Tue, Oct 15, 2019 at 08:58:23AM +0200, Ahmad Fatoum wrote: >> Hello, >> >> On 10/14/19 2:51 PM, Sascha Hauer wrote: >>> On Mon, Oct 14, 2019 at 08:39:21AM +0200, Ahmad Fatoum wrote: Now with the SD/MMC controller supported, lets add a bbu handler,

[PATCH] fixup! ARM: at91: build for all SoCs when AT91_MULTI_BOARDS is selected

2019-10-15 Thread Ahmad Fatoum
This reverts a hunk I missed after a rebase: A previous commit restricts ARCH_BAREBOX_MAX_BARE_INIT to only non-multi-image boards, so no need to touch it to be compatible with the new multi-image changes. --- arch/arm/mach-at91/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH 4/5] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-15 Thread Sascha Hauer
On Tue, Oct 15, 2019 at 08:58:23AM +0200, Ahmad Fatoum wrote: > Hello, > > On 10/14/19 2:51 PM, Sascha Hauer wrote: > > On Mon, Oct 14, 2019 at 08:39:21AM +0200, Ahmad Fatoum wrote: > >> Now with the SD/MMC controller supported, lets add a bbu handler, so we > >> can use it to update the second

[PATCH 4/5] rsa: Allow to directly compile in rsa public keys

2019-10-15 Thread Sascha Hauer
So far we relied on the U-Boot mkimage tool to generate us device tree snippets containing rsa public keys which we then compiled into barebox. Make this easier and allow to directly specify a filename or PKCS#11 URI in Kconfig. With this we no longer need the U-Boot mkimage tool here and no more

[PATCH 1/5] Kbuild: Add config_filename macro from kernel

2019-10-15 Thread Sascha Hauer
The config_filename allows to extract a filename from a Kconfig string option. Signed-off-by: Sascha Hauer --- scripts/Kbuild.include | 49 ++ 1 file changed, 49 insertions(+) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index

[PATCH 5/5] fit-image: Use compiled-in keys

2019-10-15 Thread Sascha Hauer
The compiled-in keys can be retrieved with rsa_get_key(). Try to use them first before falling back to looking up the keys in the device tree. Signed-off-by: Sascha Hauer --- common/image-fit.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git

[PATCH 3/5] rsa: let rsa_of_read_key() return a fully allocated key

2019-10-15 Thread Sascha Hauer
Until now rsa_of_read_key() took a pointer to a key and filled the struct rsa_public_key members with allocated values. So far we have never freed these values. Change rsa_of_read_key() to always return a fully allocated key and provide rsa_key_free() to free it. Let the FIT image code free the

[PATCH 0/5] Allow to compile in rsa public keys directly

2019-10-15 Thread Sascha Hauer
So far we relied on U-Boots mkimage tool to generate dts snippets from RSA public keys which are then compiled into barebox. This series simplifies this by allowing to compile in RSA public keys directly into barebox. Keys are retrieved from certificate files in PEM format or from PKCS#11 URIs.

Re: [PATCH 4/5] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-15 Thread Ahmad Fatoum
Hello, On 10/14/19 2:51 PM, Sascha Hauer wrote: > On Mon, Oct 14, 2019 at 08:39:21AM +0200, Ahmad Fatoum wrote: >> Now with the SD/MMC controller supported, lets add a bbu handler, so we >> can use it to update the second stage boot loader partition. >> >> Signed-off-by: Ahmad Fatoum >> --- >>