i.MX HABV4 USB Image generation broken since fd9c7cbfe446b0f04aa66bb198c1769045ba2fe5

2022-02-07 Thread Rouven Czerwinski
Hi, Commit fd9c7cbfe446 ("scripts: Add common library functions") intorduced the usage of the common library functions to imx-image, which breaks the HAB USB image generation within barebox. Signed images are still generated fine: OBJCOPYB images/start_imx6ul_ccbv2_512m.pblb CHKFILESIZE image

[PATCH] fixup! video: add MIPI DBI Type C Option 3 support

2022-02-07 Thread Ahmad Fatoum
Readd common code... Signed-off-by: Ahmad Fatoum --- Threw out the baby with the bath water in the rebase.. --- commands/mipi_dbi.c | 104 include/video/mipi_dbi.h | 105 include/video/mipi_display.h | 150 +++

[PATCH v3] fs: jffs2: fix error when reading blocks with offset

2022-02-07 Thread Holger Assmann
This bug resulted in a panic when trying to read a file partially with an offset, e.g. when starting Linux. In such a case a header is loaded by a separate call of jffs2_read(), which then copies only the first n bytes out of the respective block. When the remaining data of the block is then subseq

Aw: Re: blspec - autoboot + timeout/default

2022-02-07 Thread Frank Wunderlich
Hi > Gesendet: Montag, 07. Februar 2022 um 09:59 Uhr > Von: "Sascha Hauer" > An: "Frank Wunderlich" > Cc: barebox@lists.infradead.org > Betreff: Re: blspec - autoboot + timeout/default > > On Sat, Feb 05, 2022 at 03:58:54PM +0100, Frank Wunderlich wrote: > > Hi, > > > > can i boot directly to bl

Re: [PATCH v2] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl

