Re: [PATCH RFC 10/10] board: ti: j721e: Enable ESM initialization for J7200

2023-11-15 Thread Neha Malcom Francis
Hi Tom, Trying to bring back this series here. On 03/10/23 20:40, Tom Rini wrote: On Tue, Oct 03, 2023 at 07:57:04PM +0530, Kumar, Udit wrote: On 10/3/2023 1:40 PM, Keerthy wrote: Enable ESM initialization for J7200 Signed-off-by: Keerthy --- board/ti/j721e/evm.c | 6 -- 1 file ch

Re: [PATCH 0/2] Cleanup K3 binman FIT images

2023-11-15 Thread Neha Malcom Francis
Hi Marcel, On 15/11/23 23:03, Marcel Ziswiler wrote: Hi Neha On Wed, 2023-11-15 at 15:40 +0530, Neha Malcom Francis wrote: Instead of duplicating the same FIT formats over and over again for different K3 devices, make use of the templating support to have FIT templates for the same. Note: I p

Re: [PATCH 2/2] arm: dts: k3-*-binman: Move to using templated FITs

2023-11-15 Thread Neha Malcom Francis
Hi Andrew, On 15/11/23 21:22, Andrew Davis wrote: On 11/15/23 4:10 AM, Neha Malcom Francis wrote: Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x). S

Re: [PATCH] fs: btrfs: fix reading when length specified

2023-11-15 Thread Qu Wenruo
On 2023/11/12 01:49, Sam Edwards wrote: The btrfs read function limits the read length to ensure that it and the read offset do not together exceed the size of the file. However, this size was only being queried if the read length was passed a value of zero (meaning "whole file"), and the size

[PATCH v2 00/32] bootm: Refactoring to reduce reliance on CMDLINE (part A)

2023-11-15 Thread Simon Glass
It would be useful to be able to boot an OS when CONFIG_CMDLINE is disabled. This could allow reduced code size. Standard boot provides a way to handle programmatic boot, without scripts, so such a feature is possible. The main impediment is the inability to use the booting features of U-Boot with

[PATCH v2 32/32] RFC: command: Introduce functions to obtain command arguments

2023-11-15 Thread Simon Glass
Add some functions which provide an argument to a command, or NULL if the argument does not exist. Use the same numbering as argv[] since it seems less confusing than the previous idea. Signed-off-by: Simon Glass Suggested-by: Tom Rini --- Changes in v2: - Add new patch to obtain command argum

[PATCH v2 31/32] bootm: Reduce arguments to bootm_find_other()

2023-11-15 Thread Simon Glass
Rather than passing the full list of command arguments, pass only those which are needed. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/boot/bootm.c b/boot/bootm

[PATCH v2 30/32] bootm: Add a function to check overlap

2023-11-15 Thread Simon Glass
Move this code into a function to reduce code size and make it easier to understand. Drop the unnecessary 0x to help a little with code size. Use this in bootm_find_images() Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 51 +

[PATCH v2 29/32] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Simon Glass
Rather than passing it all the command-line args, pass in the pieces that it needs. These are the image address, the ramdisk address/name and the FDT address/name. Ultimately this will allow usage of this function without being called from the command line. Move the function comment to the header

[PATCH v2 28/32] bootm: optee: Drop special call to bootm_find_other()

2023-11-15 Thread Simon Glass
The normal bootm flow calls bootm_find_other() can call the BOOTM_STATE_FINDOTHER state as part of its processing. Fix the condition there so that this hack can be removed. Also drop the confusing check for the OS type, since do_bootm_tee() is only called if the condition is met - see bootm_os_get

[PATCH v2 27/32] bootm: efi: Drop special call to bootm_find_other()

2023-11-15 Thread Simon Glass
The normal bootm flow calls bootm_find_other() can call the BOOTM_STATE_FINDOTHER state as part of its processing. Fix the condition there so that this hack can be removed. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootm.c| 10 +- boot/bootm_os.c | 6 -- 2 file

[PATCH v2 26/32] bootm: Simplify Android ramdisk addr in bootm_find_images()

2023-11-15 Thread Simon Glass
The Android mechanism uses the loadaddr envrionment-variable to get the load address, if none is provided. This is equivalent to image_load_addr so use that instead, converting it to a string as needed. This change will permit passing img_addr to this function, in a future change. Signed-off-by:

[PATCH v2 25/32] bootm: Reduce arguments to boot_get_loadables()

2023-11-15 Thread Simon Glass
This function only uses two arguments. The 'arch' always has a constant value, so drop it. This simplifies the function call. Tidy up the function comment while we are here. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 3 +-- boot/image-boa

