Re: [PATCH 1/2] rockchip: rk3399: Re-init clocks in U-Boot proper

2020-10-23 Thread Simon Glass
Hi Alper, On Thu, 22 Oct 2020 at 14:37, Alper Nebi Yasak wrote: > > It's possible to chainload U-Boot proper from the vendor firmware in > rk3399 chromebooks, but the way the vendor firmware sets up clocks is > somehow different than what U-Boot expects. This causes the display to > stay devoid

Re: [PATCH 2/2] rockchip: gru: Allow setting up clocks in U-Boot proper

2020-10-23 Thread Simon Glass
Hi Alper, On Thu, 22 Oct 2020 at 14:38, Alper Nebi Yasak wrote: > > Commit fe974716326c ("rockchip: rk3288: Allow setting up clocks in > U-Boot proper") fixes some clock issues when chainloading U-Boot on > rk3288 chromebooks. Part of that change is still available in veyron's >

Re: [PATCH 1/1] rtc: provide an emulated RTC

2020-10-23 Thread Simon Glass
Hi Heinrich, On Thu, 22 Oct 2020 at 18:35, Heinrich Schuchardt wrote: > > For testing purposes like running the UEFI SCT an RTC may be required. > Provide an emulated RTC if we do not have a hardware one. > > Signed-off-by: Heinrich Schuchardt > --- > MAINTAINERS| 1 + >

Re: [PATCH 15/17] pytest: Collect SPL unit tests

2020-10-23 Thread Simon Glass
Hi Stephen, On Mon, 5 Oct 2020 at 15:35, Stephen Warren wrote: > > On 10/5/20 1:51 PM, Simon Glass wrote: > > Hi Stephen, > > > > On Mon, 5 Oct 2020 at 13:39, Stephen Warren wrote: > >> > >> On 10/3/20 9:25 AM, Simon Glass wrote: > >>> Add a

[PATCH v4 12/13] x86: galileo: Use devicetree for SMBIOS settings

2020-10-22 Thread Simon Glass
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/dts/galileo.dts| 18 ++ board/intel/galileo/Kconfig | 11 --- 2 files changed, 18 insertions(+), 11

[PATCH v4 13/13] smbios: Drop the unused Kconfig options

2020-10-22 Thread Simon Glass
Now that we can use devicetree to specify this information, drop the old CONFIG options. Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Add onto the sysinfo binding configs/clearfog_gt_8k_defconfig| 2 -- configs/mt7622_rfb_defconfig| 1 - configs

[PATCH v4 11/13] arm64: mvebu: Use devicetree for SMBIOS settings on uDPU

2020-10-22 Thread Simon Glass
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/armada-3720-uDPU-u-boot.dtsi | 20 configs/uDPU_defconfig| 3 ++- 2 files changed, 22

[PATCH v4 10/13] odroid-c2: Use devicetree for SMBIOS settings

2020-10-22 Thread Simon Glass
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/meson-gxbb-odroidc2-u-boot.dtsi | 23 configs/odroid-c2_defconfig | 4 ++-- 2 files changed

[PATCH v4 08/13] rockchip: Use devicetree for SMBIOS settings

2020-10-22 Thread Simon Glass
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/rk3328-roc-cc-u-boot.dtsi| 21 + arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 23

[PATCH v4 01/13] board: Rename uclass to sysinfo

2020-10-22 Thread Simon Glass
and we want to use the same uclass to provide SMBIOS information. The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system. Rename everything accordingly. Signed-off-by: Simon Glass

[PATCH v4 09/13] imx: Use devicetree for SMBIOS settings on MYiR MYS-6ULX

2020-10-22 Thread Simon Glass
Add settings and enable the default sysinfo driver so that these can come from the device tree. Signed-off-by: Simon Glass --- (no changes since v1) .../dts/imx6ull-myir-mys-6ulx-eval-u-boot.dts | 25 +++ configs/myir_mys_6ulx_defconfig | 3 ++- 2 files changed

[PATCH v4 06/13] smbios: Add documentation and devicetree binding

2020-10-22 Thread Simon Glass
Add information about how to set SMBIOS properties using the devicetree. Signed-off-by: Simon Glass --- (no changes since v1) doc/arch/x86.rst| 8 +++ doc/device-tree-bindings/sysinfo/smbios.txt | 77 + 2 files changed, 85 insertions(+) create

