Re: [PATCH 2/2] FIT: do not decompress ramdisks even if asked

2023-08-25 Thread Christian Eggers
till print a warning, so users can fix > their ITS. > > This aligns us with U-Boot's behavior[1]. > > [1]: https://git.yoctoproject.org/poky/commit/?h=kirkstone=2c58079222310 > [2]: https://github.com/u-boot/u-boot/commit/bddd985734653c366c8da073650930 > > Fixes: 2ab6780b80e3 ("

[PATCH] aiodev: port Linux vf610-adc driver

2023-08-25 Thread Christian Eggers
This driver works with the ADC on i.MX6SLX, i.MX6UL and i.MX6ULL. Port the Linux v6.4 driver of the peripheral to make them usable in barebox. Signed-off-by: Christian Eggers --- This port has been heavily inspired by the imx7d_adc driver, ported by Ahmad Fatoum. drivers/aiodev/Kconfig

FIT: support for compressed images breaks existing images

2023-08-25 Thread Christian Eggers
Hi Ahmad, On Wednesday, 23 August 2023, 18:32:06 CEST, Ahmad Fatoum wrote: > I need not tell you though that latest is greatest and all that ;) after rebasing my internal branch to v2023.8.0, my system doesn't boot anymore: Booting entry '/dev/nand0.root.ubi.kernel0' FIT: Opened FIT image:

Re: usbotg: otg_set_mode() can only be called once

2023-08-24 Thread Christian Eggers
Hello Ahmad, On Thursday, 24 August 2023, 15:23:17 CEST, Ahmad Fatoum wrote: > Hello Christian, > > On 24.08.23 14:04, Christian Eggers wrote: > > ok, I should better read the manuals ... > > > > "Once a specific mode has been selected it can't be changed later

Re: usbotg: otg_set_mode() can only be called once

