Enable SDP for Compulab IOT-GATE-iMX8 BOARD

2023-04-29 Thread Parthiban
Dear All, Good day! Tried enabling SDP for "Compulab IOT-GATE-iMX8 BOARD" for booting over SDP and uuu, but fails to compile. Please find the below compilation error. SRAM overflow considers the whole data section of flash.bin or is it just SPL? .config is already minimal and only enabled requi

[PATCH 0/3] cmd: tlv_eeprom: global variables and error cleanup

2023-04-29 Thread Josua Mayer
This patch-set removes some uses of global variables, and improves error reporting for the "read" command. It is intended to help switching to a split tlv library eventually, but general enough to apply independently. Josua Mayer (3): cmd: tlv_eeprom: remove use of global variable has_been_read

[PATCH 1/3] cmd: tlv_eeprom: remove use of global variable has_been_read

2023-04-29 Thread Josua Mayer
has_been_read is only used as an optimization for do_tlv_eeprom. Explicitly use and set inside this function, thus making read_eeprom stateless. Signed-off-by: Josua Mayer Cc: Stefan Roese Cc: Baruch Siach Cc: Heinrich Schuchardt --- cmd/tlv_eeprom.c | 21 +++-- 1 file changed

[PATCH 3/3] cmd: tlv_eeprom: enable 'dev' subcommand before 'read'

2023-04-29 Thread Josua Mayer
Move the handler for "tlv_eeprom dev X" command to the beginning of do_tlv_eeprom, to allow using it before issuing a "read" command for currently selected eeprom. Also remove the check if eeprom exists, since that can only work after the first execution of read_eeprom triggered device lookup. Ins

[PATCH 2/3] cmd: tlv_eeprom: handle -ENODEV error from read_eeprom function

2023-04-29 Thread Josua Mayer
When tlv eeprom does not exist, return error code instead of quietly making up tlv structure in memory. Signed-off-by: Josua Mayer Cc: Stefan Roese Cc: Baruch Siach Cc: Heinrich Schuchardt --- cmd/tlv_eeprom.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff

Re: [PATCH] dm: core: introduce uclass_get_device_by_of_path()

2023-04-29 Thread Rasmus Villemoes
On 28/04/2023 21.21, Simon Glass wrote: >> Looks fine but please add a test to ofnode.c > > Did you send a patch with a test? If so I missed it. No, sorry, haven't found the time yet. > Also please check my tweak to this (OF_REAL) Looks correct. Rasmus

Re: [PATCH 1/1] pci: pcie_dw_rockchip: support fixed vcc3v3 regulator type

2023-04-29 Thread Jonas Karlman
Hi John, On 2023-04-28 20:28, John Clark wrote: > If the regulator is fixed, the call to regulator_set_value will fail with > -ENOSYS as fixed regulators do not support dm_regulator_ops->set_value. > see: regulator-uclass.c, regulator_set_value(), ops->set_value > > This patch ignores -ENOSYS

Re: [PATCH v2 00/17] rockchip: eMMC fixes for RK3568 and support for RK3588

2023-04-29 Thread Jonas Karlman
On 2023-04-28 12:58, Eugen Hristev wrote: > On 4/27/23 21:27, Jonas Karlman wrote: >> On 2023-04-27 17:33, Eugen Hristev wrote: >>> On 4/27/23 18:25, Jonas Karlman wrote: Hi Eugen, On 2023-04-27 16:45, Eugen Hristev wrote: > On 4/18/23 19:46, Jonas Karlman wrote: >> This seri

Re: [PATCH u-boot 0/3] pci: Do not access Freescale PCI controllers BARs registers

2023-04-29 Thread Pali Rohár
On Friday 21 April 2023 05:54:29 Heiko Schocher wrote: > Hello Pali, > > On 20.04.23 21:44, Pali Rohár wrote: > > Freescale PCI and PCIe controllers export in config space in BARs offset > > for BDF address 00:00.0 internal controller registers, instead of BAR > > registers. Avoid access to these

Re: [PATCH v2 u-boot-mvebu 4/4] arm: mvebu: clearfog: Update eMMC/SD/SATA instructions