[PATCH v2 24/32] bootm: Reduce arguments to boot_get_fpga()

2023-11-15 Thread Simon Glass
This function only uses two arguments. The 'arch' always has a constant value, so drop it. This simplifies the function call. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 3 +-- boot/image-board.c | 5 ++--- include/image.h| 9 +++--

[PATCH v2 23/32] bootm: Reduce arguments to boot_get_fdt()

2023-11-15 Thread Simon Glass
This function only uses one argument from bootm (argv[2]) so pass it in directly. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 5 +++-- boot/image-fdt.c | 9 +++-- include/image.h | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-

[PATCH v2 22/32] bootm: Pass image buffer to boot_get_fdt()

2023-11-15 Thread Simon Glass
Rather than having boot_get_fdt() calculate this, move the calculation into the caller. This removes the access to argv[0] in this function, so we can later refactor it to just accept argv[2] instead of the whole argv[]. Move the function comment to the header file and fix the u8 argument, while w

[PATCH v2 21/32] bootm: Drop #ifdef in bootm_find_images()

2023-11-15 Thread Simon Glass
The OF_LIBFDT #ifdef makes it harder to use a local variable for that code block. Convert it to if() instead. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootm.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/boot/

[PATCH v2 20/32] fdt: Allow use of fdt_support inside if() statements

2023-11-15 Thread Simon Glass
Most of the fdt_support.h header file is included only if OF_LIBFDT or OF_CONTROL are enabled. This means that calling functions defined in that file must happen inside an #ifdef This is unnecessary, so reduce the condition to just !USE_HOSTCC Signed-off-by: Simon Glass Reviewed-by: Tom Rini --

[PATCH v2 19/32] bootm: Reduce arguments to boot_get_ramdisk()

2023-11-15 Thread Simon Glass
This function normally only uses one argument so pass it in directly. Move comments to the header file so could one day include these functions in API docs. Fix up the u8 argument while here, since it avoids the compiler having to mask the value on some machines. The Android case here is bit stran

[PATCH v2 18/32] bootm: Reduce arguments to bootm_find_os()

2023-11-15 Thread Simon Glass
This function only uses one argument so pass it in directly. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Fix 'boot_find_os' typo - Pass in the command name boot/bootm.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/boot/bootm.

[PATCH v2 17/32] bootm: Move error printing out of boot_get_kernel()

2023-11-15 Thread Simon Glass
The same error message is printed in two places. Move it out to the caller so we can avoid passing in the command name. Leave the bootstage handling where it is. Signed-off-by: Simon Glass --- Changes in v2: - Use the command table to provide the command name, instead of "bootm" boot/bootm.c |

[PATCH v2 16/32] bootstage: Drop BOOTSTAGE_ID_FIT_KERNEL_INFO

2023-11-15 Thread Simon Glass
This is a misnomer since we don't necessarily know that the image is a FIT. Use the existing BOOTSTAGE_ID_CHECK_IMAGETYPE instead. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c| 2 +- include/bootstage.h | 1 - 2 files changed, 1 insertion(+),

[PATCH v2 15/32] bootm: Use the error return from boot_get_kernel()

2023-11-15 Thread Simon Glass
Rather than looking for a zero-sized image, use the error code returned to determine if things are OK. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Use the command table to provide the command name, instead of "bootm" boot/bootm.c | 6 +++--- 1 file changed, 3 inserti

[PATCH v2 14/32] bootm: Adjust position of unmap_sysmem() in boot_get_kernel()

2023-11-15 Thread Simon Glass
These unmaps should happen regardless of the return value. Move them before the 'return' statement. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to adjust position of unmap_sysmem() in boot_get_kernel() boot/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[PATCH v2 13/32] bootm: Adjust boot_get_kernel() to return an error

2023-11-15 Thread Simon Glass
This function obtains lots of error codes and then throws them away. Update it to return the error, moving the image pointer to an argument. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Use the command table to provide the command name, instead of "bootm" boot/bootm.c

[PATCH v2 12/32] image: Document error codes from fit_image_load()

2023-11-15 Thread Simon Glass
Put a list of these in the function documentation so it is easier to decode what went wrong. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) include/image.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/image.h b/include/image.h

[PATCH v2 11/32] bootm: Reduce arguments to boot_get_kernel()

2023-11-15 Thread Simon Glass
This function only uses one argument and just needs to know the name of the command which called it. Adjust the function to use only what it needs. This will make it easier to call from a non-command context. Tidy up the function comment while we are here. Signed-off-by: Simon Glass --- Changes