2023-08-24 Thread Christian Eggers
single OTG. But probably I can use another criteria for choosing the correct boot methods instead of trying both. On Thursday, 24 August 2023, 13:30:46 CEST, Christian Eggers wrote: > Application: > > 1. Try to boot via fastboot (usb device) > 2. Try to boot via usb drive (

usbotg: otg_set_mode() can only be called once

2023-08-24 Thread Christian Eggers
Application: 1. Try to boot via fastboot (usb device) 2. Try to boot via usb drive (usb host) Problem: barebox@i.MX6ULL:/ setenv otg.mode=host imx-usb 2184000@2184000.of: USB EHCI 1.00 barebox@i.MX6ULL:/ setenv otg.mode=peripheral Cannot set parameter otg.mode: Device or resource busy

Re: aiodev: imx7_adc driver

2023-08-23 Thread Christian Eggers
, Christian On Wednesday, 23 August 2023, 18:25:05 CEST, Ahmad Fatoum wrote: > Hello Christian, > > On 23.08.23 17:05, Christian Eggers wrote: > > Seems that I found the answer myself: > > > > https://git.pengutronix.de/cgit/barebox/commit/?id=d353ffd5c6e6d4cee6eee72726125c96

Re: aiodev: imx7_adc driver

2023-08-23 Thread Christian Eggers
Seems that I found the answer myself: https://git.pengutronix.de/cgit/barebox/commit/?id=d353ffd5c6e6d4cee6eee72726125c965a0814f0 regards, Christian On Wednesday, 23 August 2023, 16:53:04 CEST, Christian Eggers wrote: > Hi Ahmad, > > I am currently porting the vf610_adc driver f

aiodev: imx7_adc driver

2023-08-23 Thread Christian Eggers
Hi Ahmad, I am currently porting the vf610_adc driver from Linux to Barebox. Must thing can be done similar as for the imx7_adc driver. I have one question about the reference voltage: static int imx7d_adc_enable(struct imx7d_adc *info) { ... ret = regulator_get_voltage(info->vref); ...

Re: [Barebox] Polling infrastructure causes reentrancy problem

2021-11-10 Thread Christian Eggers
Hi Sascha, On Monday, 8 November 2021, 11:34:26 CET, Sascha Hauer wrote: > Hi Christian, > > On Fri, Nov 05, 2021 at 01:40:52PM +0100, Christian Eggers wrote: > > Disclaimer: I stumbled over this on barebox 2020.01. > > I haven't tried to reproduce this on the current versio

[Barebox] Polling infrastructure causes reentrancy problem

2021-11-05 Thread Christian Eggers
Disclaimer: I stumbled over this on barebox 2020.01. I haven't tried to reproduce this on the current version. Summary: -- Use case: Linux kernel is started via Android fastboot (uses polling infrastructure) while probing of other device drivers is ongoing. Behavior:

[PATCH] Revert "usb: host: ehci: Use to USBSTS to wait for transfer completion"

2020-08-12 Thread Christian Eggers
ehci: Use to USBSTS to wait for transfer completion") Signed-off-by: Christian Eggers --- On Tue, Aug 11, 2020, Sascha Hauer wrote: > I am fine with reverting 6044d6c08e, but let's give Andrey some time to > react before doing this. I'll be on holiday next week. So it send it now bef

Re: Some USB memory sticks not (fully) recognized

2020-08-11 Thread Christian Eggers
Hi Sascha, On Monday, 10 August 2020, 21:26:43 CEST, Sascha Hauer wrote: > Hi Christian, > > On Mon, Aug 10, 2020 at 01:52:01PM +0200, Christian Eggers wrote: > > On Thursday, 6 August 2020, 16:29:13 CEST, Christian Eggers wrote: > > > I got a bug report that some ne

Re: Some USB memory sticks not (fully) recognized

2020-08-10 Thread Christian Eggers
On Thursday, 6 August 2020, 16:29:13 CEST, Christian Eggers wrote: > Barebox version: 2020.07.0 > Hardware: i.MX6 ULL with external Microchip USB Hub attached > > I got a bug report that some newer USB memory sticks do not work with > barebox. While with barebox-2020.0

Some USB memory sticks not (fully) recognized

2020-08-06 Thread Christian Eggers
Barebox version: 2020.07.0 Hardware: i.MX6 ULL with external Microchip USB Hub attached I got a bug report that some newer USB memory sticks do not work with barebox. While with barebox-2020.01 these devices are not recognized at all, in barebox-2020.07 I get at least some warnings: # usb > usb:

Re: [PATCH] usb: Add extra delay for device scan

2020-03-10 Thread Christian Eggers
Hi Roland, Am Dienstag, 10. März 2020, 10:42:25 CET schrieb Roland Hieber: > This should probably be:? > > Fixes: b1d9837182 ("usb: Change power-on / scanning timeout handling") > > - Roland > I definitely isolated the regression to that particular commit. Additionally I would like to

[PATCH] usb: Add extra delay for device scan

2020-03-09 Thread Christian Eggers
evice_list_scan(void) if (ret) goto out; } + + /* Avoid hammering the HUB with port scans */ + mdelay(25); } out: -- Christian Eggers Embedded software developer Arnold & Richter Cine Technik Gmb

[PATCH] gadget: f_fastboot: New Kconfig option USB_GADGET_FASTBOOT_CMD_OEM

2020-02-21 Thread Christian Eggers
e disabled for secure boot devices. Signed-off-by: Christian Eggers --- drivers/usb/gadget/Kconfig | 11 +++ drivers/usb/gadget/f_fastboot.c | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 9d6a262038..

[PATCH] usb: rename "struct usb_configuration" to "struct usb_config"

2020-02-21 Thread Christian Eggers
struct usb_configuration in usb.h conflicts with struct usb_configuration in usb/composite.h The version in usb/composite.h is also defined in Linux, so rename the other one. Signed-off-by: Christian Eggers --- include/usb/usb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Updating barebox from Linux

2020-02-04 Thread Christian Eggers
Platform: i.MX6 (booting from NAND) I would like to be able to update Barebox from Linux using a framework like RAUC or swupdate. The RAUC documentation states: https://rauc.readthedocs.io/en/latest/advanced.html#bootloader-update-ideas > 7.6.3. Bootloader Update Ideas > > The NXP i.MX6