2023-04-29 Thread Pali Rohár
On Thursday 27 April 2023 10:56:17 Stefan Roese wrote: > Hi Pali, > > On 4/27/23 01:44, Pali Rohár wrote: > > On Thursday 13 April 2023 22:43:25 Martin Rowe wrote: > > > On Thu, 13 Apr 2023 at 20:58, Pali Rohár wrote: > > > > > > > > BootROM and neither SPL does not use eMMC boot acknowledgement

Re: [PATCH u-boot 0/3] pci: mpc85xx: Fixes for PCI config space

2023-04-29 Thread Pali Rohár
On Thursday 13 April 2023 22:41:43 Pali Rohár wrote: > This patch series contains small fixes for mpc85xx old PCI Local Bus driver. > > Heiko: Are you able to test these changes? Has your Socrates board > available old PCI Local Bus support? > > Pali Rohár (3): > pci: mpc85xx: Add missing sync(

[GIT PULL] Please pull u-boot-mpc8xx

2023-04-29 Thread Christophe Leroy
Hi Tom, This pull request adds support for the last CPU board from CS GROUP France (previously CSSI). That CPU board called CMPCPRO has a mpc8321E CPU (Family PQII PRO hence its name) and can be plugged in place of the CMPC885 board. In order to support that new board, the following changes are

Re: Please pull u-boot-dm

2023-04-29 Thread Tom Rini
On Fri, Apr 28, 2023 at 01:25:16PM -0600, Simon Glass wrote: > Hi Tom, > > https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/16143 > > > The following changes since commit c9c2c95d4cd27fe0cd41fe13a863899d268f973c: > > Merge branch '2023-04-27-introduce-nvm-xip-block-storage-emul

Re: [PATCH 17/31] sandbox: Allow weak symbols to be dropped

2023-04-29 Thread Simon Glass
Hi Bin, On Mon, 24 Apr 2023 at 20:44, Bin Meng wrote: > > Hi Simon, > > On Tue, Apr 25, 2023 at 7:09 AM Simon Glass wrote: > > > > The sandbox build makes use of a small number of weak symbols. Allow these > > to be dropped when building for the PE format, since its support for weak > > symbols

Re: [PATCH 17/31] sandbox: Allow weak symbols to be dropped

2023-04-29 Thread Simon Glass
Hi Heinrich, On Mon, 24 Apr 2023 at 20:47, Heinrich Schuchardt wrote: > > > > Am 25. April 2023 01:08:22 MESZ schrieb Simon Glass : > >The sandbox build makes use of a small number of weak symbols. Allow these > >to be dropped when building for the PE format, since its support for weak > >symbols

Re: [PATCH 17/31] sandbox: Allow weak symbols to be dropped

2023-04-29 Thread Simon Glass
Hi Pali, On Tue, 25 Apr 2023 at 10:31, Pali Rohár wrote: > > On Tuesday 25 April 2023 10:44:17 Bin Meng wrote: > > Hi Simon, > > > > On Tue, Apr 25, 2023 at 7:09 AM Simon Glass wrote: > > > > > > The sandbox build makes use of a small number of weak symbols. Allow these > > > to be dropped when

Re: [PATCH 24/31] build: Disable weak symbols for MSYS2

2023-04-29 Thread Simon Glass
Hi Pali, On Tue, 25 Apr 2023 at 10:21, Pali Rohár wrote: > > On Monday 24 April 2023 17:08:29 Simon Glass wrote: > > Weak symbols are not well supported by the PE format, so disable them. > > They are supported by PE format. This is likely issue of (older) > toolchain. What about rather requiring

Re: [GIT PULL] Please pull u-boot-mpc8xx

2023-04-29 Thread Tom Rini
On Sat, Apr 29, 2023 at 11:56:15AM +, Christophe Leroy wrote: > Hi Tom, > > This pull request adds support for the last CPU board from > CS GROUP France (previously CSSI). > > That CPU board called CMPCPRO has a mpc8321E CPU (Family PQII PRO hence > its name) and can be plugged in place of t

[PATCH 1/3] Makefile: Fix incorrect FORCE deps on env rules

2023-04-29 Thread Simon Glass
These rules run on every build even if nothing has changed. The FORCE dependency is only needed for if_changed, not for cmd. Drop it. Signed-off-by: Simon Glass --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 166acba27032..19503d013

[PATCH 2/3] acpi: Put the version numbers in a central place

2023-04-29 Thread Simon Glass
At present two acpi files are built every time since they use a version number from version.h This is not necessary. Make use of the same technique as for the version string, so that they are build only when they change. Signed-off-by: Simon Glass --- cmd/version.c| 2 ++ include/

[PATCH 3/3] efi: Correct .efi rules

2023-04-29 Thread Simon Glass
These files should have both 'always' and 'targets' so that dependencies are detected correctly. When only 'always' is used, the target is built every time, although I am not quite sure why. Make sure each has both 'always' and 'targets' to avoid this problem. Signed-off-by: Simon Glass --- l

[PATCH v2 02/30] u_boot_pylib: Avoid deleting the test_util.py file

2023-04-29 Thread Simon Glass
This is needed, so update the removal code to keep it. Signed-off-by: Simon Glass --- Changes in v2: - Split out u_boot_pylib from the subprocess patch scripts/make_pip.sh | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index

[PATCH v2 00/30] Allow building sandbox with MSYS2

2023-04-29 Thread Simon Glass
This expands the existing work to allow sandbox to build and run natively on Windows using MSYS2. This produces a native application that can run on Windows. This is quite different from using WSL to cross-compile a Linux application, which is then run in a virtual environment. It also fixes a fe

[PATCH v2 03/30] u_boot_pylib: Make pty optional

2023-04-29 Thread Simon Glass
This library is not available on Windows. Detect this and work around it by using a normal pipe. Signed-off-by: Simon Glass --- Changes in v2: - move u_boot_pylib changes to a separate patch tools/u_boot_pylib/cros_subprocess.py | 28 ++- 1 file changed, 23 insertions(+

[PATCH v2 01/30] u_boot_pylib: Correct name of readme

2023-04-29 Thread Simon Glass
This has an rst prefix rather than md. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) tools/u_boot_pylib/README.rst | 2 +- tools/u_boot_pylib/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/u_boot_pylib/README.rst b/tools/u_boot_py

[PATCH v2 04/30] binman: Avoid using a symlink

2023-04-29 Thread Simon Glass
Use a small Python script instead of a symlink to avoid problems with Windows. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/binman | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) mode change 12 => 100755 tools/binman/binman diff --git a/tools/binman