[PATCH v4 07/13] sysinfo: Provide a default driver to set SMBIOS values

2020-10-22 Thread Simon Glass
Some boards want to specify the manuafacture or product name but do not need to have their own sysinfo driver. Add a default driver which provides a way to specify this SMBIOS information in the devicetree, without needing any board-specific functionality. Signed-off-by: Simon Glass

[PATCH v4 04/13] smbios: Allow properties to come from the device tree

2020-10-22 Thread Simon Glass
Support a way to put SMBIOS properties in the device tree. These can be placed in a 'board' device in an 'smbios' subnode. Signed-off-by: Simon Glass --- Changes in v4: - Fix build error with vexpress_ca9x4 Changes in v3: - Use a different binding with subnodes for each table type lib

[PATCH v4 03/13] x86: Pass an ofnode into each SMBIOS function

2020-10-22 Thread Simon Glass
As a first step to obtaining SMBIOS information from the devicetree, add an ofnode parameter to the writing functions. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Move dm.h header file to avoid build error on qemu-arm - Deal with boards that don't use of-control

[PATCH v4 05/13] smbios: Add more properties

2020-10-22 Thread Simon Glass
The current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more. Signed-off-by: Simon Glass --- (no changes since v1) lib/smbios.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/smbios.c b/lib/smbios.c index be72a98c49d..87dd4be415d

[PATCH v4 02/13] doc: Add a binding for sysinfo

2020-10-22 Thread Simon Glass
Add a simple binding file for this, so that it is clear what this binding directory is for. Signed-off-by: Simon Glass --- (no changes since v1) doc/device-tree-bindings/sysinfo/sysinfo.txt | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 doc/device-tree-bindings

[PATCH v4 00/13] x86: Updates to SMBIOS

2020-10-22 Thread Simon Glass
: - Fix build error with vexpress_ca9x4 Changes in v3: - Use a different binding with subnodes for each table type - Add onto the sysinfo binding Changes in v2: - Move dm.h header file to avoid build error on qemu-arm - Deal with boards that don't use of-control Simon Glass (13): board: Rename

Re: [PATCH v3 4/6] smbios: Allow properties to come from the device tree

2020-10-22 Thread Simon Glass
Hi Heinrich, On Wed, 21 Oct 2020 at 23:50, Heinrich Schuchardt wrote: > > On 10/22/20 5:08 AM, Simon Glass wrote: > > Support a way to put SMBIOS properties in the device tree. These can be > > placed in a 'board' device in an 'smbios' subnode. > > For me it is fin

Re: [PATCH v3 6/6] smbios: Add documentation and devicetree binding

2020-10-22 Thread Simon Glass
Hi Heinrich, On Wed, 21 Oct 2020 at 23:51, Heinrich Schuchardt wrote: > > On 10/22/20 5:08 AM, Simon Glass wrote: > > Add information about how to set SMBIOS properties using the devicetree. > > > > Signed-off-by: Simon Glass > > --- > > > > Changes

Re: [PATCH v3 2/6] doc: Add a binding for sysinfo

2020-10-22 Thread Simon Glass
Hi Heinrich, On Wed, 21 Oct 2020 at 23:41, Heinrich Schuchardt wrote: > > On 10/22/20 5:08 AM, Simon Glass wrote: > > Add a simple binding file for this, so that it is clear what this binding > > directory is for. > > > > Signed-off-by: Simon Glass > &

[PATCH v3 5/6] smbios: Add more properties

2020-10-21 Thread Simon Glass
The current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more. Signed-off-by: Simon Glass --- (no changes since v1) lib/smbios.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/smbios.c b/lib/smbios.c index 6d3c20a48ee..e97a3bfe6f3

[PATCH v3 6/6] smbios: Add documentation and devicetree binding

2020-10-21 Thread Simon Glass
Add information about how to set SMBIOS properties using the devicetree. Signed-off-by: Simon Glass --- Changes in v3: - Add onto the sysinfo binding doc/arch/x86.rst| 8 +++ doc/device-tree-bindings/sysinfo/smbios.txt | 77 + 2 files changed

[PATCH v3 1/6] board: Rename uclass to sysinfo

