On Mon, Jun 21, 2021 at 12:27:07PM +0200, Rouven Czerwinski wrote:
> CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE is present since the very first
> addition of sparse image support. However its not used anywhere in the
> code, so remove it.
>
> Fixes: 13f649a4f960 ("Add support for fastboot sparse images")
On Tue, Jun 22, 2021 at 11:24:57PM -0700, Trent Piepho wrote:
> On Tue, Jun 22, 2021 at 9:34 PM Sascha Hauer wrote:
> > + while (1) {
> > + int now, wr;
> > +
> > + now = read(in, buf, bs);
> > + if (now < 0) {
> > + ret = now;
Hi,
Am Tue, Jun 22, 2021 at 11:07:17AM +0200 schrieb Ahmad Fatoum:
> Hi,
>
> On 22.06.21 10:35, Alexander Dahl wrote:
> > I just had a short look into u-boot for that board, there's the i2c
> > eeprom set in dts only, and dts is still the old u-boot way, not dts
> > from kernel plus fixups in a s
On Tue, Jun 22, 2021 at 9:34 PM Sascha Hauer wrote:
> + while (1) {
> + int now, wr;
> +
> + now = read(in, buf, bs);
> + if (now < 0) {
> + ret = now;
> + goto err;
> + }
> +
> +
Hi,
some bikeshedding incoming.
On 23.06.21 07:16, Sascha Hauer wrote:
> Document the recently gained device tree overlay features.
>
> Signed-off-by: Sascha Hauer
> ---
> Documentation/user/devicetree.rst | 37 +++
> 1 file changed, 37 insertions(+)
>
> diff --git
We have a global firmware search path, so use it. This removes the
path argument from of_firmware_load_overlay(). blspec already extends
the global firmware search path, so the path is not needed there.
The of_overlay command has an option for specifying the search path,
this is removed here, the g
This adds support for a global.of_overlay_compatible variable which is a
space separated list of compatible strings. Device tree overlays not
matching any won't be applied (unless the overlay doesn't have a
compatible property at all).
Signed-off-by: Sascha Hauer
---
drivers/of/overlay.c | 46 ++
This adds a colon separated search path for firmware files. When the
firmware we are searching is not an absolute path then look in the
search path first. This will be useful later when the bootloader spec
implementation shall look for firmware files relative to the provided
root.
Signed-off-by: S
A shortcut to of_overlay_apply_tree() which takes a filename rather than
an unflattened device tree.
Signed-off-by: Sascha Hauer
---
drivers/of/overlay.c | 35 +++
include/of.h | 7 +++
2 files changed, 42 insertions(+)
diff --git a/drivers/of/overla
Document the recently gained device tree overlay features.
Signed-off-by: Sascha Hauer
---
Documentation/user/devicetree.rst | 37 +++
1 file changed, 37 insertions(+)
diff --git a/Documentation/user/devicetree.rst
b/Documentation/user/devicetree.rst
index 4be6a1e70
of_unflatten_dtb() doesn't check the size of the device tree blob
passed to it. Add a size argument end add checks for the size. Some
callers have no idea of the buffer size themselves, INT_MAX is passed
in these cases.
Signed-off-by: Sascha Hauer
---
arch/arm/boards/qemu-virt/board.c |
When bootloader spec triggers dt overlay loading then this might
also trigger loading firmware. This firmware should be looked for
relative to the filesystem providing the bootloader spec files,
so add that to the firmware search path.
Signed-off-by: Sascha Hauer
---
common/blspec.c | 13 +++
libbb contains a find_execable() function to find an executable in a
colon separated path. The code can be reused by making the environment
variable name and the is-executable test parameters. Do this and add
a find_path()
Signed-off-by: Sascha Hauer
---
include/libbb.h | 4 +++-
lib/libbb.c
With this series barebox gains the capability to apply device tree
overlays to the kernel device tree before starting the kernel with it.
Which overlays are applied can be controlled with a set of globavars,
for details see the documentation patch in this series.
The particular usecase we have in
This sets the overlay search path to $BOOT/overlays during starting
an bootloader spec entry with the effect that overlays from there
can be applied.
Signed-off-by: Sascha Hauer
---
common/blspec.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/blspec.c b/c
firmwaremgr_find_by_node() matches against the device node of the parent
of the device associated to the handler. This is correct for the socfpga
and zyncmp driver, but not for the altera_serial driver. Add a
device_node argument to the handler which is set by the drivers to the
correct device node
Signed-off-by: Sascha Hauer
---
Documentation/user/devicetree.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/user/devicetree.rst
b/Documentation/user/devicetree.rst
index 679cae7f00..4be6a1e703 100644
--- a/Documentation/user/devicetree.rst
+++ b/Documentat
firmwaremgr_find_by_node() matches the device node pointers to find the
firmware manager associated to a node. This function is called by the
of_overlay code when it finds a firmware-name property to find a firmware
manager for this node. This works when the overlay is applied to the
live tree, but
firmwaremgr_find_by_node() takes a const pointer to a device tree node.
Most functions that take a device tree node take a non const pointer
though, so we can't call them from there. It might be worth looking
into making the pointers const for other functions, but we are not
there yet. Make the poi
This offers the possibility to load dt overlays on the kernel device
tree during booting. Several globalvars control which device trees
are used. global.of_overlay_dir specifies the directory where overlay
files are expected. global.of_overlay_filepattern specifies file
patterns which the overlay f
The fpga-region binding states that the firmware-name property must be
in the same node as the fpga-region compatible, so checking for this
compatible when walking up the parents is wrong. Instead, only test for
it in the target node. Also, when the current node is not a fpga-region
we must return
Instead of having multiple #ifdef CONFIG_FIRMWARE in a single file move
the code together inside a single #ifdef.
Signed-off-by: Sascha Hauer
---
include/firmware.h | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/firmware.h b/include/firmware.h
index d3709868
Abort booting in time when doing a dryrun boot.
Signed-off-by: Sascha Hauer
---
arch/riscv/lib/bootm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index b3e41de4a8..c99ae18974 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/boot
Abort booting in time when doing a dryrun boot.
Signed-off-by: Sascha Hauer
---
arch/arm/lib64/armlinux.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c
index 0ba4d30b8e..e05f29984d 100644
--- a/arch/arm/lib64/armlinux.c
+++ b/arch/ar
From: Steffen Trumtrar
At least bitstreams for FPGAs can consist of a lot of zeros depending on
device utilization. These bitstreams can be compressed very effectively.
Let the firmware code accept these images and decompress them before
handing it to the firmware-manager in question.
Signed-of
Signed-off-by: Sascha Hauer
---
include/filetype.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/include/filetype.h b/include/filetype.h
index fd339f9564..ae0920320e 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -70,6 +70,20 @@ enum filetype is_fat_or_mbr(const
Steffen already sent this. This version has some improvements like
better error reporting. Also we uncompress only files we detect as
compressed files, not just everything we do not detect as unknown file.
Sascha Hauer (2):
filetype: Add function to check if a filetype is a compressed file
lib
Signed-off-by: Sascha Hauer
---
include/libfile.h | 1 +
lib/libfile.c | 34 ++
2 files changed, 35 insertions(+)
diff --git a/include/libfile.h b/include/libfile.h
index 350f70..3c2fe1714d 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -5,6 +5
There is no relation between sizeof(long) and the size of the register
of the reset controller on STM32 CPUs. They just happen to be both 32-bit
in the current configuration. U-Boot already removed the BITS_PER_LONG,
so do likewise.
Signed-off-by: Ahmad Fatoum
---
drivers/reset/reset-stm32.c | 4
Converts the files that licensecheck can determine to be licensed under
GPL-2.0-only or GPL-2.0-or-later and also convert their copyright
statements to SPDX.
Signed-off-by: Uwe Kleine-König
---
drivers/w1/masters/w1-gpio.c | 15 +--
drivers/w1/slaves/w1_ds2431.c | 10 --
dri
I got the uart1 and uart4 available on boot after I changed the appropiate dtsi
in this way:
--- arch/arm/boot/dts/am335x-bone-common.dtsi_ORIG 2021-01-29
15:08:15.085080693 +0100
+++ arch/arm/boot/dts/am335x-bone-common.dtsi 2021-06-22 11:26:48.197115876
+0200
@@ -96,6 +96,20 @@
On Wed, Jun 16, 2021 at 08:32:44AM +0200, Steffen Trumtrar wrote:
> firmwareload can only load a bitstream into an FPGA without any
> knowledge of possible additional needs (e.g. FPGA bridges).
>
> These are defined in the fpga-region nodes in the devicetree. The
> fpga-region describes the layout
On 22.06.21 10:26, Ahmad Fatoum wrote:
> Originally, I envisioned bthreads as replacement for pollers and
> workqueues. But even without preemption, having functions you call
> possibly accessing structures you are iterating over can corrupt
> memory. This problem exists with pollers as well, but b
Hi,
On 22.06.21 10:35, Alexander Dahl wrote:
> Hei hei,
>
> Am Tue, Jun 22, 2021 at 10:08:11AM +0200 schrieb Ahmad Fatoum:
>> With the latest NVMEM enhancements merged, barebox networking core now
>> always consults NVMEM cells referenced in the network controller
>> device tree node before it fa
Hei hei,
Am Tue, Jun 22, 2021 at 10:08:11AM +0200 schrieb Ahmad Fatoum:
> With the latest NVMEM enhancements merged, barebox networking core now
> always consults NVMEM cells referenced in the network controller
> device tree node before it falls back to randomizing a new address.
>
> The SAM5D27
This driver is based on the f_mass_storage drivers in Linux v5.11 and
U-Boot v2021.01.
Unlike the U-Boot version, it runs asynchronously without blocking the
bootloader from doing other tasks, like exporting other USB gadgets at
the same time or enabling shell access.
With pollers and workqueues,
With the upcoming move of bthreads to be scheduled only in command
context, long running tasks (i.e. bareDOOM) may no longer process
VirtIO input in a timely manner. Move the input polling into a poller,
so input can once again be processed between frames.
Signed-off-by: Ahmad Fatoum
---
drivers
So far, completions made sense only in one direction: The main thread
can wait for pollers, but the other way around didn't work. With the new
bthread support, any bthread can wait for another to complete().
Wrap this up using the Linux completion API to make porting threaded
code easier.
Signed-o
usbgadget_register currently takes 6 arguments. Instead of increasing
them to 8 to support the new usb mass storage gadget, rewrite it to
accept a pointer to a struct with all the options instead.
Signed-off-by: Ahmad Fatoum
---
commands/usbgadget.c | 19 +--
common/usbgadg
Workqueues are run out of poller_call, not because of a dependency, but
because when they were added, poller_call was directly called from
is_timeout.
With the addition of bthreads, there is now a general resched() function
that runs pollers and switches between bthreads. It makes sense to move
wo
Originally, I envisioned bthreads as replacement for pollers and
workqueues. But even without preemption, having functions you call
possibly accessing structures you are iterating over can corrupt
memory. This problem exists with pollers as well, but because of their
limited scope, it's harder to s
When debugging around bthreads, it's often useful to log context
switches. Make this easier by adding a ready-to-use pr_debug at the
correct location.
Signed-off-by: Ahmad Fatoum
---
common/bthread.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/bthread.c b/commo
Using bthreads throughout means we'll need finer grained locking across
the code base, which is too big a commitment for now. Previous commit
limited bthread_reschedule to only happen in command context, like
how it is for workqueues. Adjust the docs appropriately.
Signed-off-by: Ahmad Fatoum
---
v3 -> v4:
- change bthreads to be scheduled like workqueues instead of pollers
- change virtio input from bthread to poller
- add useful bthread debug print
v2 -> v3:
- rebase on v3 of the preparatory system partitions series
- have usbgadget -S '' fallback to use $global.system.partitio
With the latest NVMEM enhancements merged, barebox networking core now
always consults NVMEM cells referenced in the network controller
device tree node before it falls back to randomizing a new address.
The SAM5D27-SOM1 has a 256 byte EEPROM, which holds a MAC address in its
last 6 bytes. Describ
Hello Sascha,
On 22.06.21 09:54, Sascha Hauer wrote:
> This adds memset_io(), memcpy_fromio() and memcpy_toio(). These have not
> been defined for ARM64 previously. The code is directly taken from the
> Kernel.
With some compile-time changes this could be made generic for other
arches as well and
This adds memset_io(), memcpy_fromio() and memcpy_toio(). These have not
been defined for ARM64 previously. The code is directly taken from the
Kernel.
Signed-off-by: Sascha Hauer
---
arch/arm/lib64/Makefile | 2 +-
arch/arm/lib64/io.c | 98 +
2 files
On both ARM and ARM64 we map DMA coherent memory the same as IO memory.
This has the effect that unaligned accesses are not possible on DMA
coherent memory. The dwc3 gadget driver uses memset() and memcpy() on
that memory which may generate unaligned accesses and result in data
aborts. Use memcpy_f
48 matches
Mail list logo