[PATCH v2 05/30] pylibfdt: Allow building on Windows

2023-04-29 Thread Simon Glass
Handle the different shared-object extension with MSYS2 by creating a new SOEXT variable. Signed-off-by: Simon Glass --- Changes in v2: - Use LIBEXT instead of SOEXT Makefile | 11 +++ scripts/dtc/pylibfdt/Makefile | 16 +--- 2 files changed, 20 inserti

[PATCH v2 06/30] Fix Makefile warning about parallel targets

2023-04-29 Thread Simon Glass
These targets are not really parallel; they are handled one at a time when invoked by other rules. Some recent versions of make (e.g. on MSYS2) give a warning about this. Split out the rules to avoid the warning. Signed-off-by: Simon Glass --- (no changes since v1) tools/Makefile | 11

[PATCH v2 07/30] mkimage: Correct checking of configuration node

2023-04-29 Thread Simon Glass
This returns a negative value on error. Update the logic to detect this and avoid a segfault when the node is not found. Signed-off-by: Simon Glass --- (no changes since v1) tools/image-host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/image-host.c b/tools/ima

[PATCH v2 08/30] sandbox: Drop dead code from Makefile

2023-04-29 Thread Simon Glass
This is not used, since the same code appears in cpu/Makefile Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/Makefile | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index a335f8acfde6..f6cf859f249c 100644 ---

[PATCH v2 09/30] sandbox: Correct SDL.h header inclusion

2023-04-29 Thread Simon Glass
We rely on sdl-config to provide the include directory for this header file, so should not add the include directory in the C file. Drop it so that this works as expected on Windows. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/sdl.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 10/30] sandbox: Include errno.h in the test header