2020-10-21 Thread Simon Glass
and we want to use the same uclass to provide SMBIOS information. The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system. Rename everything accordingly. Signed-off-by: Simon Glass

[PATCH v3 3/6] x86: Pass an ofnode into each SMBIOS function

2020-10-21 Thread Simon Glass
As a first step to obtaining SMBIOS information from the devicetree, add an ofnode parameter to the writing functions. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Move dm.h header file to avoid build error on qemu-arm - Deal with boards that don't use of-control

[PATCH v3 4/6] smbios: Allow properties to come from the device tree

2020-10-21 Thread Simon Glass
Support a way to put SMBIOS properties in the device tree. These can be placed in a 'board' device in an 'smbios' subnode. Signed-off-by: Simon Glass --- Changes in v3: - Use a different binding with subnodes for each table type lib/smbios.c | 100

[PATCH v2 30/30] x86: fsp: Adjust calculations for MTRR range and DRAM top

2020-10-21 Thread Simon Glass
for mtrr_top, i.e. the top of reserved memory. A side-effect of this change is that the E820 tables have a single entry that extends from the bottom of the memory used by U-Boot to the bottom of the FSP reserved memory. This includes the bloblist, if ACPI tables are placed there. Signed-off-by: Simon Glass

[PATCH v3 2/6] doc: Add a binding for sysinfo

2020-10-21 Thread Simon Glass
Add a simple binding file for this, so that it is clear what this binding directory is for. Signed-off-by: Simon Glass --- (no changes since v1) doc/device-tree-bindings/sysinfo/sysinfo.txt | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 doc/device-tree-bindings

[PATCH v3 0/6] x86: Updates to SMBIOS

2020-10-21 Thread Simon Glass
header file to avoid build error on qemu-arm - Deal with boards that don't use of-control Simon Glass (6): board: Rename uclass to sysinfo doc: Add a binding for sysinfo x86: Pass an ofnode into each SMBIOS function smbios: Allow properties to come from the device tree smbios: Add more

[PATCH v2 28/30] x86: acpi: Don't show the UART address by default

2020-10-21 Thread Simon Glass
This is useful when using Linux's earlycon since the MMIO address must be provided on some platforms, e.g.: earlycon=uart8250,mmio32,0xddffc000,115200n8 However this is only for debugging, so don't show it by default. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since

[PATCH v2 29/30] x86: pinctrl: Silence the warning when a pin is not found

2020-10-21 Thread Simon Glass
This does not necessarily indicate a problem, since some pins are optional. Let the caller show an error if necessary. Reviewed-by: Bin Meng Signed-off-by: Simon Glass --- (no changes since v1) drivers/pinctrl/intel/pinctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 26/30] x86: Silence some logging statements

2020-10-21 Thread Simon Glass
Quite a few log_info() calls are included in the x86 code which should use log_debug() instead. Convert them to reduce unwanted output. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/apollolake/fsp_s.c| 8 arch/x86/cpu

[PATCH v2 27/30] x86: acpi: Include the TPMv1 table only if needed

2020-10-21 Thread Simon Glass
This table is not needed if a v2 TPM is in use. Add a condition to avoid adding it when not needed. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/acpi_table.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git

[PATCH v2 21/30] x86: Define the Chrome OS GNVS region

2020-10-21 Thread Simon Glass
It is not possible to boot Chrome OS properly without passing some basic information from U-Boot. This applies even if verified boot is not being used. Add a structure definition for this. Signed-off-by: Simon Glass --- Changes in v2: - Rename struct chromeos_acpi to struct chromeos_acpi_gnvs

[PATCH v2 24/30] x86: Boot coral into Chrome OS by default

2020-10-21 Thread Simon Glass
Add a script to boot Chrome OS from the internal MMC. This involved adding a few commands and options. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) configs/chromebook_coral_defconfig | 10 +++--- include/configs/chromebook_coral.h | 9 - 2 files

[PATCH v2 23/30] x86: Set up Chrome OS to boot into developer mode

2020-10-21 Thread Simon Glass
Set up a few fields necessarily to make Chrome OS boot without showing a firmware error. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/apollolake/acpi.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git

[PATCH v2 25/30] x86: fsp: Convert fsp_dram to use log_debug()