2022-02-07 Thread Rouven Czerwinski
Hi Trent, On Thu, 2021-06-17 at 17:03 -0700, Trent Piepho wrote: > On Thu, Jun 17, 2021 at 2:25 AM Rouven Czerwinski > wrote: > > + > > +static void setup_uart(void) > > +{ > > + void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR; > > + > > + imx6_ungate_all_peripherals(); > > + >

[PATCH] ubifs: Add zstd support

2022-02-07 Thread Sascha Hauer
zstd shows a good compression rate and is faster than lzo. This adds UBIFS support for it. Signed-off-by: Sascha Hauer --- fs/ubifs/Kconfig | 5 fs/ubifs/ubifs-media.h | 2 ++ fs/ubifs/ubifs.c | 52 ++ 3 files changed, 59 insertions(+)

[PATCH] kbuild: replace $(H) with $(pound)

2022-02-07 Thread Masahiro Yamada
scripts/Kbuild.include defines 'pound', which is equivalent to 'H'. pound := \# Replace $(H) with $(pound), and remove the 'H' definition. Signed-off-by: Masahiro Yamada --- scripts/Makefile.lib | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scr

[PATCH] setlocalversion: update to Linux 5.16

2022-02-07 Thread Masahiro Yamada
It has been a long time since this script was updated. Now resync it with Linux 5.16. Signed-off-by: Masahiro Yamada --- scripts/setlocalversion | 103 +++- 1 file changed, 39 insertions(+), 64 deletions(-) diff --git a/scripts/setlocalversion b/scripts/set

[PATCH] kvx: remove unused CONFIG_ARCHINFO

2022-02-07 Thread Masahiro Yamada
This is defined, but not used anywhere. $ git grep ARCHINFO arch/kvx/Kconfig:config ARCHINFO Signed-off-by: Masahiro Yamada --- arch/kvx/Kconfig | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/kvx/Kconfig b/arch/kvx/Kconfig index 1c3e29a9f..5e7ddeea1 100644 --- a/arch/kvx/Kc

[PATCH] efi: probe devices from the device-tree

2022-02-07 Thread Michael Olbrich
The state device-tree may contain devices. For example block devices with a 'barebox,storage-by-uuid' compatible. Probing is necessary to ensure that those devices are available. Call barebox_register_of() instead of of_set_root_node(). It probes the devices after setting the root node. Signed-of

Re: [PATCH 4/8] cdev: implement cdev_open()

2022-02-07 Thread Ahmad Fatoum
On 07.02.22 10:49, Sascha Hauer wrote: > Implement cdev_open() with the expected semantics that takes a struct > cdev * argument. We already have an unimplemented prototype > cdev_do_open(), remove this. Reviewed-by: Ahmad Fatoum > > Signed-off-by: Sascha Hauer > --- > fs/devfs-core.c | 16 +

Re: [PATCH 3/8] rename cdev_open() -> cdev_open_name()

2022-02-07 Thread Ahmad Fatoum
On 07.02.22 10:49, Sascha Hauer wrote: > The cdev_* functions normally take a struct cdev * argument, with the > exception of cdev_open(). Rename cdev_open() to cdev_open_name() to > be able to implement cdev_open() with the expected semantics in the next > step. Nitpick: cdev_open_by_name would a

Re: [PATCH 8/8] misc: Add storage-by-uuid driver

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 10:49:53AM +0100, Sascha Hauer wrote: > This adds a driver which matches to a "barebox,storage-by-uuid" > compatible node. The driver looks for a storage device matching the > given UUID and when found registers a new cdev for the device. > > This driver solved a very speci

[PATCH 1/8] cdev: rename partuuid to uuid

2022-02-07 Thread Sascha Hauer
From: Michael Olbrich Partitions are not the only devices that can have UUIDs. Change the name to something more generic to prepare for other users. Signed-off-by: Michael Olbrich Link: https://lore.barebox.org/20220124100458.2924679-2-m.olbr...@pengutronix.de Signed-off-by: Sascha Hauer ---

[PATCH 8/8] misc: Add storage-by-uuid driver

2022-02-07 Thread Sascha Hauer
This adds a driver which matches to a "barebox,storage-by-uuid" compatible node. The driver looks for a storage device matching the given UUID and when found registers a new cdev for the device. This driver solved a very specific problem. On EFI the storage devices are not connected to any device

[PATCH 5/8] driver: Add functions to free devices

2022-02-07 Thread Sascha Hauer
struct device_d has some dynamically allocated members, namely .name and .unique_name. These are normally not freed when a device is freed. Add two functions to free these resources. free_device_res() only frees the allocated members, but not the device itself. This is suitable for cases where the

[PATCH 3/8] rename cdev_open() -> cdev_open_name()

2022-02-07 Thread Sascha Hauer
The cdev_* functions normally take a struct cdev * argument, with the exception of cdev_open(). Rename cdev_open() to cdev_open_name() to be able to implement cdev_open() with the expected semantics in the next step. Signed-off-by: Sascha Hauer --- arch/arm/mach-mxs/ocotp.c | 2 +- arch/arm/mac

[PATCH 6/8] cdev: Create missing cdev_* functions

2022-02-07 Thread Sascha Hauer
We have several functions like cdev_read(), cdev_write() and others. For consistency create the remaining functions: cdev_lseek(), cdev_protect(), cdev_discard_range(), cdev_memmap() and cdev_truncate() Signed-off-by: Sascha Hauer --- fs/devfs-core.c | 61 +++

[PATCH 7/8] cdev: create iterator for cdev list

2022-02-07 Thread Sascha Hauer
This creates an iterator to iterate over all availabe cdevs. Signed-off-by: Sascha Hauer --- fs/devfs-core.c | 10 +- fs/devfs.c | 4 +--- include/driver.h | 4 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fs/devfs-core.c b/fs/devfs-core.c index c9a852973

[PATCH 2/8] cdev: add diskuuid support

2022-02-07 Thread Sascha Hauer
From: Michael Olbrich This allows identifying disks by UUID. For disks with GPT the disk GUID is used. For DOS partition tables the NT signature ist used, similar to how the partuuid is generated. Signed-off-by: Michael Olbrich Link: https://lore.barebox.org/20220124100458.2924679-3-m.olbr...@p

[PATCH 4/8] cdev: implement cdev_open()

2022-02-07 Thread Sascha Hauer
Implement cdev_open() with the expected semantics that takes a struct cdev * argument. We already have an unimplemented prototype cdev_do_open(), remove this. Signed-off-by: Sascha Hauer --- fs/devfs-core.c | 16 +++- include/driver.h | 2 +- 2 files changed, 12 insertions(+), 6 de

Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support

2022-02-07 Thread Frank Wunderlich
Am 7. Februar 2022 09:34:40 MEZ schrieb Sascha Hauer : >On Mon, Feb 07, 2022 at 09:14:51AM +0100, Ahmad Fatoum wrote: >> Hello Sascha, >> >> On 07.02.22 09:00, Sascha Hauer wrote: >> > On Sun, Feb 06, 2022 at 12:19:30AM +0100, Ahmad Fatoum wrote: >> >> Most users interested in chainloading barebox

Re: [PATCH] state: add deep probe aware helpers to get state

2022-02-07 Thread Sascha Hauer
On Wed, Feb 02, 2022 at 12:19:32PM +0100, Ahmad Fatoum wrote: > state_by_name itself can't be made deep probe aware as it doesn't have > enough information on what to probe. Board code calling it must instead > itself ensure that the state has been proved (either via initcall > ordering or by calli

Re: blspec - autoboot + timeout/default

2022-02-07 Thread Sascha Hauer
On Sat, Feb 05, 2022 at 03:58:54PM +0100, Frank Wunderlich wrote: > Hi, > > can i boot directly to blspec-menu (boot -m sd.1) with setting in > default env and boot a specific entry (by title/filename) after some > time (e.g.3-5 sec)? There is a -t option to the boot command. It seems however th

[PATCH] Documentation: Describe how to generate a uImage for use with bootm

2022-02-07 Thread Sascha Hauer
U-Boot's bootm command doesn't take raw barebox images. Describe how to generate a uImage from them which then can be started with bootm. Signed-off-by: Sascha Hauer --- Documentation/user/barebox.rst | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation

Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support

2022-02-07 Thread Ahmad Fatoum
On 07.02.22 09:34, Sascha Hauer wrote: > On Mon, Feb 07, 2022 at 09:14:51AM +0100, Ahmad Fatoum wrote: >> Hello Sascha, >> >> On 07.02.22 09:00, Sascha Hauer wrote: >>> On Sun, Feb 06, 2022 at 12:19:30AM +0100, Ahmad Fatoum wrote: Most users interested in chainloading barebox will probably wan

Re: [PATCH v2 1/5] test: self: printf: log skipped tests

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 09:27:57AM +0100, Ahmad Fatoum wrote: > Report number of skipped tests as well as skip reason. > > Signed-off-by: Ahmad Fatoum > --- > v1 -> v2: > - reword commit message to be more accurate. > --- > test/self/printf.c | 10 -- > 1 file changed, 8 insertions(+),

Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 09:14:51AM +0100, Ahmad Fatoum wrote: > Hello Sascha, > > On 07.02.22 09:00, Sascha Hauer wrote: > > On Sun, Feb 06, 2022 at 12:19:30AM +0100, Ahmad Fatoum wrote: > >> Most users interested in chainloading barebox will probably want to use > >> the generic DT format for tha

[PATCH v2 5/5] test: self: add device tree manipulation test

2022-02-07 Thread Ahmad Fatoum
We had recently gained support for two extra helpers: of_property_sprintf and of_property_write_strings. Add tests for them as well as for general OF creation and unflattening. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - s/of_property_write_string/of_property_write_strings/ in commit messa

[PATCH v2 3/5] of: report whether of_diff found differences in return code

2022-02-07 Thread Ahmad Fatoum
Tests may want to leverage of_diff to verify that fixups proceeded as expected. of_diff lends itself nicely to that by being silent in case of success and just reporting diff on error. Add a return code to make it usable in follow-up tests. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - invert of_

[PATCH v2 4/5] of: silence of_diff output for negative indents

2022-02-07 Thread Ahmad Fatoum
Negative indents just led to strange behavior so far. Repurpose them to mean that the caller is not interested in console output. This makes them useful for negative tests (Sanity check that two different nodes are indeed different). Signed-off-by: Ahmad Fatoum --- v1 -> v2: - use silent variab

[PATCH v2 1/5] test: self: printf: log skipped tests

2022-02-07 Thread Ahmad Fatoum
Report number of skipped tests as well as skip reason. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - reword commit message to be more accurate. --- test/self/printf.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/self/printf.c b/test/self/printf.c index 52fe

[PATCH v2 2/5] test: self: printf: add tests for %*ph prints

2022-02-07 Thread Ahmad Fatoum
This modifier was recently added. Turn the description from its commit message into a test. Signed-off-by: Ahmad Fatoum --- test/self/printf.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/self/printf.c b/test/self/printf.c index ec74df32ee4b..7a74660868c2 100644 -

Re: [PATCH 4/5] of: silence of_diff output for negative indents

2022-02-07 Thread Ahmad Fatoum
On 07.02.22 09:22, Sascha Hauer wrote: > On Mon, Feb 07, 2022 at 09:17:30AM +0100, Sascha Hauer wrote: >> On Mon, Feb 07, 2022 at 08:56:20AM +0100, Ahmad Fatoum wrote: >>> Negative indents just led to strange behavior so far. Repurpose them to >>> mean that the caller is not interested in console o

Re: [PATCH 4/5] of: silence of_diff output for negative indents

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 09:17:30AM +0100, Sascha Hauer wrote: > On Mon, Feb 07, 2022 at 08:56:20AM +0100, Ahmad Fatoum wrote: > > Negative indents just led to strange behavior so far. Repurpose them to > > mean that the caller is not interested in console output. This makes > > them useful for nega

Re: [PATCH 4/5] of: silence of_diff output for negative indents

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 08:56:20AM +0100, Ahmad Fatoum wrote: > Negative indents just led to strange behavior so far. Repurpose them to > mean that the caller is not interested in console output. This makes > them useful for negative tests (Sanity check that two different nodes > are indeed differe

Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support

2022-02-07 Thread Ahmad Fatoum
Hello Sascha, On 07.02.22 09:00, Sascha Hauer wrote: > On Sun, Feb 06, 2022 at 12:19:30AM +0100, Ahmad Fatoum wrote: >> Most users interested in chainloading barebox will probably want to use >> the generic DT format for that: It will pass the checks the boot command >> may have and it will ensure

Re: [PATCH 1/2] mtd: mtdram: discard superfluous code

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 08:56:29AM +0100, Ahmad Fatoum wrote: > We don't need to get the exact same resource, we just requested. > > Signed-off-by: Ahmad Fatoum > --- > drivers/mtd/devices/mtdram.c | 13 ++--- > 1 file changed, 2 insertions(+), 11 deletions(-) Applied, thanks Sascha -

Re: [PATCH 1/2] sandbox: symlink stickypage.bin into build directory

2022-02-07 Thread Sascha Hauer
On Mon, Feb 07, 2022 at 08:56:03AM +0100, Ahmad Fatoum wrote: > Sandbox will try to access a stickypage.bin in the same directory if > possible. Instead of relying on users to copy it there, just create a > symlink. > > Signed-off-by: Ahmad Fatoum > --- > .gitignore| 1 + > arch/sand

Re: [PATCH] Kbuild: add bareboxversion target to Makefile

2022-02-07 Thread Sascha Hauer
On Sun, Feb 06, 2022 at 04:07:16PM +0100, Frank Wunderlich wrote: > From: Frank Wunderlich > > This allows getting version string with make bareboxversion > like for linux and uboot. > > Signed-off-by: Frank Wunderlich > --- > Makefile | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-

Re: [PATCH v3 0/6] refactore rpi board code

2022-02-07 Thread Sascha Hauer
On Thu, Feb 03, 2022 at 11:45:46AM +0100, Oleksij Rempel wrote: > changes v3: > - make bcm2835 mbox to probe on first request solve dependency issue. > - remove phybases from clk driver > - move deep-probe to the separate patch > > changes v2: > - rework clk driver to properly support deep-probe >

Re: [PATCH 2/2] Documentation: user: barebox: mention generic dt 2nd stage support

2022-02-07 Thread Sascha Hauer
On Sun, Feb 06, 2022 at 12:19:30AM +0100, Ahmad Fatoum wrote: > Most users interested in chainloading barebox will probably want to use > the generic DT format for that: It will pass the checks the boot command > may have and it will ensure the system is in the correct state, e.g. > that caches are