2023-04-29 Thread Simon Glass
Add this so that the header file can used without first including the errno.h header. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/include/asm/test.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index

[PATCH v2 11/30] sections: Drop use of linux/types.h

2023-04-29 Thread Simon Glass
Use 'unsigned long' instead of 'ulong' so this file does not need to include the linux/types.h header file. This allows it to be built with MSYS2. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/sections.h | 16 +++- 1 file changed, 7 insertions(+), 9 delet

[PATCH v2 12/30] sandbox: Drop incorrect inclusion of linux/types.h

2023-04-29 Thread Simon Glass
This header file should only be included in U-Boot standalone files, not those built in the Linux environment. When not building for Linux, the header file does not exist, except in the U-Boot tree. In any case, it should not be used. Signed-off-by: Simon Glass --- (no changes since v1) arch/s

[PATCH v2 13/30] sandbox: Drop inclusion of os.h in sscanf.c

2023-04-29 Thread Simon Glass
There is no need for this file and it should not be included unless sandbox is being used. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) lib/sscanf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/sscanf.c b/lib/sscanf.c index 4c35c035fe10..b79f6d79255c 100644 --- a/lib

[PATCH v2 14/30] test: Avoid strange symbols in the assembler file

2023-04-29 Thread Simon Glass
This works correctly on Linux with ELF but not on Windows with PE, since it creates assembly symbols with invalid names. Use the lowest/highest valid characters instead. This should still work correctly, since we have no tests starting with $ and none starting with 'zz' at present. Signed-off-by:

[PATCH v2 15/30] ctype: Avoid using a symlink

2023-04-29 Thread Simon Glass
Windows doesn't really support symlinks so fails to build this file. Use a single-line #include instead. Signed-off-by: Simon Glass --- (no changes since v1) include/ctype.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 12 => 100644 include/ctype.h diff --git a/

[PATCH v2 16/30] Makefile: Disable LTO when not building with gcc

2023-04-29 Thread Simon Glass
For MSYS2 this creates a lot of errors of the form: `__stack_chk_fail' referenced in section `.text' of ...ltrans.o: defined in discarded section `.text' of common/stackprot.o (symbol from plugin) For clang it doesn't work, except with sandbox. Update the dependency to (hopefully) deal with a

[PATCH v2 17/30] Kbuild: Detect including an MSYS2 path

2023-04-29 Thread Simon Glass
The source-tree directory is prepended to relative include paths, but this does not work on Windows, where a path may have a drive letter like C: at the start of it. This breaks SDL which includes an absolute path to the header directory to the C flags, e.g. -IC:/msys64/mingw64/include/SDL2 Add t

[PATCH v2 18/30] sandbox: Disable raw Ethernet on MSYS2

2023-04-29 Thread Simon Glass
This relies on Linux features so cannot be built for Windows. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/Makefile | 2 ++ drivers/net/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile i

[PATCH v2 19/30] sandbox: Drop signal handling for MSYS2

2023-04-29 Thread Simon Glass
The Linux register format used on Linux (and perhaps other OSes) is not used on Windows, so disable this feature. Signed-off-by: Simon Glass --- Changes in v2: - Update commit message to mention other OSes - Check for __MSYS__ instead of __linux arch/sandbox/cpu/os.c | 2 +- 1 file changed, 1

[PATCH v2 20/30] sandbox: Fix up setting of monitor_len on MSYS2

2023-04-29 Thread Simon Glass
The required linker symbols are not present. For now just return 0 in this case. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 1688e27071fc..4f380d7c82c8 100644

[PATCH v2 21/30] Makefile: Disable unsupported compiler options with PE

2023-04-29 Thread Simon Glass
The MSYS2 compiler does not support some of these options. Drop them to avoid build errors. Signed-off-by: Simon Glass --- Changes in v2: - Use cc-option and ld-option instead Makefile | 2 +- scripts/Makefile.lib | 5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --

[PATCH v2 22/30] Makefile: Correct the ans1_compiler rule for MSYS2

2023-04-29 Thread Simon Glass
Add the required extension to the Makefile rule. Signed-off-by: Simon Glass --- Changes in v2: - Use EXEEXT instead of ELFEXT Makefile | 1 + scripts/Makefile.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 240562dff00b..a3286