2020-10-21 Thread Simon Glass
Use log_debug() instead of debug() in this file, to enable the extra features. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/fsp2/fsp_dram.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/fsp2/fsp_dram.c b

[PATCH v2 13/30] x86: nhlt: Correct output of bytes and 16-bit data

2020-10-21 Thread Simon Glass
At present these functions are incorrect. Fix them and add some logging and checking to avoid future problems. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/acpi_nhlt.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

[PATCH v2 22/30] x86: Use CONFIG_CHROMEOS_VBOOT for verified boot

2020-10-21 Thread Simon Glass
CONFIG_CHROMEOS_VBOOT to indicate that verified boot should be used, and CONFIG_CHROMEOS to indicate that the board supports Chrome OS. That allows us to define CONFIG_CHROMEOS on coral. Signed-off-by: Simon Glass --- Changes in v2: - Define CONFIG_CHROMEOS_VBOOT in the Kconfig too - Correct a bisect build

[PATCH v2 20/30] acpi: Don't reset the tables with every new generation

2020-10-21 Thread Simon Glass
At present if SSDT and DSDT code is created, only the latter is retained for examination by the 'acpi items' command. Fix this by only resetting the list when explicitly requested. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/acpi_table.c | 1

[PATCH v2 19/30] x86: acpi: Put the generated code first in DSDT

2020-10-21 Thread Simon Glass
The current implementation for DSDT tables is not correct for the case where there is generated code, as the length ends up being incorrect. Also, we want the generated code to go first in the table. Rewrite this piece to correct these problems. Signed-off-by: Simon Glass Reviewed-by: Bin Meng

[PATCH v2 14/30] x86: nhlt: Fix a few bugs in the table generation

2020-10-21 Thread Simon Glass
At present these tables do not have the correct header, and there is an occasional incorrect value due to uninited data. Fix these bugs. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/acpi_nhlt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH v2 15/30] x86: Show the interrupt pointer with 'irqinfo'

2020-10-21 Thread Simon Glass
It is useful for this command to show the address of the interrupt table. Add support for this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/i386/interrupt.c| 14 +++--- arch/x86/include/asm/interrupt.h | 17 + arch/x86

[PATCH v2 17/30] acpi: Correct reset handling in acpi_device_add_power_res()

2020-10-21 Thread Simon Glass
If there is no reset line, this still emits ACPI code for the reset GPIO. Fix it by updating the check. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) lib/acpi/acpi_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/acpi/acpi_device.c

[PATCH v2 18/30] x86: acpi: Allow the SSDT to be empty

2020-10-21 Thread Simon Glass
If there is nothing in the SSDT we should not include it in the tables. Update the implementation to check this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/acpi_table.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions

[PATCH v2 16/30] x86: sound: Correct error handling

2020-10-21 Thread Simon Glass
A few functions have changed to return pin numbers or I2C addresses. The error checking for some of the callers is therefore wrong. Fix them. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) drivers/sound/da7219.c| 4 ++-- drivers/sound/max98357a.c | 2 +- 2

[PATCH v2 12/30] x86: Allow putting some tables in the bloblist

2020-10-21 Thread Simon Glass
of the tables. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/tables.c | 46 --- include/acpi/acpi_table.h | 10 + lib/Kconfig | 9 lib/acpi/acpi_table.c | 4 ++-- 4 files changed, 64

[PATCH v2 10/30] x86: coral: Correct max98357 file

2020-10-21 Thread Simon Glass
This somehow ended up as an empty file. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) .../max98357-render-2ch-48khz-24b.dat | Bin 0 -> 116 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/board/google/chromebook_coral/max98357-render-2ch-48

[PATCH v2 11/30] x86: Use if instead of #ifdef in write_tables()

2020-10-21 Thread Simon Glass
Use if() to remove the extra build path in this code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/lib/tables.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/x86/lib/tables.c b/arch/x86

[PATCH v2 09/30] x86: Add SMBIOS info for Coral

2020-10-21 Thread Simon Glass
This is required by Chrome OS so that the audio and other unibuild features work correctly. Add it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/dts/chromebook_coral.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/x86/dts

[PATCH v2 08/30] x86: coral: Drop the duplicate PCIe settings