[PATCH v2 10/32] image: Tidy up genimg_get_kernel_addr_fit()

2023-11-15 Thread Simon Glass
This function does not modify its first argument, so mark it const. Also move the comments to the header file and expand them to provide more useful information. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 3 +-- boot/image-board.c | 17 +--

[PATCH v2 09/32] bootm: Move boot_get_kernel() higher in the file

2023-11-15 Thread Simon Glass
Move this code and image_get_kernel() higher in the file to avoid the need for a forward declaration. No attempt is made to remove #ifdefs or adjust the code in any other way. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 376 ++

[PATCH v2 08/32] bootm: Simplify arguments for bootm_pre_load()

2023-11-15 Thread Simon Glass
Move the argument decoding to the caller, to avoid needing to pass the command-line arguments. Add a function comment while we are here. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 23 --- 1 file changed, 16 insertions(+), 7 d

[PATCH v2 07/32] bootm: Drop arguments from bootm_start()

2023-11-15 Thread Simon Glass
This function does not use its arguments. Drop them. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index cb61485c226c..fda97706fc26 100644 --- a/boot/

[PATCH v2 06/32] bootstd: Introduce programmable boot

2023-11-15 Thread Simon Glass
At present bootstd requires CONFIG_CMDLINE to operate. Add a new 'programmable' boot which can be used when no command line is available. For now it does almost nothing, since most bootmeths require the command line. Signed-off-by: Simon Glass --- (no changes since v1) boot/Kconfig | 11 +

[PATCH v2 05/32] bootstd: Add missing header file from bootdev.h

2023-11-15 Thread Simon Glass
Add a dm/uclass-id.h to the bootdev header file, since it uses enum uclass_id Signed-off-by: Simon Glass --- (no changes since v1) include/bootdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/bootdev.h b/include/bootdev.h index b079a91b5b7f..c1362673d418 100644 --- a/include/b

[PATCH v2 04/32] treewide: Tidy up semicolon after command macros

2023-11-15 Thread Simon Glass
The U_BOOT_CMD_COMPLETE() macro has a semicolon at the end, perhaps inadvertently. Some code has taken advantage of this. Tidy this up by dropping the semicolon from the macro and adding it to macro invocations as required. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since

[PATCH v2 03/32] mmc: env: Unify the U_BOOT_ENV_LOCATION conditions

2023-11-15 Thread Simon Glass
The declaration of U_BOOT_ENV_LOCATION() uses a different #ifdef condition from the code it calls. Use the same condition to avoid a build warning if CONFIG_CMD_SAVEENV is disabled. Signed-off-by: Simon Glass --- (no changes since v1) env/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v2 02/32] README: Correct docs for CONFIG_SPL_BUILD

2023-11-15 Thread Simon Glass
This option is defined in both SPL and TPL builds, so correct the docs related to this. Also point to spl_phase() which is normally a better option. Mention VPL as well. Signed-off-by: Simon Glass Reported-by: Heinrich Schuchardt --- (no changes since v1) README | 26 ++---

[PATCH v2 01/32] arm: x86: Drop discarding of command linker-lists

2023-11-15 Thread Simon Glass
Since we can now cleanly disable CMDLINE when needed, drop the rules which discard the command code. It will not be built in the first place. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/cpu/u-boot.lds | 3 --- arch/x86/cpu/u-boot-64.lds | 4

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Heinrich Schuchardt
On 11/16/23 02:39, Simon Glass wrote: Hi Heinrich, On Wed, 15 Nov 2023 at 15:47, Heinrich Schuchardt wrote: Am 15. November 2023 23:15:46 MEZ schrieb Simon Glass : Hi Shantur, On Wed, 15 Nov 2023 at 15:13, Shantur Rathore wrote: Hi Simon, I have figured out the cause of the crash. It

Re: [PATCH] bootstd: Avoid freeing a non-allocated buffer

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 19:18, Heinrich Schuchardt wrote: > > On 11/16/23 02:35, Simon Glass wrote: > > EFI applications can be very large and thus used to cause boot failures > > when malloc() space was exhausted. > > > > A recent changed fixed this by using the kernel_addr_r environ

Re: [PATCH v4 05/12] usb: Avoid unbinding devices in use by bootflows

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 19:06, Heinrich Schuchardt wrote: > > On 11/16/23 02:42, Simon Glass wrote: > > Hi Heinrich, > > > > On Wed, 15 Nov 2023 at 18:34, Heinrich Schuchardt > > wrote: > >> > >> On 11/15/23 17:23, Heinrich Schuchardt wrote: > >>> On 11/15/23 16:50, Simon Glass wrot