[PATCH v2 23/30] sandbox: Augment the linker script for MSYS2

2023-04-29 Thread Simon Glass
We need to place the linker lists, etc. in the .rdata section but this is not possible with the default linker script. We can only add new sections, which causes Windows to give an "Exec format error" error. Add a rule to create a new linker script, by obtaining the one from the linker and adding

[PATCH v2 24/30] sandbox: Provide an EFI link script for PE

2023-04-29 Thread Simon Glass
Add another case for sandbox, when it is built on Windows. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/config.mk | 4 +- arch/x86/lib/crt0_x86_64_efi.S | 2 + arch/x86/lib/pe_x86_64_efi.lds | 83 ++ 3 files changed, 88 insertions(

[PATCH v2 25/30] sandbox: Allow weak symbols to be dropped

2023-04-29 Thread Simon Glass
The sandbox build makes use of a small number of weak symbols. Allow these to be dropped when building for the PE format, since its support for weak symbols is poor. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bootefi.c | 3 ++- cmd/bootz.c

[PATCH v2 26/30] build: Disable weak symbols for MSYS2

2023-04-29 Thread Simon Glass
Weak symbols are not well supported by the PE format, so disable them. We need to manually ensure that only one function is present in the source code. Add a Kconfig option to control this and enable it when building for Windows. Signed-off-by: Simon Glass --- (no changes since v1) Kconfig

[PATCH v2 28/30] doc: Show how to build sandbox for MSYS2

2023-04-29 Thread Simon Glass
Add instructions for building u-boot.exe to run on Windows. Signed-off-by: Simon Glass --- Changes in v2: - Clearify the documentation to explain the environment better doc/build/gcc.rst | 40 1 file changed, 40 insertions(+) diff --git a/doc/build/gcc

[PATCH v2 29/30] Makefile: Drop unwind tables for MSYS

2023-04-29 Thread Simon Glass
These give lots of warnings for the form: lib/efi_loader/helloworld.o:helloworld.c:(.pdata+0x0): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32NB against `.text' The tables are not needed except when debugging, so disable them for now. Signed-off-by: Simon Glass --- (no changes s

[PATCH v2 27/30] doc: Update the MSYS2 packages and versions

2023-04-29 Thread Simon Glass
These are now quite out-of-date. Update to 2023 versions and bring in those are are needed for the newer tool features. Signed-off-by: Simon Glass --- (no changes since v1) doc/build/tools.rst | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/doc/build/t

[PATCH v2 30/30] CI: Enable sandbox build for Windows

2023-04-29 Thread Simon Glass
Add a new rule to build sandbox for Windows. For now, no tests are run in this configuration. Signed-off-by: Simon Glass --- Changes in v2: - Update the cover letter to better explain the motivation .azure-pipelines.yml | 27 +++ 1 file changed, 27 insertions(+) diff -

[PATCH 1/2] x86: video: Add a driver for QEMU bochs emulation

2023-04-29 Thread Simon Glass
Bochs is convenient with QEMU on x86 since it does not require a video BIOS. Add a driver for it. Signed-off-by: Simon Glass --- drivers/video/Kconfig | 30 ++ drivers/video/Makefile | 2 + drivers/video/bochs.c | 130 + drivers/video/bochs.h

[PATCH 2/2] x86: Switch QEMU over to use the bochs driver

2023-04-29 Thread Simon Glass
This is more convenient since it does not require a video BIOS. Enable it for QEMU. Signed-off-by: Simon Glass --- arch/x86/cpu/qemu/Kconfig | 2 +- configs/qemu-x86_64_defconfig | 5 + configs/qemu-x86_defconfig| 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a

Re: [PATCH 2/2] x86: Switch QEMU over to use the bochs driver

2023-04-29 Thread Heinrich Schuchardt
Am 30. April 2023 04:31:57 MESZ schrieb Simon Glass : >This is more convenient since it does not require a video BIOS. Enable >it for QEMU. Does this require a change in how QEMU is invoked? If so, please add a documentation change. Best regards Heinrich > >Signed-off-by: Simon Glass >---