2020-10-21 Thread Simon Glass
These settings are included twice. The second lot are correct, so drop the others. Signed-off-by: Simon Glass Reported-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/dts/chromebook_coral.dts | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/dts

[PATCH v2 07/30] x86: Don't bother clearing global NVS

2020-10-21 Thread Simon Glass
The bloblist guarantees that blobs are zeroed so there is no need to do an additional memset(). Drop it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/intel_common/acpi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/cpu/intel_common

[PATCH v2 06/30] x86: acpi: Store the ACPI context in global_data

2020-10-21 Thread Simon Glass
At present we create the ACPI context but then drop it after generation of tables is complete. This is annoying because we have to then search for tables later. To fix this, allocate the context and store it in global_data. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes

[PATCH v2 04/30] x86: Add support for private files

2020-10-21 Thread Simon Glass
Some boards need to include binary data into the image for use during the boot process. Add a node for these. An example is the audio-codec configuration used by some audio drivers on Intel platforms. If no private files are provided, they will be omitted. Signed-off-by: Simon Glass Reviewed

[PATCH v2 05/30] x86: Allow writing tables to fail

2020-10-21 Thread Simon Glass
At present write_tables() can fail but does not report this problem to its caller. Fix this by changing the return type. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: - Use log_err() to report error arch/x86/cpu/cpu.c| 9 - arch/x86/include/asm

[PATCH v2 00/30] x86: Allow Coral to boot into Chrome OS

2020-10-21 Thread Simon Glass
struct chromeos_acpi to struct chromeos_acpi_gnvs - Fix comment style - Define CONFIG_CHROMEOS_VBOOT in the Kconfig too - Correct a bisect build error - Drop patch "Store the FADT so we can avoid searching for it" - Drop patch "Move ROM_TABLE_ADDR into the C file" Simon Glass (30

[PATCH v2 02/30] x86: apl: Add core init for the SoC

2020-10-21 Thread Simon Glass
Set up MSRs required for Apollo Lake. This enables Linux to use the timers correctly. Also write the fixed MSRs for this platform. Signed-off-by: Simon Glass --- Changes in v2: - Rename update_fixed_mtrss() to update_fixed_mtrrs() - Add comments to enable_pm_timer_emulation

[PATCH v2 03/30] x86: Add a layout for Chrome OS verified boot

2020-10-21 Thread Simon Glass
Add definitions for part of the vboot context used with verified boot. Signed-off-by: Simon Glass --- Changes in v2: - Convert tabs to spaces for consistency arch/x86/include/asm/acpi/vbnv_layout.h | 38 + 1 file changed, 38 insertions(+) create mode 100644 arch/x86

[PATCH v2 01/30] Add an assembly guard around linux/bitops.h

2020-10-21 Thread Simon Glass
This file can be included by any header but it includes C code. Guard it to avoid errors when compiling ASL, etc. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) include/linux/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include

[PATCH 11/32] x86: coral: Correct max98357 file

2020-10-21 Thread Simon Glass
This somehow ended up as an empty file. Fix it. Signed-off-by: Simon Glass --- .../max98357-render-2ch-48khz-24b.dat | Bin 0 -> 116 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/board/google/chromebook_coral/max98357-render-2ch-48khz-24b.dat b/board/goo

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-21 Thread Simon Glass
Hi Wolfgang, On Wed, 21 Oct 2020 at 01:16, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > Yes, it takes one additional step, but it's simple and does not need > > > extra code. > > > > It is actually not simple, for three reasons: > > > > 1. With zboot the args

Re: [PATCH 07/11] bootm: Split out bootargs environment reading / writing

2020-10-21 Thread Simon Glass
Hi Wolfgang, On Wed, 21 Oct 2020 at 01:02, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > > It is also useful for zimage to use a buffer, since it does not actually > > > > put the Linux command line in the bootargs variable. > > > > > > ...which I consider a bug

Re: [PATCH 1/2] dm: core: Add late driver remove option

2020-10-21 Thread Simon Glass
Hi Marek, On Tue, 20 Oct 2020 at 17:37, Marek Vasut wrote: > > On 10/21/20 1:23 AM, Tom Rini wrote: > > On Wed, Oct 21, 2020 at 12:27:45AM +0200, Marek Vasut wrote: > >> On 10/15/20 5:05 PM, Simon Glass wrote: > >> > >> [...] > >> > >>>