Re: [PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Simon Glass
Hi Tom, On Wed, 15 Nov 2023 at 19:07, Tom Rini wrote: > > On Wed, Nov 15, 2023 at 06:56:33PM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Wed, 15 Nov 2023 at 18:47, Tom Rini wrote: > > > > > > On Wed, Nov 15, 2023 at 06:42:19PM -0700, Simon Glass wrote: > > > > Hi Tom, > > > > > > > > On Wed

Re: [PATCH] bootstd: Avoid freeing a non-allocated buffer

2023-11-15 Thread Heinrich Schuchardt
On 11/16/23 02:35, Simon Glass wrote: EFI applications can be very large and thus used to cause boot failures when malloc() space was exhausted. A recent changed fixed this by using the kernel_addr_r environment var as the address of the buffer. However, it still frees the buffer when the bootfl

Re: [PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Tom Rini
On Wed, Nov 15, 2023 at 06:56:33PM -0700, Simon Glass wrote: > Hi Tom, > > On Wed, 15 Nov 2023 at 18:47, Tom Rini wrote: > > > > On Wed, Nov 15, 2023 at 06:42:19PM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Wed, 15 Nov 2023 at 15:38, Tom Rini wrote: > > > > > > > > On Sat, Nov 11, 20

Re: [PATCH v4 05/12] usb: Avoid unbinding devices in use by bootflows

2023-11-15 Thread Heinrich Schuchardt
On 11/16/23 02:42, Simon Glass wrote: Hi Heinrich, On Wed, 15 Nov 2023 at 18:34, Heinrich Schuchardt wrote: On 11/15/23 17:23, Heinrich Schuchardt wrote: On 11/15/23 16:50, Simon Glass wrote: Hi Heinrich, On Sun, 12 Nov 2023 at 16:35, Heinrich Schuchardt wrote: Am 12. November 2023 22

Re: [PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Simon Glass
Hi Tom, On Wed, 15 Nov 2023 at 18:47, Tom Rini wrote: > > On Wed, Nov 15, 2023 at 06:42:19PM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Wed, 15 Nov 2023 at 15:38, Tom Rini wrote: > > > > > > On Sat, Nov 11, 2023 at 05:09:12PM -0700, Simon Glass wrote: > > > > > > > Rather than passing it a

Re: [PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Tom Rini
On Wed, Nov 15, 2023 at 06:42:19PM -0700, Simon Glass wrote: > Hi Tom, > > On Wed, 15 Nov 2023 at 15:38, Tom Rini wrote: > > > > On Sat, Nov 11, 2023 at 05:09:12PM -0700, Simon Glass wrote: > > > > > Rather than passing it all the command-line args, pass in the pieces > > > that it needs. These a

Re: [PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Simon Glass
Hi Tom, On Wed, 15 Nov 2023 at 15:38, Tom Rini wrote: > > On Sat, Nov 11, 2023 at 05:09:12PM -0700, Simon Glass wrote: > > > Rather than passing it all the command-line args, pass in the pieces > > that it needs. These are the image address, the ramdisk address/name > > and the FDT address/name.

Re: [BUG] usage of $kernel_addr_r in distro_efi_boot()

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 18:07, Heinrich Schuchardt wrote: > > If $kernel_addr_r cannot be read, distro_efi_boot() falls back to > address 0. This will lead to a segmentation fault on many systems. > > distro_efi_read_bootflow_net() has a fallback to CONFIG_SYS_LOAD_ADDR > and may have

Re: Bug in distro_efi_boot()

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 17:54, Heinrich Schuchardt wrote: > > Hello Simon, > > In function distro_efi_boot() the bootefi command is called. The second > argument should only be passed if a device-tree has actually been > loaded. But this is not what the code does: > > For network boot

Re: [PATCH v4 05/12] usb: Avoid unbinding devices in use by bootflows

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 18:34, Heinrich Schuchardt wrote: > > On 11/15/23 17:23, Heinrich Schuchardt wrote: > > On 11/15/23 16:50, Simon Glass wrote: > >> Hi Heinrich, > >> > >> On Sun, 12 Nov 2023 at 16:35, Heinrich Schuchardt > >> wrote: > >>> > >>> > >>> > >>> Am 12. November 2023

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 18:25, Heinrich Schuchardt wrote: > > On 11/15/23 23:46, Heinrich Schuchardt wrote: > > > > > > Am 15. November 2023 23:15:46 MEZ schrieb Simon Glass : > >> Hi Shantur, > >> > >> On Wed, 15 Nov 2023 at 15:13, Shantur Rathore wrote: > >>> > >>> Hi Simon, > >>>

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Simon Glass
Hi Heinrich, On Wed, 15 Nov 2023 at 15:47, Heinrich Schuchardt wrote: > > > > Am 15. November 2023 23:15:46 MEZ schrieb Simon Glass : > >Hi Shantur, > > > >On Wed, 15 Nov 2023 at 15:13, Shantur Rathore wrote: > >> > >> Hi Simon, > >> > >> I have figured out the cause of the crash. > >> It happen

[PATCH] bootstd: Avoid freeing a non-allocated buffer

2023-11-15 Thread Simon Glass
EFI applications can be very large and thus used to cause boot failures when malloc() space was exhausted. A recent changed fixed this by using the kernel_addr_r environment var as the address of the buffer. However, it still frees the buffer when the bootflow is discarded. Fix this by introducin

Re: [PATCH v4 05/12] usb: Avoid unbinding devices in use by bootflows

2023-11-15 Thread Heinrich Schuchardt
On 11/15/23 17:23, Heinrich Schuchardt wrote: On 11/15/23 16:50, Simon Glass wrote: Hi Heinrich, On Sun, 12 Nov 2023 at 16:35, Heinrich Schuchardt wrote: Am 12. November 2023 22:20:50 MEZ schrieb Simon Glass : Hi Heinrich, On Sun, 12 Nov 2023 at 13:32, Heinrich Schuchardt wrote: Am

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Heinrich Schuchardt
On 11/15/23 23:46, Heinrich Schuchardt wrote: Am 15. November 2023 23:15:46 MEZ schrieb Simon Glass : Hi Shantur, On Wed, 15 Nov 2023 at 15:13, Shantur Rathore wrote: Hi Simon, I have figured out the cause of the crash. It happens here - https://github.com/u-boot/u-boot/blob/master/boot/b

[BUG] usage of $kernel_addr_r in distro_efi_boot()

2023-11-15 Thread Heinrich Schuchardt
If $kernel_addr_r cannot be read, distro_efi_boot() falls back to address 0. This will lead to a segmentation fault on many systems. distro_efi_read_bootflow_net() has a fallback to CONFIG_SYS_LOAD_ADDR and may have loaded to that address. Shouldn't we be consistent in what we program? Please,

Bug in distro_efi_boot()

2023-11-15 Thread Heinrich Schuchardt
Hello Simon, In function distro_efi_boot() the bootefi command is called. The second argument should only be passed if a device-tree has actually been loaded. But this is not what the code does: For network boot methods the value of $fdt_addr_r is passed as second parameter though possibly no fi

Re: inconsistent wget behavior

2023-11-15 Thread Fabio Estevam
Hi Paul, On Wed, Nov 8, 2023 at 10:24 PM Fabio Estevam wrote: > I was not able to see a failure when using "tftp" to transfer the same > 420MB file. > > The number of bytes transferred and md5sum always match, so this is a wget > bug. There was another user who confirmed the same issue: https

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Heinrich Schuchardt
Am 15. November 2023 23:15:46 MEZ schrieb Simon Glass : >Hi Shantur, > >On Wed, 15 Nov 2023 at 15:13, Shantur Rathore wrote: >> >> Hi Simon, >> >> I have figured out the cause of the crash. >> It happens here - >> https://github.com/u-boot/u-boot/blob/master/boot/bootflow.c#L470 >> while doing

Re: Please pull u-boot-dm

2023-11-15 Thread Tom Rini
On Wed, Nov 15, 2023 at 06:19:26AM -0700, Simon Glass wrote: > Hi Tom, > > https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/18586 > > https://dev.azure.com/simon0972/u-boot/_build/results?buildId=55&view=results > > > The following changes since commit 92b27528d777ce85362af45e7d2

Re: [PATCH 29/29] bootm: Reduce arguments to bootm_find_other()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:14PM -0700, Simon Glass wrote: > Rather than passing the full list of command arguments, pass only those > which are needed. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 28/29] bootm: Add a function to check overlap

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:13PM -0700, Simon Glass wrote: > Move this code into a function to reduce code size and make it easier > to understand. Drop the unnecessary 0x to help a little with code size. > > Use this in bootm_find_images() > > Signed-off-by: Simon Glass Reviewed-by: Tom Rin

Re: [PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:12PM -0700, Simon Glass wrote: > Rather than passing it all the command-line args, pass in the pieces > that it needs. These are the image address, the ramdisk address/name > and the FDT address/name. > > Ultimately this will allow usage of this function without bein

Re: [PATCH 24/29] bootm: Simplify Android ramdisk addr in bootm_find_images()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:09PM -0700, Simon Glass wrote: > The Android mechanism uses the loadaddr envrionment-variable to get the > load address, if none is provided. This is equivalent to > image_load_addr so use that instead, converting it to a string as > needed. > > This change will perm

Re: [PATCH 23/29] bootm: Reduce arguments to boot_get_loadables()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:08PM -0700, Simon Glass wrote: > This function only uses two arguments. The 'arch' always has a constant > value, so drop it. This simplifies the function call. > > Tidy up the function comment while we are here. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rin

Re: [PATCH 22/29] bootm: Reduce arguments to boot_get_fpga()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:07PM -0700, Simon Glass wrote: > This function only uses two arguments. The 'arch' always has a constant > value, so drop it. This simplifies the function call. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signatur

Re: [PATCH 21/29] bootm: Reduce arguments to boot_get_fdt()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:06PM -0700, Simon Glass wrote: > This function only uses one argument from bootm (argv[2]) so pass it in > directly. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 18/29] fdt: Allow use of fdt_support inside if() statements

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:03PM -0700, Simon Glass wrote: > Most of the fdt_support.h header file is included only if OF_LIBFDT or > OF_CONTROL are enabled. This means that calling functions defined in > that file must happen inside an #ifdef > > This is unnecessary, so reduce the condition to

Re: [PATCH 17/29] bootm: Reduce arguments to boot_get_ramdisk()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:02PM -0700, Simon Glass wrote: > This function normally only uses one argument so pass it in directly. > Move comments to the header file so could one day include these > functions in API docs. Fix up the u8 argument while here, since it > avoids the compiler having t

Re: [PATCH 16/29] bootm: Reduce arguments to boot_find_os()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:01PM -0700, Simon Glass wrote: > This function only uses one argument so pass it in directly. > > Signed-off-by: Simon Glass Aside from a typo in the subject (boot_ not bootm_): Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 15/29] bootm: Move error printing out of boot_get_kernel()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:09:00PM -0700, Simon Glass wrote: > The same error message is printed in two places. Move it out to the > caller so we can avoid passing in the command name. Leave the bootstage > handling where it is. > > Signed-off-by: Simon Glass [snip] > @@ -322,9 +316,12 @@ static

Re: [PATCH 14/29] bootstage: Drop BOOTSTAGE_ID_FIT_KERNEL_INFO

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:59PM -0700, Simon Glass wrote: > This is a misnomer since we don't necessarily know that the image is a > FIT. Use the existing BOOTSTAGE_ID_CHECK_IMAGETYPE instead. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP sig

Re: [PATCH 13/29] bootm: Use the error return from boot_get_kernel()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:58PM -0700, Simon Glass wrote: > Rather than looking for a zero-sized image, use the error code returned > to determine if things are OK. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 12/29] bootm: Adjust boot_get_kernel() to return an error

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:57PM -0700, Simon Glass wrote: > This function obtains lots of error codes and then throws them away. > Update it to return the error, moving the image pointer to an > argument. > > Signed-off-by: Simon Glass [snip] > @@ -217,25 +220,28 @@ static const void *boot_ge

Re: [PATCH 11/29] image: Document error codes from fit_image_load()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:56PM -0700, Simon Glass wrote: > Put a list of these in the function documentation so it is easier to > decode what went wrong. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 10/29] bootm: Reduce arguments to boot_get_kernel()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:55PM -0700, Simon Glass wrote: > This function only uses one argument and just needs to know the name of > the command which called it. Adjust the function to use only what it > needs. This will make it easier to call from a non-command context. > > Tidy up the funct

Re: [PATCH 09/29] image: Tidy up genimg_get_kernel_addr_fit()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:54PM -0700, Simon Glass wrote: > This function does not modify its first argument, so mark it const. Also > move the comments to the header file and expand them to provide more > useful information. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom s

Re: [PATCH 08/29] bootm: Move boot_get_kernel() higher in the file

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:53PM -0700, Simon Glass wrote: > Move this code and image_get_kernel() higher in the file to avoid the > need for a forward declaration. > > No attempt is made to remove #ifdefs or adjust the code in any other > way. > > Signed-off-by: Simon Glass Reviewed-by: Tom

Re: [PATCH 06/29] bootm: Drop arguments from bootm_start()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:51PM -0700, Simon Glass wrote: > This function does not use its arguments. Drop them. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 07/29] bootm: Simplify arguments for bootm_pre_load()

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:52PM -0700, Simon Glass wrote: > Move the argument decoding to the caller, to avoid needing to pass the > command-line arguments. > > Add a function comment while we are here. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Descripti

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Simon Glass
Hi Shantur, On Wed, 15 Nov 2023 at 15:13, Shantur Rathore wrote: > > Hi Simon, > > I have figured out the cause of the crash. > It happens here - > https://github.com/u-boot/u-boot/blob/master/boot/bootflow.c#L470 > while doing - free(bflow->buf) > > As I understand it, > - Just before starting k

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Shantur Rathore
Hi Simon, I have figured out the cause of the crash. It happens here - https://github.com/u-boot/u-boot/blob/master/boot/bootflow.c#L470 while doing - free(bflow->buf) As I understand it, - Just before starting kernel EFI binary calls usb-uclass->usb_stop() - This starts removing all devices in m

