[PATCH] defaultenv-2: init: don't call timeout again if the user intervened

2015-02-16 Thread Michael Olbrich
With autoboot_timeout=0 the second 'timeout' might not get another character even if the user keeps a key pressed. So just reuse the key from the first call. Signed-off-by: Michael Olbrich --- defaultenv/defaultenv-2-base/bin/init | 7 +-- 1 file changed, 5 insertions(+), 2

[PATCH 3/3] ARM Samsung: add simple NAND barebox update handler

2015-02-24 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- I'm not sure if writing to /dev/nand0.barebox.bb is correct. But from what I can tell, the nand boot code cannot handle bad blocks, so it probably doesn't matter anyways. Michael arch/arm/boards/friendlyarm-mini2440/mini2440.c | 3 + arch/arm/ma

[PATCH 2/3] friendlyarm-mini2440: add support for the W35 display

2015-02-24 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- I'm not quite sure about the sync flags. I tried to match what the kernel does and it looks correct here. Michael arch/arm/boards/friendlyarm-mini2440/Kconfig| 6 ++ arch/arm/boards/friendlyarm-mini2440/mini2440.c | 17 + 2

[PATCH 1/3] ARM Samsung: fix booting from NAND without pbl

2015-02-24 Thread Michael Olbrich
This was broken in 558d72dc5116 (ARM Samsung: fix booting from NAND with pbl). '_text' is TEXT_BASE when building without pbl and (TEXT_BASE - SZ_2M) when building with pbl, so this works in both cases. Signed-off-by: Michael Olbrich --- I hope I understood how this should work a

[PATCH] ARM Samsung: add simple NAND barebox update handler

2015-02-25 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- v2: write to the non bb device. That means, write() will fail, when it hits a bad block, right? Michael arch/arm/boards/friendlyarm-mini2440/mini2440.c | 3 + arch/arm/mach-samsung/Kconfig | 6 ++ arch/arm/mach-samsung/Makefile

[PATCH 4/7] efi: add helper to get the GPT partition UUID for a device

2015-07-16 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- common/efi-devicepath.c | 31 +++ include/efi.h | 1 + 2 files changed, 32 insertions(+) diff --git a/common/efi-devicepath.c b/common/efi-devicepath.c index a53c6d2e8b9b..fdb86afc8eca 100644 --- a/common/efi-devicepath.c

[PATCH 7/7] efi: write volatile EFI variables used by systemd

2015-07-16 Thread Michael Olbrich
LoaderTimeInitUSec and LoaderTimeExecUSec are used e.g. in systemd-analyze to calculate the time spent in the firmare and barebox. LoaderDevicePartUUID is used to mount the EFI partition to /boot. Signed-off-by: Michael Olbrich --- arch/efi/efi/efi-image.c | 5 + arch/efi/efi/efi.c

[PATCH 1/7] efi: improve malloc pool allocation

2015-07-16 Thread Michael Olbrich
Use allocate_pages() instead of allocate_pool(). With allocate_pages() we can specify the address. This way, any address passed to the kernel will never exceed the lower 32 bit. If possible, try to allocate a larger pool. Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 20

[PATCH 0/7] EFI updates

2015-07-16 Thread Michael Olbrich
Hi, Just some changes to improve initrd handling and better integration with systemd. Tested with qemu and my laptop. Booting Debian with works without problems. Michael Michael Olbrich (7): efi: improve malloc pool allocation efi: refactor & improve application loading code efi:

[PATCH 5/7] efi: export device_path_from_handle()