Re: [PATCH 09/11] bootm: Allow updating the bootargs in a buffer

2020-10-21 Thread Simon Glass
Hi Wolfgang, On Wed, 21 Oct 2020 at 00:57, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > I think this is the wrong way to address a problem. > > > > > > Instead, zimage should use bootargs as well. > > > > OK I can add that. But for testing purposes it is still

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-20 Thread Simon Glass
Hi Wolfgang, On Tue, 20 Oct 2020 at 07:26, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > At the moment we have some cumbersome constructs like > > >set_bootargs="setenv bootargs bla ${var}" > > > > Yes it is a real pain. The substitution happens on first

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-20 Thread Simon Glass
Hi Wolfgang, On Tue, 20 Oct 2020 at 07:17, Wolfgang Denk wrote: > > Dear Simon, > > In message > you > wrote: > > > > > You add something unconditionally to common code which very few > > > people need. U-Boot size is growing all the time because of such > > > ... features. This may be

Re: [PATCH 00/11] bootm: Support substitions in bootargs and add tests

2020-10-20 Thread Simon Glass
Hi Heinrich, On Mon, 19 Oct 2020 at 08:45, Heinrich Schuchardt wrote: > > On 19.10.20 15:55, Simon Glass wrote: > > This series adds tests to the fixup_silent-linux() function and extends > > the 'zimage' command to use it. > > > > It also adds a new string-substi

Re: [PATCH 07/11] bootm: Split out bootargs environment reading / writing

2020-10-20 Thread Simon Glass
Hi Wolfgang, On Mon, 19 Oct 2020 at 08:45, Wolfgang Denk wrote: > > Dear Simon, > > In message <20201019135602.3943835-8-...@chromium.org> you wrote: > ... > > > > It is also useful for zimage to use a buffer, since it does not actually > > put the Linux command line in the bootargs variable. >

Re: [PATCH 09/11] bootm: Allow updating the bootargs in a buffer

2020-10-20 Thread Simon Glass
Hi Wolfgang, On Mon, 19 Oct 2020 at 08:47, Wolfgang Denk wrote: > > Dear Simon Glass, > > In message <20201019135602.3943835-10-...@chromium.org> you wrote: > > At present we only support updating the 'bootargs' environment > > variable. Add another funct

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-19 Thread Simon Glass
Hi Michael, On Mon, 19 Oct 2020 at 09:47, Michael Walle wrote: > > Am 2020-10-19 16:54, schrieb Wolfgang Denk: > > Dear Simon, > > > > In message <20201019135602.3943835-12-...@chromium.org> you wrote: > >> In some cases it is necessary to pass parameters to Linux so that it > >> will > >> boot

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-19 Thread Simon Glass
Hi Wolfgang, On Mon, 19 Oct 2020 at 08:55, Wolfgang Denk wrote: > > Dear Simon, > > In message <20201019135602.3943835-12-...@chromium.org> you wrote: > > In some cases it is necessary to pass parameters to Linux so that it will > > boot correctly. For example, the rootdev parameter is often