[PATCH] doc: bootchooser: Fix barebox-state example

2020-02-04 Thread Christian Eggers
- Fix prefix - attemps --> attempts - add missing equal sign - Add 2 examples Signed-off-by: Christian Eggers --- Documentation/user/bootchooser.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/user/bootchooser.rst b/Documentation/user/bootchooser.

Re: state framework, fixed-partitions, eeprom and linux

2020-02-04 Thread Christian Eggers
rtitions are added as NVMEM cells. Is there any conceptual difference between "MTD partitions" and "NVMEM cells"? Are you able to bring one/both patches into Linux? Regards Christian >From 927f3aa9c4a64802f25ef2f292caa1dc951ce667 Mon Sep 17 00:00:00 2001 From: Christian Egger

state framework, fixed-partitions, eeprom and linux

2020-02-03 Thread Christian Eggers
I've tried to use the state framework with an SPI eeprom as described here: https://www.barebox.org/doc/latest/user/state.html#eeprom The eeprom uses a "partition" for the state data: 8<--- eeprom@50 { partitions { compatible

Re: [SPAM:54%] Re: [PATCH] barebox_banner: switch to pr_notice

2020-01-28 Thread Christian Eggers
Am Dienstag, 28. Januar 2020, 10:33:19 CET schrieb Sascha Hauer: > On Mon, Jan 27, 2020 at 08:46:06AM +0100, Christian Eggers wrote: > > The banner should already be printed, if CONFIG_COMPILE_LOGLEVEL is set > > to 5 (notice). If printing of the banner is not desired, CONFIG

Re: [RFC PATCH] bootm: Register as bootentry provider