2015-07-16 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- include/efi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/efi.h b/include/efi.h index b6ee42b3fd49..830e0457dd1c 100644 --- a/include/efi.h +++ b/include/efi.h @@ -622,6 +622,7 @@ static inline int efi_compare_guid(efi_guid_t *a, efi_guid_t *b

[PATCH 2/7] efi: refactor & improve application loading code

2015-07-16 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- checkpatch.pl complains about the header change here. My change matches the surrounding declarations, so I left it like this. arch/efi/efi/efi-image.c | 57 ++-- include/efi.h| 2 +- 2 files changed, 46

[PATCH 3/7] efi: add support for initrd loading

2015-07-16 Thread Michael Olbrich
The kernel EFI code can load the initrd from a path. However, that only works if the initrd is in the EFI boot partition. With these changes, any initrd accessible by barebox can be used. Signed-off-by: Michael Olbrich --- arch/efi/efi/efi-image.c | 136

[PATCH 6/7] efi: add helper functions to write EFI variables

2015-07-16 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 27 +++ arch/efi/include/mach/efi.h | 4 2 files changed, 31 insertions(+) diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c index c05d183c02fa..b0e98f95b02b 100644 --- a/arch/efi/efi/efi.c +++ b

Re: [PATCH 4/7] efi: add helper to get the GPT partition UUID for a device

2015-07-16 Thread Michael Olbrich
On Thu, Jul 16, 2015 at 11:34:25AM +0200, Marc Kleine-Budde wrote: > On 07/16/2015 10:43 AM, Michael Olbrich wrote: > > Signed-off-by: Michael Olbrich > > --- > > common/efi-devicepath.c | 31 +++ > > include/efi.h | 1 + > >

Re: [PATCH 7/7] efi: write volatile EFI variables used by systemd

2015-07-17 Thread Michael Olbrich
On Thu, Jul 16, 2015 at 10:08:48PM +0200, Sascha Hauer wrote: > On Thu, Jul 16, 2015 at 10:43:56AM +0200, Michael Olbrich wrote: > > LoaderTimeInitUSec and LoaderTimeExecUSec are used e.g. in systemd-analyze > > to calculate the time spent in the firmare and barebox. > > >

[PATCH 05/16] efi: add support for initrd loading

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- v2: xmemalign arch/efi/efi/efi-image.c | 136 ++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/arch/efi/efi/efi-image.c b/arch/efi/efi/efi-image.c index c88b3a0766ed..de9b27755663 100644 --- a/arch

[PATCH 07/16] efi: export device_path_from_handle()

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- include/efi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/efi.h b/include/efi.h index b6ee42b3fd49..830e0457dd1c 100644 --- a/include/efi.h +++ b/include/efi.h @@ -622,6 +622,7 @@ static inline int efi_compare_guid(efi_guid_t *a, efi_guid_t *b

[PATCH 16/16] efi: use an EFI variable to save the environment

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 5 + common/efi-guid.c | 1 + include/efi.h | 1 + 3 files changed, 7 insertions(+) diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c index 07a4d9d0fc57..d3f520f60f14 100644 --- a/arch/efi/efi/efi.c +++ b/arch/efi/efi/efi.c

[PATCH 15/16] fs: efivars: read the attributes on the second get_variable()

2015-07-17 Thread Michael Olbrich
Some EFI get_variable() implementations don't set the attributes when returning EFI_BUFFER_TOO_SMALL. Signed-off-by: Michael Olbrich --- fs/efivarfs.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/efivarfs.c b/fs/efivarfs.c index 87fc771739e2..c7a282b05c63 1

[PATCHv2 00/16] EFI updates

2015-07-17 Thread Michael Olbrich
t in an EFI variable. Michael Olbrich (16): xfuncs: add xasprintf() and xvasprintf() xfuncs: add wrapper for wchar strdup functions efi: improve malloc pool allocation efi: refactor & improve application loading code efi: add support for initrd loading efi: add helper to get the GPT par

[PATCH 12/16] fs: efi: use xstrdup_* when appropriate

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- fs/efi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/efi.c b/fs/efi.c index 8f4739a99e24..a7adcb98db57 100644 --- a/fs/efi.c +++ b/fs/efi.c @@ -114,9 +114,9 @@ static wchar_t *path_to_efi(const char *path) wchar_t *ret

[PATCH 14/16] fs: efivars: add more error checking

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- fs/efivarfs.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fs/efivarfs.c b/fs/efivarfs.c index 925e8e8be113..87fc771739e2 100644 --- a/fs/efivarfs.c +++ b/fs/efivarfs.c @@ -269,6 +269,7 @@ static int efivarfs_read(struct

[PATCH 02/16] xfuncs: add wrapper for wchar strdup functions

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- include/xfuncs.h | 5 + lib/xfuncs.c | 31 +++ 2 files changed, 36 insertions(+) diff --git a/include/xfuncs.h b/include/xfuncs.h index c7c0203f375b..b53cfdcddd31 100644 --- a/include/xfuncs.h +++ b/include/xfuncs.h @@ -3,6

[PATCH 01/16] xfuncs: add xasprintf() and xvasprintf()

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- include/xfuncs.h | 3 +++ lib/xfuncs.c | 24 2 files changed, 27 insertions(+) diff --git a/include/xfuncs.h b/include/xfuncs.h index 8efc99dbc455..c7c0203f375b 100644 --- a/include/xfuncs.h +++ b/include/xfuncs.h @@ -2,6 +2,7

[PATCH 10/16] efi: use xasprintf() when appropriate

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/efi/efi-block-io.c | 2 +- arch/efi/efi/efi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/efi/efi/efi-block-io.c b/arch/efi/efi/efi-block-io.c index 85603d913d5b..e02d3b49cc99 100644 --- a/arch/efi/efi/efi-block

[PATCH 13/16] fs: efivars: use xstrdup_* when appropriate

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- fs/efivarfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/efivarfs.c b/fs/efivarfs.c index ebace8bc8fb1..925e8e8be113 100644 --- a/fs/efivarfs.c +++ b/fs/efivarfs.c @@ -153,7 +153,7 @@ static int efivars_create(struct device_d

[PATCH 04/16] efi: refactor & improve application loading code

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- v2: use xstrdup_char_to_wchar() arch/efi/efi/efi-image.c | 57 ++-- include/efi.h| 2 +- 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/arch/efi/efi/efi-image.c b/arch/efi/efi/efi

[PATCH 09/16] efi: write volatile EFI variables used by systemd

2015-07-17 Thread Michael Olbrich
LoaderTimeInitUSec and LoaderTimeExecUSec are used e.g. in systemd-analyze to calculate the time spent in the firmare and barebox. LoaderDevicePartUUID is used to mount the EFI partition to /boot. Signed-off-by: Michael Olbrich --- v2: use xstrdup_char_to_wchar() and free uuid/uuid16 arch/efi

[PATCH 06/16] efi: add helper to get the GPT partition UUID for a device

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- v2: use xasprintf() common/efi-devicepath.c | 30 ++ include/efi.h | 1 + 2 files changed, 31 insertions(+) diff --git a/common/efi-devicepath.c b/common/efi-devicepath.c index a53c6d2e8b9b..a1cd0952f929 100644 --- a

[PATCH 11/16] efi: use xstrdup_* when appropriate

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c index 6cffac60f54b..07a4d9d0fc57 100644 --- a/arch/efi/efi/efi.c +++ b/arch/efi/efi/efi.c @@ -52,7 +52,7 @@ void

[PATCH 03/16] efi: improve malloc pool allocation

2015-07-17 Thread Michael Olbrich
Use allocate_pages() instead of allocate_pool(). With allocate_pages() we can specify the address. This way, any address passed to the kernel will never exceed the lower 32 bit. If possible, try to allocate a larger pool. Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 20

[PATCH 08/16] efi: add helper functions to write EFI variables

2015-07-17 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/efi/efi.c | 27 +++ arch/efi/include/mach/efi.h | 4 2 files changed, 31 insertions(+) diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c index c05d183c02fa..b0e98f95b02b 100644 --- a/arch/efi/efi/efi.c +++ b

[PATCH] efi: enable blspec in the defconfig

2015-07-25 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/configs/efi_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/efi/configs/efi_defconfig b/arch/efi/configs/efi_defconfig index 456f70d32b59..3c9a9dcb956e 100644 --- a/arch/efi/configs/efi_defconfig +++ b/arch/efi/configs/efi_defconfig

[PATCH] fixup! efi: add helper to get the GPT partition UUID for a device

2015-07-25 Thread Michael Olbrich
--- I'm not sure why I didn't notice this before. This is needed to generate the correct UUID. Otherwise systemd fails to mount the EFI partition. Michael common/efi-devicepath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/efi-devicepath.c b/common/efi-devicepath.

Re: Booting Linux bzImage on x86_64

2015-10-30 Thread Michael Olbrich
Hi, On Wed, Oct 28, 2015 at 09:50:06PM +0100, Viktor Stark wrote: > I recently discovered barebox and I am trying to boot a Linux bzImage on an > x86_64 embedded platform. > > Some background: My project involves an x86_64 embedded device for which I am > building a bzImage and a root filesystem

[PATCH] fixup! efi: move x86 efi boot support to x86 arch

2017-03-07 Thread Michael Olbrich
As I noted in my other mail, this got lost during the move. Regards, Michael --- arch/x86/Makefile | 4 ++-- arch/x86/mach-efi/elf_x86_64_efi.lds.S | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index e837a2df972c.

Re: [PATCH 1/2] video: add EFI Graphics Output Protocol support

2017-03-09 Thread Michael Olbrich
On Mon, Mar 06, 2017 at 06:04:10AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > drivers/video/Kconfig | 4 + > drivers/video/Makefile | 2 + > drivers/video/efi_gop.c | 267 > > 3

[PATCH 1/2] efi: load the protocol expected by the driver

2017-03-11 Thread Michael Olbrich
The drivers are loaded if any guid provided by the device matches. So load the protocol for the matched guid and not for the first guid. Otherwise the driver may cast the protocol to the wrong type and proably crash. Signed-off-by: Michael Olbrich --- drivers/efi/efi-device.c | 7 --- 1

[PATCH 2/2] efi: only iterate over handles that provide the device path protocol

2017-03-11 Thread Michael Olbrich
All other handled are skipped anyways. Signed-off-by: Michael Olbrich --- drivers/efi/efi-device.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c index c5fb404cd36b..db3c0afe3361 100644 --- a/drivers/efi/efi-device.c

Re: [PATCH 2/2 v2] efi: add serial driver support

2017-03-11 Thread Michael Olbrich
On Mon, Mar 06, 2017 at 10:34:47AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > So now we can stop to use the efi-stdio as this driver > print on the Framebuffer and the serial at the same time. > > This is specially usefull if we want to use the framebuffer via efi-gop for > something else.

Re: [PATCH 0/12] EFI: drop arch efi

2017-03-11 Thread Michael Olbrich
On Wed, Feb 15, 2017 at 08:29:32PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Today the EFI is build as an other ARCH when in fact it's just a boot mode > > so move it back to arch/x86 for the spicific x86 part and the common > to common and driver > > The last 3 patches allow to debug EFI

Re: [PATCH 0/2] efivarfs: rework the filesystem to make it human readable

2017-03-13 Thread Michael Olbrich
Hi, On Mon, Mar 13, 2017 at 08:24:42AM +0100, Sascha Hauer wrote: > On Thu, Mar 09, 2017 at 03:38:40PM +0100, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > Sascha is this one ok? > > I asked Michael to have a look at this series, so far he didn't find > time. I'm not sure I like it this way

Re: [PATCH 0/12] EFI: drop arch efi

2017-03-13 Thread Michael Olbrich
On Sun, Mar 12, 2017 at 01:05:38PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 17:26 Sat 11 Mar , Michael Olbrich wrote: > > On Wed, Feb 15, 2017 at 08:29:32PM +0100, Jean-Christophe PLAGNIOL-VILLARD > > wrote: > > > Today the EFI is build as an other ARCH

Re: [PATCH 7/8] efi: clocksoure: use event for timer

2017-03-13 Thread Michael Olbrich
On Mon, Feb 27, 2017 at 11:19:29AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > with this we can be hw generic > > If the EFI implement timestamp protocol we could use instead of event > but even EDK2 Never Ever compile it for any target. > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD

[PATCH] fixup! efi: clocksoure: add EFI event timer

2017-03-13 Thread Michael Olbrich
--- I played with the numbers a bit. This hardware has a 18 Hz tick :-/. That's not really useful so just skipping the clocksource is probably the best solution. Michael drivers/clocksource/efi.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/efi.c b/drivers/clockso

[PATCH] efi: clocksoure: make sure the meassured frequency is valid

2017-03-14 Thread Michael Olbrich
Some EFI implementations have a even slower tick rate and the meassured frequency may be zero. Signed-off-by: Michael Olbrich Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/clocksource/efi.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/efi.c b/drivers

Re: [PATCH 01/13] bootm: move open to image_handler

2017-03-26 Thread Michael Olbrich
On Sun, Mar 26, 2017 at 04:44:52AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > arch/arm/lib/bootm.c | 2 + > arch/blackfin/lib/blackfin_linux.c | 1 + > arch/nios2/lib/bootm.c | 1 + > arch/ppc/lib/ppclinux

Re: [PATCH 06/13] boot_verify: make it modifiable at start time

2017-03-26 Thread Michael Olbrich
On Sun, Mar 26, 2017 at 04:44:57AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > commands/bootm.c | 2 +- > common/boot_verify.c | 39 +-- > common/bootm.c| 2 +- > include/boot_verify.

Re: [PATCH 07/13] go: only use it if boot signature is not required

2017-03-26 Thread Michael Olbrich
On Sun, Mar 26, 2017 at 04:44:58AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Does this realy help? If someone has access to the barebox shell, then there are many ways to overwrite the secure boot check. Michael > --- > commands/go.c | 4

Re: [PATCH 08/13] boot_verify: allow to force unsigned image to boot

2017-03-26 Thread Michael Olbrich
On Sun, Mar 26, 2017 at 04:44:59AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > request confirmation before booting an unsigned image > > with a default timeout > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > commands/go.c | 9 +++-- > common/Kconfig| 8 ++

Re: [PATCH 11/13] efi: fix lds for secure boot support

2017-03-26 Thread Michael Olbrich
On Sun, Mar 26, 2017 at 04:45:02AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > everythink need to be aligned to 4096 As Lucas noted the last time, this deserves a comment why this is needed. Just a reference to the EFI spec (I think?) or something like that. > Signed-off-by: Jean-Christophe

Re: [PATCH 2/8] common: efi: do not use undefined kconfig option

2017-07-06 Thread Michael Olbrich
On Wed, Jul 05, 2017 at 01:05:25PM +0200, Lucas Stach wrote: > Am Mittwoch, den 05.07.2017, 12:56 +0200 schrieb Steffen Trumtrar: > > Signed-off-by: Steffen Trumtrar > > --- > > common/efi/efi.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/common/efi/efi.c b/c

Re: stable release v2017.05.4, v2017.06.2, v2017.07.1

2017-07-16 Thread Michael Olbrich
Hi, On Fri, Jul 14, 2017 at 05:04:25PM +0200, Lucas Stach wrote: > I've just pushed out a new set of Barebox stable releases: [...] Can you please sign the tags next time? It's usefull in general and CONFIG_LOCALVERSION_AUTO for these tags. Regards, Michael -- Pengutronix e.K.

Re: [PATCH 2/2] efi-block: detect when the block device is a USB Disk

2017-11-02 Thread Michael Olbrich
On Fri, Oct 27, 2017 at 09:05:48AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > use usbdisk as a basename > > This will be usefull as example when we want to search for a usb disk for > failsafe update or install. I understand the use-case, but this breaks a different setup: Until now 'disk0

[PATCH] scripts/compiler.h: inline functions in headers must be static

2018-02-06 Thread Michael Olbrich
xf4): undefined reference to `xmalloc' /tmp/cc9G2oOY.o: In function `envfs_save': bareboxenv.c:(.text+0x5b4): undefined reference to `xzalloc' /tmp/cc9G2oOY.o: In function `envfs_load': bareboxenv.c:(.text+0x7d8): undefined reference to `xmalloc' collect2: error: ld returned 1 exi

Re: MIPS parallel build breakage

2018-03-01 Thread Michael Olbrich
Hi, On Thu, Mar 01, 2018 at 12:07:29PM +0100, Sascha Hauer wrote: > (Antony because you introduced this and Sam because you have intimate > knowledge with our build system ;) > > I am trying to solve a problem that annoys me for some years now. The > problem is that the MIPS defconfigs regularly

Re: i.MX53 QSB

2012-01-26 Thread Michael Olbrich
On Thu, Jan 26, 2012 at 11:32:32AM +1100, Marc Reilly wrote: > Hi, > > > > If I am booting from the SD card how do I get it onto the card > > > > > > dd if=barebox.bin of=/dev/sdc bs=512 seek=2 ?? > > > > cat barebox.bin > /dev/sdc > > > > Of course this means that you will overwrite the partit

Re: [PATCH 3/6] make: check for greadlink first, fall back to readlink

2012-06-05 Thread Michael Olbrich
On Mon, Jun 04, 2012 at 10:40:16PM +0200, Dirk Hörner wrote: > OS X' readlink does not have an -f option. > > Signed-off-by: Dirk Hörner > --- > common/Makefile |4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/common/Makefile b/common/Makefile > index 9c14d7b..48cf

Re: Flashing automatically the default environment

2012-07-10 Thread Michael Olbrich
On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote: > When booting a new board with barebox it detect that the nand > partition dedicated to environment is invalid and barebox use the > default config. > I would like that in this case (the first boot) the default config > is flashed in the nan

Re: Flashing automatically the default environment

2012-07-10 Thread Michael Olbrich
On Tue, Jul 10, 2012 at 11:06:47AM +0200, Uwe Kleine-König wrote: > On Tue, Jul 10, 2012 at 10:18:33AM +0200, Michael Olbrich wrote: > > On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote: > > > When booting a new board with barebox it detect that the nand > >

Re: [PATCH 2/2] x86/config/efi: drop DRIVER_SERIAL_NS16550

2020-10-26 Thread Michael Olbrich
On Tue, Oct 20, 2020 at 09:35:30AM +0200, Ahmad Fatoum wrote: > On 10/20/20 9:26 AM, Uwe Kleine-König wrote: > > On Tue, Oct 20, 2020 at 07:08:47AM +0200, Ahmad Fatoum wrote: > >> Hello Uwe, > >> > >> On 9/18/20 1:04 PM, Uwe Kleine-König wrote: > >>> For most machines having DRIVER_SERIAL_NS16550 a

Re: [PATCH 1/2] blspec: allow board files to overwrite config file settings

2021-01-20 Thread Michael Olbrich
On Wed, Jan 20, 2021 at 11:54:22AM +0100, Marco Felsch wrote: > On 21-01-20 10:03, Sascha Hauer wrote: > > On Tue, Jan 19, 2021 at 12:42:08PM +0100, Marco Felsch wrote: > > > Hi Sascha, > > > > > > On 21-01-19 12:01, Sascha Hauer wrote: > > > > Hi Marco, > > > > On Mon, Jan 18, 2021 at 09:48:49PM

Re: [PATCH] readline_simple: Fix compiler warning

2021-05-12 Thread Michael Olbrich
On Wed, May 12, 2021 at 07:44:40AM +0200, Sascha Hauer wrote: > char is an unsigned type. That's incorrect. In the C standard it is explicitly undefined whether char is signed or unsigned. gcc implements this differently depending on the architecture. I think ARM and x86 differ here. Michael > T

[PATCH] mtd: spi-nor: Add support for gd25q16

2021-05-20 Thread Michael Olbrich
The entry is imported from Linux v5.12. It can befound on new versions of the Boundary Devices i.MX6 Quad Nitrogen6x boards. Signed-off-by: Michael Olbrich --- drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor

Re: [PATCH v2 4/4] fastboot: Add a ARM Barebox filetype handler

2016-02-18 Thread Michael Olbrich
On Wed, Feb 17, 2016 at 12:28:20PM +0100, Markus Pargmann wrote: > This will automatically call barebox_update for the transfered file if > it is an ARM Barebox image and the destination file is defined by some > update handler. > > Signed-off-by: Markus Pargmann > --- > common/filetype.c

[PATCH] efi: let the generic relocate code handle all relocations

2016-04-05 Thread Michael Olbrich
.rela.initcall* sections to the normal .rela section. The RELASZ now contains the correct size and the generic relocation code works correctly. 'fixup_tables()' must be removed at the same time to avoid relocating these entries twice. Signed-off-by: Michael Olbrich --- arc

[PATCH] mci: mmci: Fix read FIFO handling

2016-09-02 Thread Michael Olbrich
et the read counter. As a result, MCI_DATABLOCKEND is never set and read_bytes() waits forever. With this change, SD-Card support on qemu vexpress works correctly. Signed-off-by: Michael Olbrich --- drivers/mci/mmci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drive

[PATCH] mtd: make sure address-cells/size-cells are set when adding partition nodes

2016-09-14 Thread Michael Olbrich
address-cells/size-cells can either be set to 1 or 2 for 32 or 63 bit addresses respectively. Barebox currently writes 32 bit addresses. This makes sure that address-cells/size-cells are both set and have the correct value. Signed-off-by: Michael Olbrich --- Hi, this is just a minor fix. What

[PATCH 2/2] state: fix finding the correct parent node

2016-09-14 Thread Michael Olbrich
Looking for the parent node during fixup is broken. The path of the parent node is not correctly terminated ('0' vs '\0'). Also, the new state node should be added to the supplied device tree not the barebox device tree used by of_find_node_by_path(). Signed-off-by: Michael

[PATCH 1/2] state: don't keep pointers to any device tree data

2016-09-14 Thread Michael Olbrich
Caching pointers to device tree nodes or names is not save. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. Use local copies of the full path instead and resolve the node as needed. Signed-off-by: Michael Olbrich --- common/state/backend.c

Re: [PATCH 1/2] state: don't keep pointers to any device tree data

2016-09-15 Thread Michael Olbrich
On Thu, Sep 15, 2016 at 10:13:36AM +0200, Sascha Hauer wrote: > On Thu, Sep 15, 2016 at 08:10:13AM +0200, Michael Olbrich wrote: > > Caching pointers to device tree nodes or names is not save. The barebox > > internal device tree may be changed by loading a new device tree or th

[PATCH v2 1/3] state: copy backend of_path string

2016-09-15 Thread Michael Olbrich
Caching pointers to device tree nodes or names is not save. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. As a result, the string may be deleted. Use local copies of the full path instead. Signed-off-by: Michael Olbrich --- Changes since

[PATCH v2 3/3] state: fix finding the correct parent node

2016-09-15 Thread Michael Olbrich
Looking for the parent node during fixup is broken. The path of the parent node is not correctly terminated ('0' vs '\0'). Also, the new state node should be added to the supplied device tree not the barebox device tree used by of_find_node_by_path(). Signed-off-by: Michael

[PATCH v2 2/3] state: don't keep pointers to device tree nodes

2016-09-15 Thread Michael Olbrich
. Signed-off-by: Michael Olbrich --- Changes since v1: - First patch split into two patches common/state/state.c | 19 --- common/state/state.h | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/common/state/state.c b/common/state/state.c index 9b1d4edef132

[PATCH 1/5] readkey: keys are unsigned char

2017-01-23 Thread Michael Olbrich
Otherwise values > 127 will become negative and are dropped. Signed-off-by: Michael Olbrich --- lib/readkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/readkey.c b/lib/readkey.c index 2870a5a9fee5..e72da0066bdc 100644 --- a/lib/readkey.c +++ b/lib/readke

[PATCH 0/5] EFI fixes

2017-01-23 Thread Michael Olbrich
A few small fixes to improve the barebox experience on EFI. Not all are strictly EFI specific, but that's where I came across the problems. Regards, Michael Michael Olbrich (5): readkey: keys are unsigned char serial: efi: improve input handling output: use '[0m' to res

[PATCH 2/5] serial: efi: improve input handling

2017-01-23 Thread Michael Olbrich
0x08 is the scan-code for 'backspace' not 'delete'. 0x17 indicates the start of an escape sequence, such as "[3~" for 'delete'. Signed-off-by: Michael Olbrich --- drivers/serial/efi-stdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

[PATCH 3/5] output: use '[0m' to reset colors

2017-01-23 Thread Michael Olbrich
'[m' is supposed to have the same effect as '[0m'. However, some EFI implementations seem to ignore '[m', so use '[0m' everywhere to avoid rendering issues. Signed-off-by: Michael Olbrich --- commands/2048.c | 2 +- common/menu.c | 2 +- includ

[PATCH 5/5] efi: don't unload drivers

2017-01-23 Thread Michael Olbrich
EFI applications should be unloaded to avoid leaking memory. However, boot or runtime services continue in the background. So they must not be unloaded. Signed-off-by: Michael Olbrich --- arch/efi/efi/efi-image.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/efi

[PATCH 4/5] efi: include and execute exit calls

2017-01-23 Thread Michael Olbrich
Signed-off-by: Michael Olbrich --- arch/efi/Makefile | 4 ++-- arch/efi/efi/efi-image.c | 2 ++ arch/efi/lib/elf_x86_64_efi.lds.S | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/efi/Makefile b/arch/efi/Makefile index b078bd0e356d..32a1c152b791

Re: [PATCH 07/12] efi: move x86 efi boot support to x86 arch

2017-02-15 Thread Michael Olbrich
On Wed, Feb 15, 2017 at 08:34:15PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > prepare to drop the efi arch as efi boot up is not arch sepecific > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > Documentation/boards/efi.rst | 2 +- > arch/x86/Kconfig

Re: [PATCH 0/12] EFI: drop arch efi

2017-02-15 Thread Michael Olbrich
Hi, On Wed, Feb 15, 2017 at 08:29:32PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Today the EFI is build as an other ARCH when in fact it's just a boot mode > > so move it back to arch/x86 for the spicific x86 part and the common > to common and driver > > The last 3 patches allow to debu

Re: [PATCH 0/12] EFI: drop arch efi

2017-02-15 Thread Michael Olbrich
Hi, On Thu, Feb 16, 2017 at 08:38:11AM +0100, Michael Olbrich wrote: > On Wed, Feb 15, 2017 at 08:29:32PM +0100, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > Today the EFI is build as an other ARCH when in fact it's just a boot mode > > > > so move it back to arch/

[PATCH] net: ifup: pass hostname and linuxdevname to linux with DHCP

2023-04-26 Thread Michael Olbrich
static configurations. Do the same for DHCP. Signed-off-by: Michael Olbrich --- net/ifup.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/ifup.c b/net/ifup.c index 1870f7401714..18ab1363c748 100644 --- a/net/ifup.c +++ b/net/ifup.c @@ -159,8 +159,8 @@ out: static

Re: Build failures with CC=arm-linux-gnueabihf-gcc-11

2021-11-19 Thread Michael Olbrich
On Thu, Nov 18, 2021 at 03:32:04PM +, Ian Abbott wrote: > Hi, > > My Debian "testing" build system updated the default version of > arm-linux-gnueabihf-gcc from 10.x to 11.x. Building barebox in thumb-2 mode > for an ARMv7 (it's a SoCFPGA) with this compiler fails with assembler errors > such

Re: [PATCH] efi: skip devices without driver in efi_pause/continue_devices()

2022-01-18 Thread Michael Olbrich
On Tue, Jan 18, 2022 at 02:43:17PM +0100, Philipp Zabel wrote: > Skip devices on the EFI bus that do not have a driver assigned. > > Fixes: f68a547deebd ("efi: add efi_device hook to be called before an image > is started") > Signed-off-by: Philipp Zabel Tested-by:

Re: [PATCH] kbuild: dtc: use env to resolve echo

2022-01-20 Thread Michael Olbrich
On Thu, Jan 20, 2022 at 09:56:49AM +0100, Sascha Hauer wrote: > On Thu, Jan 20, 2022 at 08:47:33AM +0100, Rouven Czerwinski wrote: > > Posix does not mandate to have binaries within a certain path, but > > rather that the utilities may be available. Use env to resolve and call > > echo from PATH. >

[PATCH 0/3] state: find backend with UUID but without a partition

2022-01-24 Thread Michael Olbrich
defined by a UUID that selects a disk and an offset within that disk. Michael Michael Olbrich (3): cdev: rename partuuid to uuid cdev: add diskuuid support state: support backend-diskuuid / backend-offset common/bootm.c | 6 ++--- common/partitions.c| 2 +- common/

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

2022-01-24 Thread 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 --- common/bootm.c | 6 +++--- common/partitions.c| 2 +- common/partitions/parser.h | 2 +- fs/devfs-core.c

[PATCH 3/3] state: support backend-diskuuid / backend-offset

2022-01-24 Thread Michael Olbrich
specified offset. Signed-off-by: Michael Olbrich --- I wasn't sure where to add the helper function. Is include/fs.h ok or should I put it somewhere else? I'll implement the same helper for dt-utils, so we can avoid additional #ifdef here. common/state/st

[PATCH 2/3] cdev: add diskuuid support

2022-01-24 Thread 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 --- common/partitions/dos.c | 3 +++ common/partitions/efi.c | 2 ++ fs/devfs-core.c

Re: [PATCH 3/3] state: support backend-diskuuid / backend-offset

2022-01-26 Thread Michael Olbrich
On Wed, Jan 26, 2022 at 08:57:27AM +0100, Sascha Hauer wrote: > On Mon, Jan 24, 2022 at 11:04:58AM +0100, Michael Olbrich wrote: > > On some platforms (e.g. EFI on x86_64) the state backend can only be > > selected by a partiton UUID. On existing devices with a DOS partition >

Re: [PATCH 3/3] state: support backend-diskuuid / backend-offset

2022-01-26 Thread Michael Olbrich
On Wed, Jan 26, 2022 at 11:15:24AM +0100, Sascha Hauer wrote: > On Wed, Jan 26, 2022 at 10:35:13AM +0100, Michael Olbrich wrote: > > On Wed, Jan 26, 2022 at 08:57:27AM +0100, Sascha Hauer wrote: > > > On Mon, Jan 24, 2022 at 11:04:58AM +0100, Michael Olbrich wrote: > > &g

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

2022-02-07 Thread Michael Olbrich
e. Signed-off-by: Michael Olbrich --- I've tested the series and with this aditional patch it works on EFI, so Tested-by: Michael Olbrich Michael common/efi/payload/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/efi/payload/init.c b/common/efi/paylo

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

2022-02-08 Thread Michael Olbrich
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

Re: [PATCH v3 2/2] fastboot: bail if update handler couldn't be found for bbu-partition

2022-06-09 Thread Michael Olbrich
On Thu, Jun 09, 2022 at 04:12:39PM +0200, Ahmad Fatoum wrote: > On 09.06.22 16:10, Sascha Hauer wrote: > > On Thu, Jun 09, 2022 at 03:09:36PM +0200, Ahmad Fatoum wrote: > >> Fastboot would fall back to a raw copy even for bbu- partitions if > >> no barebox_update handler was found. Prevent this by

Re: [PATCH 2/3] commands: implement devlookup to find device behind device file

2022-06-30 Thread Michael Olbrich
On Thu, Jun 30, 2022 at 02:40:34PM +0200, Ahmad Fatoum wrote: > For OF-enabled platforms with aliases, device file naming is pretty much > solved: If there is mmc2 = &something, then we have a mmc2 device and > a /dev/mmc2 device file. For other platforms like x86, EFI-provided > devices are harder

Re: [PATCH 1/3] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash

2019-12-02 Thread Michael Olbrich
On Thu, Nov 28, 2019 at 12:19:44AM +0100, Florian Klink wrote: > Some distributions might not have bash in /bin, but in $PATH. > > Using #!/usr/bin/env bash solves this, and is consistent with how the > perl and python shebangs look like in the tree. > --- > scripts/canon-a1100-image| 2 +

Re: [PATCH 1/3] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash

2019-12-03 Thread Michael Olbrich
On Tue, Dec 03, 2019 at 09:45:28AM +0100, Sascha Hauer wrote: > On Tue, Dec 03, 2019 at 07:46:03AM +0100, Michael Olbrich wrote: > > On Thu, Nov 28, 2019 at 12:19:44AM +0100, Florian Klink wrote: > > > Some distributions might not have bash in /bin, but in $PATH. > > >

Re: [PATCH] replace barebox* in .gitignore with individual files

2012-11-15 Thread Michael Olbrich
On Wed, Nov 14, 2012 at 09:21:41AM +0100, Sascha Hauer wrote: > This effectively reverts: > > | commit f9df22b002af99532b66360e08128ea3e7e82a97 > | Author: Alexander Shiyan > | Date: Mon Oct 8 10:35:04 2012 +0400 > | > |Add more generated files to .gitignore > > barebox* is not limited to

  1   2   >