Re: [PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-19 Thread Simon Glass
Hi Rasmus, On Mon, 19 Oct 2020 at 08:43, Rasmus Villemoes wrote: > > On 19/10/2020 15.56, Simon Glass wrote: > > In some cases it is necessary to pass parameters to Linux so that it will > > boot correctly. For example, the rootdev parameter is often used to > > specify

[PATCH 10/11] x86: zimage: Add silent-console processing

2020-10-19 Thread Simon Glass
At present zimage does its own command-line processing and does not support the 'silent console' feature. There doesn't seem to be any good reason for this. Add support for silent console to zimage. Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 14 ++ 1 file changed, 14

[PATCH 11/11] bootm: Support string substitution in bootargs

2020-10-19 Thread Simon Glass
and kernel versions. With this feature, the command line can be read from disk and used directly, with a few substitutions set up. Signed-off-by: Simon Glass --- README | 16 +++ arch/Kconfig| 1 + common/Kconfig.boot | 20 common/bootm.c | 72 ++

[PATCH 08/11] bootm: Update bootm_process_cmdline_env() to use flags

2020-10-19 Thread Simon Glass
At present only one transformation is supported: making the Linux console silent. To prepare for adding more, convert the boolean parameter into a flag value. Signed-off-by: Simon Glass --- common/bootm.c | 8 +--- include/bootm.h | 11 +-- test/bootm.c| 10 +- 3

[PATCH 09/11] bootm: Allow updating the bootargs in a buffer

2020-10-19 Thread Simon Glass
At present we only support updating the 'bootargs' environment variable. Add another function to update a buffer instead. This will allow zimage to use this feature. Also add a lot more tests to cover various cases. Signed-off-by: Simon Glass --- common/bootm.c | 18 +++- include

[PATCH 03/11] bootm: Update fixup_silent_linux() to return an error

2020-10-19 Thread Simon Glass
-off-by: Simon Glass --- common/bootm.c | 22 +++--- include/bootm.h | 11 +-- test/bootm.c| 10 +- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index 8e1e5337036..0ca66188c2b 100644 --- a/common/bootm.c +++ b

[PATCH 00/11] bootm: Support substitions in bootargs and add tests

2020-10-19 Thread Simon Glass
zimage to use the same command-line processing. With these additions it is possible to boot Chrome OS from a U-Boot script on most Chromebooks. Simon Glass (11): env: Allow returning errors from hdelete_r() bootm: Add tests for fixup_silent_linux() bootm: Update fixup_silent_linux

[PATCH 04/11] bootm: Rename fixup_silent_linux()

2020-10-19 Thread Simon Glass
We want to add more processing to this function. Before doing so, rename it to bootm_process_cmdline_env(), which is more generic. Signed-off-by: Simon Glass --- common/bootm.c | 4 ++-- include/bootm.h | 4 ++-- test/bootm.c| 10 +- 3 files changed, 9 insertions(+), 9 deletions

[PATCH 07/11] bootm: Split out bootargs environment reading / writing

2020-10-19 Thread Simon Glass
. Refactor the existing code into two pieces. One handles reading and writing the environment variable, as well as allocating a buffer for use by the rest of the code, which now operates on a buffer. Signed-off-by: Simon Glass --- common/bootm.c | 95

[PATCH 05/11] bootm: Add a bool parameter to bootm_process_cmdline_env()

2020-10-19 Thread Simon Glass
This function will soon do more than just handle the 'silent linux' feature. As a first step, update it to take a boolean parameter, indicating whether or not the processing is required. Signed-off-by: Simon Glass --- common/bootm.c | 20 ++-- include/bootm.h | 3 ++- test

[PATCH 06/11] bootm: Use size rather than length for CONSOLE_ARG

2020-10-19 Thread Simon Glass
Use the size (including terminator) for in this function, rather than the length. This is arguably easier to follow, with the coming refactor. Signed-off-by: Simon Glass --- common/bootm.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/common/bootm.c b

[PATCH 01/11] env: Allow returning errors from hdelete_r()

2020-10-19 Thread Simon Glass
is beyond the scope of this change. Signed-off-by: Simon Glass wip --- cmd/nvedit.c | 6 -- include/search.h | 11 ++- lib/hashtable.c | 12 ++-- test/env/hashtable.c | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/cmd/nvedit.c b/cm

[PATCH 02/11] bootm: Add tests for fixup_silent_linux()

2020-10-19 Thread Simon Glass
This function currently has no tests. Export it so that we can implement a simple test on sandbox. Use IS_ENABLED() to remove the unused code, instead #ifdef. Signed-off-by: Simon Glass --- arch/Kconfig | 1 + common/bootm.c| 14 +- include/bootm.h | 3

[PATCH 24/25] binman: Support compression of sections

2020-10-18 Thread Simon Glass
With the previous changes, it is now possible to compress entire sections. Add some tests to check that compression works correctly, including updating the metadata. Also update the documentation. Signed-off-by: Simon Glass --- tools/binman/README | 8 + tools

[PATCH 19/25] binman: Drop the Entry.CheckSize() method

2020-10-18 Thread Simon Glass
This is only used by entry_Section and that class already calls it. Avoid calling it twice. Also drop it from the documentation. Signed-off-by: Simon Glass --- tools/binman/README | 21 ++--- tools/binman/control.py | 1 - 2 files changed, 10 insertions(+), 12 deletions

[PATCH 22/25] binman: Update CheckEntries() for compressed sections

2020-10-18 Thread Simon Glass
At present this function assumes that the size of a section is at least as large as its contents. With compression this is often not the case. Relax this constraint by using the uncompressed size, if available. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 6 -- 1 file

[PATCH 23/25] binman: Use the actual contents in CheckSize()

2020-10-18 Thread Simon Glass
that at the same time. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 11 --- tools/binman/ftest.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index b146239b779..570dbfcfd41

[PATCH 25/25] binman: Avoid calculated section data repeatedly

2020-10-18 Thread Simon Glass
rebuild it. Tracking that would be possible but is more complex, so it left for another time. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/binman/etype/section.py b/tools/binman

[PATCH 16/25] binman: Avoid reporting image-pos with compression

2020-10-18 Thread Simon Glass
. The entire section must be decompressed first. CBFS does not support compressing whole sections, only individual files, so needs no special handling here. Signed-off-by: Simon Glass --- tools/binman/control.py | 2 +- tools/binman/entry.py | 18 ++ tools/binman/etype

[PATCH 18/25] binman: Move sort and expand to the main Pack() function

2020-10-18 Thread Simon Glass
At present sorting and expanding entries are side-effects of the CheckEntries() function. This is a bit confusing, as 'checking' would not normally involve making changes. Move these steps into the Pack() function instead. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 7

[PATCH 17/25] binman: Drop Entry.CheckOffset()

2020-10-18 Thread Simon Glass
This function just calls CheckEntries() in the only non-trivial implementation. Drop it and use CheckEntries() directly. Signed-off-by: Simon Glass --- tools/binman/entry.py | 2 +- tools/binman/etype/section.py | 5 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH 15/25] binman: Set section contents in GetData()