Re: [PATCH 03/29] treewide: Tidy up semicolon after command macros

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:48PM -0700, Simon Glass wrote: > The U_BOOT_CMD_COMPLETE() macro has a semicolon at the end, perhaps > inadvertently. Some code has taken advantage of this. > > Tidy this up by dropping the semicolon from the macro and adding it to > macro invocations as required. >

Re: [PATCH 01/29] arm: x86: Drop discarding of command linker-lists

2023-11-15 Thread Tom Rini
On Sat, Nov 11, 2023 at 05:08:46PM -0700, Simon Glass wrote: > Since we can now cleanly disable CMDLINE when needed, drop the rules > which discard the command code. It will not be built in the first > place. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Descri

Re: [PATCH v1 0/5] Convert recently merged T30 boards to use DM PMIC

2023-11-15 Thread Tom Rini
On Wed, Nov 15, 2023 at 04:51:08PM +0100, Thierry Reding wrote: > On Mon, Nov 06, 2023 at 04:04:07PM -0500, Tom Rini wrote: > > On Mon, Nov 06, 2023 at 02:11:16PM +, Peter Robinson wrote: > > > On Mon, Nov 6, 2023 at 1:28 PM Svyatoslav Ryhel > > > wrote: > > > > > > > > пн, 6 лист. 2023 р. о

