We already had O_DIRECTORY defined, but only used it as one of the
bits for O_TMPFILE.
Fix the O_TMPFILE branch, so it checks both bits and implement
O_DIRECTORY, so it causes an error when opening a file that's not
a directory.
This is useful for use with openat.
Signed-off-by: Ahmad Fatoum
--
The phy_modes array needs to be kept in-sync with the
enum phy_interface_t, but this was violated by the most recent sync of
the enum type with Linux.
Th addition of new enumeration constants between existing ones resulted
in phy_modes having NULL-valued gaps, which would panic when passed
to strc
For GNU as on i386, a .word is 16-bit wide, unlikes ARM, where it's
32-bit. The code in asm-generic/pointer.h expects .word to be
32-bit wide though, therefore to switch to .long.
Unlike C's long, an assembly .long is always 32-bit (and thus
identical to .int).
Signed-off-by: Ahmad Fatoum
---
v1
Turn opendir inside out, so it uses directory fds internally.
This is an important change, because it means that the inode
iterate operation will now operate on a real struct file.
This is a prerequisite for porting 9pfs from Linux as it expects
directories to be openend before iteration.
To aid
On sandbox, CONFIG_32BIT and CONFIG_64BIT are determined by the used
compiler. As special case, building sandbox on x86_64 allows
selecting a 32-bit build via CONFIG_SANDBOX_LINUX_I386 if the compiler
supports it.
This option is disabled by default, but allyesconfig turns it on,
alongside drivers
booti_load_image is called directly for kernels in FIT images.
Let's have a simple check that the payload is indeed a booti
image before parsing it.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- no change
---
common/booti.c | 11 +--
common/filetype.c | 6 +++---
include/filetype.h
We already define le32_to_cpu and friends, but were missing so far the
p-suffixed variant, which accepts a pointer.
This is easily implemented with a bit of macro boilerplate, so let's do
that.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- new patch
---
scripts/compiler.h | 21 +
Instead of opencoding the iteration where needed, implement a helper
invokes a callback on every variable.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- new patch
---
common/env.c | 37 +
include/environment.h | 7 +++
2 files changed, 44 inserti
Tab completion is very helpful, but it's not sufficient for enum-typed
global variables. To know what the permissible values are, devinfo
global must be consulted, which can have a lot of output.
As alternative, let's add a varinfo command that can be used together
with parameter tab completion an
We currently always complete device parameters with either a dollar sign
in front or an equal sign after. In preparation for allowing completions
with neither, give env_param_complete() a flag.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- new patch
---
common/complete.c | 30 ++-
This is a very simple tree command inspired by busybox. We already have
ls -R for recursive directory listings, but tree uses indentation to
make it easier to see the directory structure.
Signed-off-by: Ahmad Fatoum
---
commands/Kconfig | 9 +++
commands/Makefile | 1 +
commands/tree.c |
class_remove_device is the exception and normally, a device class
doesn't change for the lifetime of a device after it's set the first
time and removal from a class is done alongside removal of the device
itself.
Let's therefore move the removal from class into core driver code.
Signed-off-by: Ah
While struct filep (FILE) and struct file have been merged, we still
have two different ways the files are created: Regularly in open and
irregularly in an incomplete manner inside opendir.
This breaks file systems that expect the struct file passed to iterate
to have been opened before.
To allow
barebox has a lot of commands that can be used to exercise different
aspects of a file system. Add some documentation for that.
Signed-off-by: Ahmad Fatoum
---
Documentation/devel/background-execution.rst | 2 +
Documentation/devel/devel.rst| 1 +
Documentation/devel/filesystem
By reusing the existing file lookup code, open can open all directories,
e.g. / and /tmp/., which so far wasn't possible.
We need to be able to open these paths for directory FDs to work as one
would expect.
Signed-off-by: Ahmad Fatoum
---
fs/fs.c | 55
An allyes build will enable all options possible and thus usually fail
to build, because it enables CONFIG_MISSING_FIRMWARE_ERROR along with
DRIVER_NET_FSL_FMAN, which requires firmware to function at runtime.
Fix this by disabling MISSING_FIRMWARE_ERROR if COMPILE_TEST is enabled.
This works, bec
Let's repeat the same string tests we already have, but with wide (%ls)
strings instead of our normal ones.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- new patch
---
test/self/printf.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/test/self/printf.c b/test/self/printf.c
The file uses xzalloc, but it's not defined any longer in the currently
included headers.
Include the relevant header to fix this.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- new patch
---
arch/arm/mach-mvebu/kwb_bbu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-mvebu/kw
Building the barebox documentation results in an number of warnings
predominantly in the autogenerated docs from command help text.
Outside of that, there is warnings only in the DT bindings:
bindings/barebox/virtual-reg.rst:25:
WARNING: Inline emphasis start-string without end-string.
bin
leading_spaces will advance the buf pointer as needed, but currently buf
is never reassigned, breaking formatting of wchar arrays.
Signed-off-by: Ahmad Fatoum
---
v1 -> v2:
- new patch
---
lib/vsprintf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/vsprintf.c b/lib
Just a loose collection of fixes for master.
Ahmad Fatoum (8):
firmware: disable MISSING_FIRMWARE_ERROR for COMPILE_TEST builds
include: asm-generic/pointer.h: fix ASM_PTR definition for i386
sandbox: do not enable SANDBOX_LINUX_I386 in allyesconfig
Documentation: devicetree: fix Sphinx wa
An allyes build will enable all options possible and thus usually fail
to build, because it enables CONFIG_MISSING_FIRMWARE_ERROR along with
DRIVER_NET_FSL_FMAN, which requires firmware to function at runtime.
Fix this by disabling MISSING_FIRMWARE_ERROR if COMPILE_TEST is enabled.
This works, bec
Hello,
while working to support the Qnap TS-433 NAS I found the config items
enabled here quite useful. I'm not entirely sure that enabling generic
fit image is useful in general (also because it comes with a build
dependency on python3-libfdt), still here comes a suggestion to enable
it.
Best re
On sandbox, CONFIG_32BIT and CONFIG_64BIT are determined by the used
compiler. As special case, building sandbox on x86_64 allows
selecting a 32-bit build via CONFIG_SANDBOX_LINUX_I386 if the compiler
supports it.
This option is disabled by default, but allyesconfig turns it on,
alongside drivers
GCC complains that we pass the address of the variable instead of the
variable itself:
commands/ubsan.c: In function ‘test_ubsan_divrem_overflow’:
error: lvalue required in ‘asm’ statement
63 | __asm__ ("" : "=r" (var) : "0" (var))
| ^~~
./comm
Building the barebox documentation results in an number of warnings
predominantly in the autogenerated docs from command help text.
Outside of that, there is warnings only in the DT bindings:
bindings/barebox/virtual-reg.rst:25:
WARNING: Inline emphasis start-string without end-string.
bin
On 3/19/25 16:30, Sascha Hauer wrote:
> This implements the MMC specific part to access RPMB partitions:
>
> - Provide a function to find a RPMB capable eMMC
> - partition switching to the RPMB partition
> - Dissecting the OP-TEE requests into the correspnding MMC read/write
> multiblock comm
On 3/19/25 16:34, Ahmad Fatoum wrote:
>
>
> On 3/19/25 16:29, Sascha Hauer wrote:
>> On Tue, Mar 18, 2025 at 12:33:05PM +0100, Sascha Hauer wrote:
>>> On Mon, Mar 17, 2025 at 04:18:32PM +0100, Ahmad Fatoum wrote:
Hello Sascha,
On 3/12/25 13:16, Sascha Hauer wrote:
> +
>
Android Verified Boot (AVB) 2.0 spec. revision 1.1 introduces support
for named persistent values that must be tamper evident and allows AVB
to store arbitrary key-value pairs.
While AVB itself is not implemented in barebox. this patch allows
barebox to access the persistent value store. This is u
This adds a function to send a MMC_CMD_SET_BLOCK_COUNT command. This
is not yet needed by barebox as we use open end multiblock transfers,
but will be needed by upcoming RPMB support.
Signed-off-by: Sascha Hauer
---
drivers/mci/mci-core.c | 9 +
include/mci.h | 5 +
2 files
On 3/19/25 16:29, Sascha Hauer wrote:
> On Tue, Mar 18, 2025 at 12:33:05PM +0100, Sascha Hauer wrote:
>> On Mon, Mar 17, 2025 at 04:18:32PM +0100, Ahmad Fatoum wrote:
>>> Hello Sascha,
>>>
>>> On 3/12/25 13:16, Sascha Hauer wrote:
+
+int mci_rpmb_route_frames(struct mci *mci, void *req
This implements the MMC specific part to access RPMB partitions:
- Provide a function to find a RPMB capable eMMC
- partition switching to the RPMB partition
- Dissecting the OP-TEE requests into the correspnding MMC read/write
multiblock commands
For now we only support a single eMMC RPMB part
This implements the OPTEE_RPC_CMD_SHM_ALLOC and OPTEE_RPC_CMD_SHM_FREE
commands to let the secure world allocate and free shared memory.
When OP-TEE calls into the nonsecure world in order to allocate shared
memory we'll need a list of pages returned to the secure world. This
is needed in two case
Signed-off-by: Sascha Hauer
---
include/mach/omap/omap4-devices.h | 93 ---
1 file changed, 93 deletions(-)
diff --git a/include/mach/omap/omap4-devices.h
b/include/mach/omap/omap4-devices.h
deleted file mode 100644
index de73062bc5..00
--- a/include/
This series adds the necessary pieces to provide OP-TEE access to RPMB
partitions under barebox.
With this OP-TEE can issue RPMB requests to barebox and barebox will
answer them accordingly.
OP-TEE will only access the RPMB when triggered by barebox. For this
purpose I implemented access to the A
OP-TEE iterates over the devices and when none are found the OP-TEE
driver returns with an error. Return successfully instead because
for example RPMB support doesn't require any devices exported from
OP-TEE.
Signed-off-by: Sascha Hauer
---
drivers/tee/optee/device.c | 1 +
1 file changed, 1 ins
Export mci_send_cmd() and mci_blk_part_switch() in preparation for
adding RPMB support.
Signed-off-by: Sascha Hauer
---
drivers/mci/mci-core.c | 4 ++--
include/mci.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
i
On Tue, 18 Mar 2025 15:41:41 +0100, Sascha Hauer wrote:
> The am335x_mlo_defconfig is very size constrained and doesn't build
> within these constraint anymore for some time. The filetype detection
> code has become quite big and offers some opportunities for size
> reduction. Specifically file_d
On Tue, Mar 18, 2025 at 12:33:05PM +0100, Sascha Hauer wrote:
> On Mon, Mar 17, 2025 at 04:18:32PM +0100, Ahmad Fatoum wrote:
> > Hello Sascha,
> >
> > On 3/12/25 13:16, Sascha Hauer wrote:
> > > +
> > > +int mci_rpmb_route_frames(struct mci *mci, void *req, unsigned long
> > > reqlen,
> > > +
On Wed, 19 Mar 2025 11:22:28 +0100, Sascha Hauer wrote:
> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
> ttyS as console name. We used to pass ttyO, but c1c0d18973
> ("serial: omap: Use ttyS as Linux console name") recently changed this
> to ttyS which breaks setups that
Hi,
On 3/19/25 12:16, Sascha Hauer wrote:
> On Wed, Mar 19, 2025 at 12:03:31PM +0100, Ahmad Fatoum wrote:
>>
>>
>> On 3/19/25 12:01, Sascha Hauer wrote:
>>> On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
Hello Sascha,
On 3/19/25 11:22, Sascha Hauer wrote:
> Depend
On Wed, Mar 19, 2025 at 12:03:31PM +0100, Ahmad Fatoum wrote:
>
>
> On 3/19/25 12:01, Sascha Hauer wrote:
> > On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
> >> Hello Sascha,
> >>
> >> On 3/19/25 11:22, Sascha Hauer wrote:
> >>> Depending on the configuration Linux on OMAP SoCs ei
On 3/19/25 12:01, Sascha Hauer wrote:
> On Wed, Mar 19, 2025 at 11:55:53AM +0100, Ahmad Fatoum wrote:
>> Hello Sascha,
>>
>> On 3/19/25 11:22, Sascha Hauer wrote:
>>> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
>>> ttyS as console name. We used to pass ttyO, but c1c0d1
Hello Sascha,
On 3/19/25 11:22, Sascha Hauer wrote:
> Depending on the configuration Linux on OMAP SoCs either needs ttyO or
> ttyS as console name. We used to pass ttyO, but c1c0d18973
> ("serial: omap: Use ttyS as Linux console name") recently changed this
> to ttyS which breaks setups that used
Depending on the configuration Linux on OMAP SoCs either needs ttyO or
ttyS as console name. We used to pass ttyO, but c1c0d18973
("serial: omap: Use ttyS as Linux console name") recently changed this
to ttyS which breaks setups that used to work earlier. Make the
name configurable to allow for set
On Wed, 19 Mar 2025 09:36:23 +0100, Sascha Hauer wrote:
> - disable CONFIG_BOARD_GENERIC_DT which is not needed for the MLO
> defconfig
> - disable CONFIG_MTD_NAND_ECC_SW_HAMMING. AM335x uses hardware ECC
> - disable CONFIG_BANNER. Saves another few bytes
>
>
Applied, thanks!
[1/1] ARM: am3
On Mon, 17 Mar 2025 10:34:32 +0100, Sascha Hauer wrote:
> This cleans up some stuff in the mci layer and its drivers.
>
>
Applied, thanks!
[1/6] mci: use struct cid
https://git.pengutronix.de/cgit/barebox/commit/?id=a4a78c4f321a (link may
not be stable)
[2/6] mmc: merge block read/writ
- disable CONFIG_BOARD_GENERIC_DT which is not needed for the MLO
defconfig
- disable CONFIG_MTD_NAND_ECC_SW_HAMMING. AM335x uses hardware ECC
- disable CONFIG_BANNER. Saves another few bytes
Signed-off-by: Sascha Hauer
---
arch/arm/configs/am335x_mlo_defconfig | 7 ---
1 file changed, 4 i
Hi Alexander,
On Tue, Mar 18, 2025 at 06:01:19PM +0300, Alexander Shiyan wrote:
> Hello Sascha!
>
> I've been using a separate config for this board for a long time :)
> Maybe you can take something from my working configuration that
> has been working for several years:
> https://github.com/shcg
49 matches
Mail list logo