2020-10-18 Thread Simon Glass
-level image code, when writing out the image. So the performance impact is fairly small. Signed-off-by: Simon Glass --- tools/binman/entry.py | 6 ++ tools/binman/etype/section.py | 14 +- tools/binman/ftest.py | 2 ++ 3 files changed, 21 insertions(+), 1 deletion

[PATCH 20/25] binman: Call CheckSize() from the section's Pack() method

2020-10-18 Thread Simon Glass
At present CheckSize() is called from the function that packs the entries. Move it up to the main Pack() function so that _PackEntries() can just do the packing. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH 21/25] binman: Drop CheckEntries()

2020-10-18 Thread Simon Glass
in the Pack() method. The only real user of CheckEntries() is entry_Section and it can call it directly. Drop the call from 'control' and handle it locally. Signed-off-by: Simon Glass --- tools/binman/README | 22 ++ tools/binman/control.py | 1 - tools

[PATCH 10/25] binman: Move section-building code into a function

2020-10-18 Thread Simon Glass
patches into an un-reviewable glob, disable the test for now. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 35 +-- tools/binman/ftest.py | 3 ++- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/tools/binman/etype/section.py b

[PATCH 14/25] binman: Store the original data before compression

2020-10-18 Thread Simon Glass
When compressing an entry, the original uncompressed data is overwritten. Store it so it is available if needed. Signed-off-by: Simon Glass --- tools/binman/entry.py | 7 ++- tools/binman/ftest.py | 12 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH 11/25] binman: Refactor _BuildSectionData()

2020-10-18 Thread Simon Glass
At present this function does the padding needed around an entry. It is easier to understand what is going on if we have a function that returns the contents of an entry, with padding included. Refactor the code accordingly, adding a new GetPaddedData() method. Signed-off-by: Simon Glass

[PATCH 12/25] binman: Move section padding to the parent

2020-10-18 Thread Simon Glass
Each section is padded up to its size, if the contents are not large enough. Move this logic from _BuildSectionData() to GetPaddedDataForEntry() so that all the padding is in one place. With this, the testDual test is working again, so enable it. Signed-off-by: Simon Glass --- tools/binman

[PATCH 13/25] binman: Make section padding consistent with other entries

2020-10-18 Thread Simon Glass
there is still a special case in entry_Section.GetPaddedData() where an image is padded with the pad byte of the top-level section. This is necessary since otherwise there would be no way to set the pad byte of the image, without adding a top-level section to every image. Signed-off-by: Simon Glass

  1   2   3   4   5   6   7   8   9   10   >