[PATCH] Fix stack-protector for powerpc

2023-11-15 Thread Christophe Leroy
On powerpc, stack protector expects a function called __stack_chk_fail_local() instead of __stack_chk_fail() And some versions of GCC for powerpc default to TLS canary instead of global canary, so always force GCC to use global canary with -mstack-protector-guard=global Cc: Joel Peshkin Fixes: 4

Error building PX30 Ringneck with WDT support

2023-11-15 Thread Quentin Schulz
Hi all, I'm trying to add watchdog support to the PX30 Ringneck board but it fails to compile: """ diff --git a/configs/ringneck-px30_defconfig b/configs/ringneck-px30_defconfig index b314636b4d9..3dab0dab5d4 100644 --- a/configs/ringneck-px30_defconfig +++ b/configs/ringneck-px30_defconfig

[PATCH 5/5] sysreset: Support reset via Renesas RAA215300 PMIC

2023-11-15 Thread Paul Barker
This patch allows us to reset the RZ/G2L board via the RAA215300 PMIC. Note that the RAA215300 documentation names the available reset types differently to u-boot: - A "warm" reset via the RAA215300 PMIC will fully reset the SoC (CPU & GPIOs), so this corresponds to SYSRESET_COLD. - A "c

[PATCH 4/5] pmic: Add Renesas RAA215300 PMIC driver