2020-01-27 Thread Christian Eggers
Hi Sascha, Am Montag, 27. Januar 2020, 13:49:38 CET schrieb Sascha Hauer: > On Mon, Jan 27, 2020 at 11:18:31AM +0100, Christian Eggers wrote: > > > Obviously anything involving shell scripts cannot work when no shell is > > > enabled. I suggest using bootloader spec (C

[PATCH] images: Use separate LDFLAGS for PBL

2020-01-27 Thread Christian Eggers
barebox.map" when linking the PBL. Only changed for ARM, are any other platforms affected? Signed-off-by: Christian Eggers --- Makefile | 2 ++ arch/arm/Makefile | 7 +++ images/Makefile | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile ind

[RFC PATCH] bootm: Register as bootentry provider

2020-01-27 Thread Christian Eggers
_BLSPEC is disabled. Example: bootchooser.system0.boot=nand0.root.ubi.kernel0 Signed-off-by: Christian Eggers --- common/bootm.c | 71 +- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/common/bootm.c b/common/bootm.c index 3

Re: [PATCH] bootchooser: Change name of kernel parameter

2020-01-27 Thread Christian Eggers
Hello Ahmad, > Existing userspace like RAUC[1] rely on this naming, so the default may > not be changed. > > [1]: > https://github.com/rauc/rauc/blob/f52978d9736f18794f7e277ca440e2e4e78c9703/src/context.c#L47 that is what I already suspected... For my initramfs (klibc based), I need a very

[PATCH] barebox_banner: switch to pr_notice

2020-01-26 Thread Christian Eggers
The banner should already be printed, if CONFIG_COMPILE_LOGLEVEL is set to 5 (notice). If printing of the banner is not desired, CONFIG_BANNER can be disabled. Fixes: 1d60b224e5 ("barebox_banner: switch to pr_info") Signed-off-by: Christian Eggers --- common/version.c | 4 ++-- 1 fi

[PATCH] bootchooser: Change name of kernel parameter

2020-01-26 Thread Christian Eggers
r renaming, the bootchooser result will be passed as environment variable which can easily accessed from /init (e.g. for selecting the associated root fs). Signed-off-by: Christian Eggers --- common/bootchooser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bootchooser.

[PATCH] common: make CONFIG_BAREBOX_UPDATE visible

2020-01-26 Thread Christian Eggers
The barebox update infrastructure is also useful without CONFIG_CMD_BAREBOX_UPDATE (e.g. from a own barebox_main() with CONFIG_SHELL_NONE). Signed-off-by: Christian Eggers --- common/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/Kconfig b/common

[PATCH] gadget: f_fastboot: Fix memory leak

2020-01-26 Thread Christian Eggers
bootm_data::os_file is not required to be a copied string. It isn't freed anywhere. Signed-off-by: Christian Eggers --- drivers/usb/gadget/f_fastboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index

[PATCH] eeprom: at25: Allow page sizes greater than 16 bit

2020-01-26 Thread Christian Eggers
For FRAM devices the page size is usually equal to the device size. Some available devices are greater than 64kB, so a 32 bit variable must be used. The same change has to be done for the Linux driver. I'll try to upstream this as soon as possible. Signed-off-by: Christian Eggers --- drivers

[PATCH 3/5] state: remove param member from state_uint32, state_enum32, state_mac

2020-01-23 Thread Christian Eggers
After adding the parameter, the pointer isn't required anymore. Signed-off-by: Christian Eggers --- common/state/state.h | 3 --- common/state/state_variables.c | 16 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/common/state/state.h b/common/state

[PATCH 4/5] globalvar: Allow NULL pointers to be returned by dev_add_param()

2020-01-23 Thread Christian Eggers
The following commit will change the return value of dev_add_param() from -ENOSYS to NULL if CONFIG_PARAMETER is disabled. After that, building without CONFIG_PARAMETER will return a NULL pointer to __nvvar_add() instead of an error. Signed-off-by: Christian Eggers --- common/globalvar.c | 19

[PATCH 5/5] parameter: Return NULL instead of ENOSYS if CONFIG_PARAMETER is disabled

2020-01-23 Thread Christian Eggers
ing a NULL pointer. As a result, these callers will not fail itself, only because CONFIG_PARAMETER (which is always optional) is disabled. Signed-off-by: Christian Eggers --- include/param.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/param.h

[PATCH 2/5] mci: remove param_probe member from struct mci

2020-01-23 Thread Christian Eggers
After adding the parameter, the pointer isn't required anymore. Signed-off-by: Christian Eggers --- drivers/mci/mci-core.c | 7 --- include/mci.h | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 67257bcd1

[PATCH 1/5] state: remove param member from struct state_string

2020-01-23 Thread Christian Eggers
After adding the parameter, the pointer isn't required anymore. Signed-off-by: Christian Eggers --- common/state/state.h | 1 - common/state/state_variables.c | 7 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/state/state.h b/common/state/state.h index

Re: Configuring for secure boot / Using bootchooser

2020-01-23 Thread Christian Eggers
Hi Sascha, seems I ran into trouble (see below) with CONFIG_SHELL_NONE. Am Montag, 20. Januar 2020, 20:53:51 CET schrieb Sascha Hauer: > Hi Christian, > > On Mon, Jan 20, 2020 at 05:38:36PM +0100, Christian Eggers wrote: > > Board: phytec-som-imx6 > > > > I need to

Re: [PATCH 1/3] watchdog: Select CONFIG_PARAMETER

2020-01-22 Thread Christian Eggers
Hi Sascha, Am Mittwoch, 22. Januar 2020, 09:21:15 CET schrieb Sascha Hauer: > Hi Christian, > > > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > > index 45dd41a2a..34b7fea39 100644 > > --- a/drivers/watchdog/Kconfig > > +++ b/drivers/watchdog/Kconfig > > @@ -4,6 +4,7 @@

[PATCH] Partly revert "globalvar: fix crash if CONFIG_NVVAR is not set"

2020-01-21 Thread Christian Eggers
. Fixes: 8047705905 ("globalvar: fix crash if CONFIG_NVVAR is not set") Signed-off-by: Christian Eggers --- common/globalvar.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/globalvar.c b/common/globalvar.c index 1bea7425d..cec0a9cc4 100644 --- a/common/globalvar.c ++

[PATCH 3/3] globalvar: Select CONFIG_PARAMETER

2020-01-21 Thread Christian Eggers
Without CONFIG_PARAMETER, __nvar_add() will always fail. Signed-off-by: Christian Eggers --- common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/common/Kconfig b/common/Kconfig index 60237d305..c2ec995f1 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -166,6 +166,7 @@ config

[PATCH 2/3] usb: otg: Select CONFIG_PARAMETER

2020-01-21 Thread Christian Eggers
Without CONFIG_PARAMETER, usb_register_otg_device() will always fail. Signed-off-by: Christian Eggers --- drivers/usb/otg/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index 2c094452b..20b4d7f8c 100644 --- a/drivers/usb/otg/Kconfig

[PATCH 1/3] watchdog: Select CONFIG_PARAMETER

2020-01-21 Thread Christian Eggers
Without CONFIG_PARAMETER, watchdog_register() will always fail. Signed-off-by: Christian Eggers --- drivers/watchdog/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 45dd41a2a..34b7fea39 100644 --- a/drivers/watchdog/Kconfig

[PATCH] watchdog: Fix error path

2020-01-21 Thread Christian Eggers
In case of an error (e.g. dev_add_param_tristate_ro() returns -ENOSYS), device registration must be reverted. Signed-off-by: Christian Eggers --- drivers/watchdog/wd_core.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/watchdog

[PATCH] param: Make enum param_tristate always visible

2020-01-21 Thread Christian Eggers
se drivers/watchdog/imxwd.c can also be built without CONFIG_WATCHDOG. Signed-off-by: Christian Eggers --- @Sascha: I've asked my IT department to stop modifiying my patch emails. I hope the mails are ok now. include/param.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Configuring for secure boot

2020-01-20 Thread Christian Eggers
Board: phytec-som-imx6 I need to configure barebox in a way, that a malicious attacker can not break into the system. It looks like I need to perform the following steps: 1. Enforce signature verification of FIT image --> CONFIG_BOOTM_FORCE_SIGNED_IMAGES 2. Prevent manipulation of the saved

[PATCH] pinctrl: imx-v3: Support for imx6ull-iomuxc-snvs

2020-01-17 Thread Christian Eggers
Signed-off-by: Christian Eggers --- drivers/pinctrl/imx-iomux-v3.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/pinctrl/imx-iomux-v3.c b/drivers/pinctrl/imx-iomux-v3.c index 5fadc8415..89fcb50c8 100644 --- a/drivers/pinctrl/imx-iomux-v3.c +++ b/drivers/pinctrl/imx-iomux-v3

[PATCH] nvmem: ocotp: Support for i.MX6ULL/ULZ

2020-01-17 Thread Christian Eggers
i.MX6ULL and i.MX6ULZ have only half of the fuses as i.MX6UL Linux commit: ffbc34bf0e ("nvmem: imx-ocotp: Implement i.MX6ULL/ULZ support") Fixes: 1dc748b3b2 ("dts: update to v5.1-rc1") Signed-off-by: Christian Eggers --- drivers/nvmem/ocotp.c | 11 +++ 1 file ch

Re: [PATCH] lds: Fix alignment of initcall table

2020-01-17 Thread Christian Eggers
Hi Sam, Am Freitag, 17. Januar 2020, 11:26:37 CET schrieben Sie: > Hi Christian. > > Thanks for the patch. > > [...] > Have you seen: > d5f8bd9c503e0a17ef071eec50c537cc82a7956c ("lds: align RO_DATA_SECTION > members") which was recently committed to master? unfortunately I haven't. I started

[PATCH] lds: Fix alignment of initcall table

2020-01-17 Thread Christian Eggers
art = . *(.initcall.0) Tested on i.MX6 (ARM v7). Fixes: c5d38e9201 ("lds: Add and use RO_DATA_SECTION macro") Signed-off-by: Christian Eggers --- arch/arm/lib32/barebox.lds.S | 1 + arch/arm/lib64/barebox.lds.S | 1 + arch/mips/lib/barebox.lds.S| 1 + a