2023-11-15 Thread Paul Barker
The RZ/G2L SMARC module is powered via a Renesas RAA215300 PMIC which provides several voltage converters, a real time clock (RTC) and reset control. A basic driver is implemented for this device so that we can read, write and dump the PMIC registers. Additional features of this PMIC (such as rese

[PATCH 3/5] i2c: rzg2l: Add I2C driver for RZ/G2L family

2023-11-15 Thread Paul Barker
This driver supports the I2C module on the Renesas RZ/G2L (R9A07G044) SoC, also known as the RIIC module. This patch is based on both the u-boot driver in the Renesas RZ BSP 3.0.5 release [1] (commit 7fcc1fdc2534), and the Linux v6.6 driver (commit ffc253263a13). Support for deblocking the I2C bu

[PATCH 2/5] arm: dts: rzg2l: Sync with Linux v6.6

2023-11-15 Thread Paul Barker
Pull in the recent changes to the RZ/G2L device tree and related dtsi files so that we're aligned with Linux v6.6 (commit ffc253263a13). Signed-off-by: Paul Barker --- arch/arm/dts/r9a07g044.dtsi | 16 arch/arm/dts/r9a07g044l2-smarc.dts| 21

[PATCH 1/5] clk: renesas: Confirm all clock & reset changes on RZ/G2L

2023-11-15 Thread Paul Barker
When enabling/disabling a clock or reset signal, confirm that the change has completed before returning from the function. A somewhat arbitrary 100ms timeout is defined to ensure that the system doesn't lock up in the case of an error. Since we need to dynamically determine if we're waiting for a

[PATCH 0/5] Add i2c and reset support for Renesas RZ/G2L

2023-11-15 Thread Paul Barker
This patch series extends the support for the Renesas RZ/G2L SMARC EVK board (based on the R9A07G044L2 SoC) to include the following new features: * I2C bus support, including automatic deblocking if SDA is stuck low due to another device on the board. * Basic PMIC support, with the abili

Re: [PATCH 0/6] risc-v: add ACPI support on QEMU

2023-11-15 Thread Heinrich Schuchardt
On 15.11.23 15:23, Heinrich Schuchardt wrote: QEMU 8.1.2 can create ACPI tables for the RISC-V architecture. Allow passing them through to the operating system. Provide a new defconfig that enables this. This patch is prerequisite: [PATCH] move acpi_get_rsdp_addr() to acpi/acpi_table.h https:/

Re: [PATCH 0/2] Cleanup K3 binman FIT images

2023-11-15 Thread Marcel Ziswiler
Hi Neha On Wed, 2023-11-15 at 15:40 +0530, Neha Malcom Francis wrote: > Instead of duplicating the same FIT formats over and over again for > different K3 devices, make use of the templating support to have FIT > templates for the same. > > Note: I purposely did not add the trial to template out

Re: [PATCH V2 0/4] arm: dts: k3-am625*: Upgrade kernel dts to v6.7-rc1

2023-11-15 Thread Marcel Ziswiler
Hi Nishanth On Tue, 2023-11-14 at 21:28 -0600, Nishanth Menon wrote: > Hi, > rev 2 of the series to sync am62 with v6.7-rc1. For the whole series: Tested-by: Marcel Ziswiler > Changes: > - picked up reviews, tested tags. > - minor commit message correction in patch #4. > > Boot logs: > https:

Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detect

2023-11-15 Thread Fabio Estevam
Hi Benjamin, You should have indicated that this is v7. The subject should be: [PATCH v7] pico-imx7d: add baseboard SD card boot detect No need for adding 1/1 for a single patch. On Tue, Nov 7, 2023 at 7:16 PM wrote: > > From: Benjamin Szőke > > Technexion PICO-IMX7 SoM is supporting USDHC3

Re: [PATCH] arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA with BCDMA

2023-11-15 Thread Marcel Ziswiler
Hi Roger On Tue, 2023-11-14 at 22:28 +0200, Roger Quadros wrote: > BCDMA can be used at SPL for OSPI boot and mem-to-mem DMA > so add "bootph-all" to BCDMA node. Might not be strictly required (at least we do not support OSPI boot on our HW) but also does not hurt. > Suggested-by: Nishanth Meno

Re: [PATCH v4 05/12] usb: Avoid unbinding devices in use by bootflows

2023-11-15 Thread Heinrich Schuchardt
On 11/15/23 16:50, Simon Glass wrote: Hi Heinrich, On Sun, 12 Nov 2023 at 16:35, Heinrich Schuchardt wrote: Am 12. November 2023 22:20:50 MEZ schrieb Simon Glass : Hi Heinrich, On Sun, 12 Nov 2023 at 13:32, Heinrich Schuchardt wrote: Am 12. November 2023 21:02:42 MEZ schrieb Simon Gl

Re: bug - bootflow: grub efi crashes when bootflow selected explicitly

2023-11-15 Thread Simon Glass
Hi Shantur, On Wed, 15 Nov 2023 at 08:23, Shantur Rathore wrote: > > Hi Simon, > > > > > Is this the blue port on top of the USB-C connector? > > > Yes, that's correct. > For my drive I needed - > https://patchwork.ozlabs.org/project/uboot/patch/20231110141311.512334-...@shantur.com/ > > > > > Wh

  1   2   >