Re: [PATCH v3 03/17] dfu: rename dfu_tftp_write() to dfu_write_by_name()

2020-07-09 Thread Heinrich Schuchardt
On 7/10/20 3:25 AM, AKASHI Takahiro wrote: > This function is essentially independent from tffp, and will also be > utilised in implementing UEFI capsule update in a later commit. > So just give it a more generic name. > In addition, a new configuration option, CONFIG_DFU_ALT, was introduced _ALT

Re: [PATCH v3 01/17] common: update_tftp: remove unnecessary build check

2020-07-09 Thread Heinrich Schuchardt
On 7/10/20 3:25 AM, AKASHI Takahiro wrote: > Logically, the current update_tftp() should and does compile and work > correctly even without satisfying the following condition: > >> #if defined(CONFIG_UPDATE_TFTP) && !defined(CONFIG_MTD_NOR_FLASH) >> #error "CONFIG_UPDATE_TFTP and

Re: [PATCH v3 02/17] dfu: add a hidden reverse-dependency on UPDATE_TFTP

2020-07-09 Thread Heinrich Schuchardt
On 7/10/20 3:25 AM, AKASHI Takahiro wrote: > DFU_OVER_TFTP support on "dfu" command relies on update_tftp() > being available. Just explicitly add this dependency. > > Signed-off-by: AKASHI Takahiro > --- > drivers/dfu/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [RFC PATCH v2 0/3] RFC: tiny-dm: Proposal for using driver model in SPL

2020-07-09 Thread Walter Lozano
Hi Simon, On 2/7/20 18:10, Simon Glass wrote: This series provides a proposed enhancement to driver model to reduce overhead in SPL. These patches should not be reviewed other than to comment on the approach. The code is all lumped together in a few patches and so cannot be applied as is. For

[PATCH 1/2] imx8m: implement armv8_el2_to_aarch32

2020-07-09 Thread peng . fan
From: Peng Fan Add iMX8M specific armv8_el2_to_aarch32 to let AArch64 mode U-Boot could boot aarch32 mode linux with FIT image as below: /dts-v1/; / { description = "Configuration to load ARM32 Linux"; images { kernel@1 { description =

[PATCH 2/2] imx8mm_evk: enlarge CONFIG_SYS_BOOTM_LEN

2020-07-09 Thread peng . fan
From: Peng Fan Enlarge CONFIG_SYS_BOOTM_LEN when booting FIT image with kernel. Signed-off-by: Peng Fan --- include/configs/imx8mm_evk.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 382ba620cc..d1c0e0ec2e 100644 ---

RE: [EXT] Re: [PATCH] rtc: pcf2127: fix uninitialized variable msg

2020-07-09 Thread Biwen Li (OSS)
> > On 09/07/2020 13.38, Biwen Li wrote: > >> > >> On 09/07/2020 12.58, Biwen Li wrote: > >>> From: Biwen Li > >>> > >>> Fix uninitialized variable msg > >>> > >>> struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); > >>> - struct i2c_msg msg; > >>> + struct i2c_msg msg = {0};

[PATCH v3 16/17] test/py: add a test for uefi firmware update capsule of FIT image

2020-07-09 Thread AKASHI Takahiro
The test can run on sandbox build and it attempts to execute a firmware update via a capsule-on-disk, using a FIT image capsule, CONFIG_EFI_CAPSULE_FIT. To run this test successfully, you need configure U-Boot specifically; See test_capsule_firmware.py for requirements, and hence it won't run on

[PATCH v3 14/17] cmd: add "efidebug capsule" command

2020-07-09 Thread AKASHI Takahiro
"efidebug capsule" is more or less a debugging utility. efidebug capsule update: invoke UpdateCapsule against data on memory efidebug capsule show: show a capsule header efidebug capsule result: dump a capsule result variable Signed-off-by: AKASHI Takahiro --- cmd/efidebug.c | 235

[PATCH v3 17/17] test/py: add a test for uefi firmware update capsule of raw image

2020-07-09 Thread AKASHI Takahiro
The test can run on sandbox build and it attempts to execute a firmware update via a capsule-on-disk, using a raw image capsule, CONFIG_EFI_CAPSULE_RAW. To run this test successfully, you need configure U-Boot specifically; See test_capsule_firmware.py for requirements, and hence it won't run on

[PATCH v3 15/17] tools: add mkeficapsule command for UEFI capsule update

2020-07-09 Thread AKASHI Takahiro
This is a utility mainly for test purpose. mkeficapsule -f: create a test capsule file for FIT image firmware Having said that, you will be able to customize the code to fit your specific requirements for your platform. Signed-off-by: AKASHI Takahiro --- tools/Makefile | 3 +

[PATCH v3 13/17] efi_loader: add firmware management protocol for raw image

2020-07-09 Thread AKASHI Takahiro
In this commit, a very simple firmware management protocol driver is implemented. It will take a binary image in a capsule file and apply the data using dfu backend storage drivers via dfu_write_by_alt() interface. So "dfu_alt_info" variable should be properly set to specify a device and location

[PATCH v3 10/17] efi_loader: capsule: support firmware update

2020-07-09 Thread AKASHI Takahiro
A capsule tagged with the guid, EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID, is handled as a firmware update object. What efi_update_capsule() basically does is to load any firmware management protocol (or fmp) drivers contained in a capsule, find out an appropriate fmp driver and then invoke its

[PATCH v3 12/17] dfu: add dfu_write_by_alt()

2020-07-09 Thread AKASHI Takahiro
This function is a variant of dfu_write_by_name() and takes a DFU alt setting number for dfu configuration. It will be utilised to implement UEFI capsule management protocol for raw image in a later commit. Signed-off-by: AKASHI Takahiro --- drivers/dfu/dfu_alt.c | 47

[PATCH v3 11/17] efi_loader: add firmware management protocol for FIT image

2020-07-09 Thread AKASHI Takahiro
In this commit, a very simple firmware management protocol driver is implemented. It will take a common FIT image firmware in a capsule file and apply the data using dfu backend storage drivers via update_fit() interface. So "dfu_alt_info" variable should be properly set to specify a device and

[PATCH v3 07/17] efi_loader: define UpdateCapsule api

2020-07-09 Thread AKASHI Takahiro
In this commit, skeleton functions for capsule-related API's are added under CONFIG_EFI_UPDATE_CAPSULE configuration. Detailed implementation for a specific capsule type will be added in the succeeding patches. Signed-off-by: AKASHI Takahiro --- include/efi_api.h| 12 +++

[PATCH v3 06/17] efi_loader: add option to initialise EFI subsystem early

2020-07-09 Thread AKASHI Takahiro
If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation of UEFI subsystem will be done as part of U-Boot initialisation. Please note that this option won't be enabled explicitly by users, instead, should be enabled implicitly by other configuration options. Specifically, this

[PATCH v3 09/17] efi_loader: capsule: add memory range capsule definitions

2020-07-09 Thread AKASHI Takahiro
Memory range capsule gives us a way to notify that some memory regions should be left untouched across the next reset. See UEFI specification, section 8.5.3. Since how we should handle this kind of capsule is totally up to the system, no implementation will be added in this commit.

[PATCH v3 08/17] efi_loader: capsule: add capsule_on_disk support

2020-07-09 Thread AKASHI Takahiro
Capsule data can be loaded into the system either via UpdateCapsule runtime service or files on a file system (of boot device). The latter case is called "capsules on disk", and actual updates will take place at the next boot time. In this commit, we will support capsule on disk mechanism.

[PATCH v3 05/17] dfu: export dfu_list

2020-07-09 Thread AKASHI Takahiro
This variable will be utilized to enumerate all dfu entities for UEFI capsule firmware update in a later commit. Signed-off-by: AKASHI Takahiro --- drivers/dfu/dfu.c | 2 +- include/dfu.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dfu/dfu.c

[PATCH v3 02/17] dfu: add a hidden reverse-dependency on UPDATE_TFTP

2020-07-09 Thread AKASHI Takahiro
DFU_OVER_TFTP support on "dfu" command relies on update_tftp() being available. Just explicitly add this dependency. Signed-off-by: AKASHI Takahiro --- drivers/dfu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index

[PATCH v3 03/17] dfu: rename dfu_tftp_write() to dfu_write_by_name()

2020-07-09 Thread AKASHI Takahiro
This function is essentially independent from tffp, and will also be utilised in implementing UEFI capsule update in a later commit. So just give it a more generic name. In addition, a new configuration option, CONFIG_DFU_ALT, was introduced so that the file will be compiled with different

[PATCH v3 04/17] common: update: add a generic interface for FIT image

2020-07-09 Thread AKASHI Takahiro
The main purpose of this patch is to separate a generic interface for updating firmware using DFU drivers from "auto-update" via tftp. This function will also be used in implementing UEFI capsule update in a later commit. Signed-off-by: AKASHI Takahiro --- common/Kconfig | 16 +++

[PATCH v3 01/17] common: update_tftp: remove unnecessary build check

2020-07-09 Thread AKASHI Takahiro
Logically, the current update_tftp() should and does compile and work correctly even without satisfying the following condition: > #if defined(CONFIG_UPDATE_TFTP) && !defined(CONFIG_MTD_NOR_FLASH) > #error "CONFIG_UPDATE_TFTP and !CONFIG_MTD_NOR_FLASH needed for > legacy behaviour" > #endif It

[PATCH v3 00/17] efi_loader: add capsule update support

2020-07-09 Thread AKASHI Takahiro
Summary === 'UpdateCapsule' is one of runtime services defined in UEFI specification and its aim is to allow a caller (OS) to pass information to the firmware, i.e. U-Boot. This is mostly used to update firmware binary on devices by instructions from OS. While 'UpdateCapsule' is a runtime

Re: [RFC PATCH v2 0/3] RFC: tiny-dm: Proposal for using driver model in SPL

2020-07-09 Thread Simon Glass
Hi, On Thu, 2 Jul 2020 at 21:03, Simon Glass wrote: > > Hi Heinrich, > > On Thu, 2 Jul 2020 at 20:24, Heinrich Schuchardt wrote: > > > > > > > > Am 2. Juli 2020 23:10:01 MESZ schrieb Simon Glass : > > >This series provides a proposed enhancement to driver model to reduce > > >overhead in SPL. >

Re: [PATCH v2 5/8] timer: Allow delays with a 32-bit microsecond timer

2020-07-09 Thread Simon Glass
Hi Bin, On Thu, 9 Jul 2020 at 18:44, Bin Meng wrote: > > Hi Simon, > > On Fri, Jul 10, 2020 at 8:28 AM Simon Glass wrote: > > > > Hi Bin, > > > > On Tue, 7 Jul 2020 at 01:09, Bin Meng wrote: > > > > > > Hi Simon, > > > > > > On Sat, Jul 4, 2020 at 12:38 AM Simon Glass wrote: > > > > > > > >

[PATCH v3 3/4] x86: Avoid #ifdef with CONFIG_HAVE_ACPI_RESUME

2020-07-09 Thread Simon Glass
At present this enables a few arch-specific members of the global_data struct which are otherwise not part of the struct. As a result we have to use #ifdef in various places. The cost of always having these in the struct is small. Adjust things so that we can use compile-time code instead of

Re: [PATCH v2 5/8] timer: Allow delays with a 32-bit microsecond timer

2020-07-09 Thread Bin Meng
Hi Simon, On Fri, Jul 10, 2020 at 8:28 AM Simon Glass wrote: > > Hi Bin, > > On Tue, 7 Jul 2020 at 01:09, Bin Meng wrote: > > > > Hi Simon, > > > > On Sat, Jul 4, 2020 at 12:38 AM Simon Glass wrote: > > > > > > The current get_timer_us() uses 64-bit arithmetic. When implementing > > >

[PATCH v3 4/4] x86: fsp: Support a warning message when DRAM init is slow

2020-07-09 Thread Simon Glass
With DDR4, Intel SOCs take quite a long time to init their memory. During this time, if the user is watching, it looks like SPL has hung. Add a message in this case. This works by adding a return code to fspm_update_config() that indicates whether MRC data was found and a new property to the

[PATCH v3 2/4] coral: Enable the copy framebuffer

2020-07-09 Thread Simon Glass
Enable this feature on chromebook_coral to speed up the display. With this change, the time taken to print the environment to the display without CONFIG_CONSOLE_SCROLL_LINES is reduced from 1830ms to 62ms. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 1/4] timer: Allow delays with a 32-bit microsecond timer

2020-07-09 Thread Simon Glass
The current get_timer_us() uses 64-bit arithmetic on 32-bit machines. When implementing microsecond-level timeouts, 32-bits is plenty. Add a new function that uses an unsigned long. On 64-bit machines this is still 64-bit, but this doesn't introduce a penalty. On 32-bit machines it is more

[PATCH v3 47/49] x86: chromebook_link64: Correct the image layout

2020-07-09 Thread Simon Glass
At present the image layout is not correct, since it uses the SDRAM address of the 64-bit U-Boot as the ROM address. Fix this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) configs/chromebook_link64_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 49/49] x86: chromebook_samus_tpl: Correct the image layout

2020-07-09 Thread Simon Glass
At present there is not enough space for U-Boot due to the EFI loader. Correct this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v2) Changes in v2: - Add patches to partially migrate rockchip to use binman configs/chromebook_samus_tpl_defconfig | 2 +- 1 file

[PATCH v3 46/49] x86: Move the fdtmap away from the binary blobs

2020-07-09 Thread Simon Glass
This causes conflicts on chromebook_link64. Move it to after U-Boot where there should be plenty of space. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/dts/u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 45/49] rockchip: Drop the fit_spl_optee.sh script

2020-07-09 Thread Simon Glass
Now that all board use binman instead of this script, drop it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/arm/mach-rockchip/fit_spl_optee.sh | 84 - 1 file changed, 84 deletions(-) delete mode 100755

[PATCH v3 44/49] rockchip: Convert evb-rk3229 over to use binman

2020-07-09 Thread Simon Glass
At present this board uses a custom script to produce the .its file. Update it to use binman instead. Binman can create all the images that are needed. Signed-off-by: Simon Glass --- Changes in v3: - Drop leftover debugging configs/evb-rk3229_defconfig | 2 +- 1 file changed, 1 insertion(+),

[PATCH v3 48/49] x86: chromebook_panther: Correct the image layout

2020-07-09 Thread Simon Glass
This board does not have microcode but at present that is not supported by Kconfig nor the binman image layout. Fix both of these. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/Kconfig| 7 ++- arch/x86/dts/u-boot.dtsi|

[PATCH v3 41/49] Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty

2020-07-09 Thread Simon Glass
At present we use the empty string to indicate that there is no FIT generator, but this doesn't allow an individual board to undefine it. Create a separate bool instead. Update the config of the boards which currently have an empty string. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 42/49] Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR

2020-07-09 Thread Simon Glass
This option is used to run arch-specific shell scripts which produce .its files which are used to produce FIT images. We already have binman which is designed to produce firmware images. It is more powerful and has tests. So this option should be deprecated and not used. Existing uses should be

[PATCH v3 39/49] Makefile: Move CONFIG_TOOLS_DEBUG check to later

2020-07-09 Thread Simon Glass
At present this is checked before the config has been loaded by the Makefile, so it doesn't work. Move the check to later. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile

[PATCH v3 43/49] rockchip: Convert evb-rk3288 over to use binman

2020-07-09 Thread Simon Glass
At present this board uses a custom script to produce the .its file. Update it to use binman instead. Binman can create all the images that are needed. Signed-off-by: Simon Glass --- Changes in v3: - Drop use of rk322x.dtsi - Add changes to rk3288-u-boot.dtsi instead Kconfig

[PATCH v3 40/49] Makefile: Fix a long line in cmd_mkfitimage

2020-07-09 Thread Simon Glass
Fix this line which is over the limit. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 57bd1ea85e..f2b229096e 100644 --- a/Makefile +++ b/Makefile @@ -997,7

[PATCH v3 37/49] tegra: Makefile: Drop explicit targets built by binman

2020-07-09 Thread Simon Glass
On tegra various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific

[PATCH v3 38/49] mediatek: Makefile: Drop explicit targets built by binman

2020-07-09 Thread Simon Glass
On mediatek various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific

[PATCH v3 32/49] Makefile: Rename ALL-y to INPUTS-y

2020-07-09 Thread Simon Glass
When binman is in use, most of the targets built by the Makefile are inputs to binman. We then need a final rule to run binman to produce the final outputs. Rename the variable to indicate this, and add a new 'inputs' target. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes

[PATCH v3 34/49] x86: Makefile: Drop explicit targets built by binman

2020-07-09 Thread Simon Glass
On x86 various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. Update the Makefile to have a separate, final step which

[PATCH v3 36/49] sunxi: Makefile: Drop explicit targets built by binman

2020-07-09 Thread Simon Glass
On sunxi various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific

[PATCH v3 35/49] x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM

2020-07-09 Thread Simon Glass
This Kconfig is not needed anymore since U-Boot will build the ROM if the required binary blobs exist. The BUILD_ROM environment variable used to request that the ROM be built. Now this always happens if the required binary blobs are available. Update it to mean that U-Boot should fail if the ROM

[PATCH v3 33/49] powerpc: mpc85xx: Only enable binman when it is needed

2020-07-09 Thread Simon Glass
Quite a few boards using this SoC family don't use binman, yet CONFIG_BINMAN is enabled for all of them. But the option should only be enabled if we expect binman to produce an image. Calling binman when the device tree is missing, etc. will cause failer. Add a condition so that CONFIG_BINMAN is

[PATCH v3 31/49] tegra: Don't enable binman on ARMv8 SoCs

2020-07-09 Thread Simon Glass
At present only the ARMv7 tegra SoCs actually use binman to create an image. Change the config to reflect this, since otherwise running binman will produce an error. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 30/49] tegra: Drop the unused non-binman code

2020-07-09 Thread Simon Glass
This has been in the Makefile long enough to ensure migration is complete. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 11744559c4..1d3182caf7 100644 ---

[PATCH v3 28/49] rockchip: Enable building a SPI ROM image on jerry

2020-07-09 Thread Simon Glass
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for jerry. Change the binman image definition to support multiple images, since it may be used to build both u-boot-rockchip.bin and u-boot.rom Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 17/49] binman: Detect when valid images are not produced

2020-07-09 Thread Simon Glass
When external blobs are missing, show a message indicating that the images are not functional. Signed-off-by: Simon Glass --- Changes in v3: - Move the SetAllowMissing() function into an earlier patch tools/binman/control.py | 16 +++-- tools/binman/entry.py

[PATCH v3 27/49] rockchip: bob: Support SPI-flash booting

2020-07-09 Thread Simon Glass
Update the config for chromebook_bob to support booting from SPI flash. The existing SPL size is too small since ATF is needed, so double it. Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_bob_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v3 23/49] x86: Change how selection of ROMs works

2020-07-09 Thread Simon Glass
Most x86 boards build a u-boot.rom which is programmed into SPI flash. But this is not unique to x86. For example some rockchip boards can also boot from SPI flash. Also, at least on x86, binary blobs are sadly quite common. It is not possible to build a functional image without them, and U-Boot

[PATCH v3 29/49] rockchip: Enable building a SPI ROM image on bob

2020-07-09 Thread Simon Glass
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for bob. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/rk3399-gru-u-boot.dtsi | 4 arch/arm/dts/rk3399-gru.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 27

[PATCH v3 20/49] mkimage: Allow updating the FIT timestamp

2020-07-09 Thread Simon Glass
Normally the FIT timestamp is created the first time mkimage is run on a FIT, when converting the source .its to the binary .fit file. This corresponds to using the -f flag. But if the original input to mkimage is a binary file (already compiled) then the timestamp is assumed to have been set

[PATCH v3 26/49] rockchip: jerry: Add serial support

2020-07-09 Thread Simon Glass
This option allows the serial console to work correctly. Add it. Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_jerry_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig index

[PATCH v3 22/49] binman: Add support for generating a FIT

2020-07-09 Thread Simon Glass
FIT (Flat Image Tree) is the main image format used by U-Boot. In some cases scripts are used to create FITs within the U-Boot build system. This is not ideal for various reasons: - Each architecture has its own slightly different script - There are no tests - Some are written in shell, some in

[PATCH v3 25/49] Makefile: Allow building .rom files for non-x86 boards

2020-07-09 Thread Simon Glass
Some non-x86 devices can use SPI flash to boot and need to produce images of a fixed size to program the flash. Add a way to handle this for non-x86 boards. Signed-off-by: Simon Glass --- Changes in v3: - Add a comment about CONFIG_SPL_FRAMEWORK Makefile | 14 ++ 1 file changed,

[PATCH v3 19/49] binman: Allow zero-length entries to overlap

2020-07-09 Thread Simon Glass
Some binary blobs unfortunately obtain their position in the image from other binary blobs, such as Intel's 'descriptor'. In this case we cannot rely on packing to work. It is not possible to produce a valid image in any case, due to the missing blobs. Allow zero-length overlaps so that this does

[PATCH v3 21/49] dtoc: Allow adding variable-sized data to a dtb

2020-07-09 Thread Simon Glass
Add a method for adding a property containing arbitrary bytes. Make sure that the tree can expand as needed in this case. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/fdt.py | 17 +++-- tools/dtoc/test_fdt.py | 4 2 files changed, 19 insertions(+), 2

[PATCH v3 24/49] rockchip: Allow Bob to use SPI boot

2020-07-09 Thread Simon Glass
Bob is a Chromebook and can boot from SPI flash. Add it to the condition check for this. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-rockchip/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/spl.c

[PATCH v3 16/49] patman: Update errors and warnings to use stderr

2020-07-09 Thread Simon Glass
When warnings and errors are produced by tools they should be written to stderr. Update the tout implementation to handle this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) tools/binman/ftest.py | 2 +- tools/patman/tout.py | 5 - 2 files changed, 5

[PATCH v3 14/49] binman: Convert existing binary blobs to blob_ext

2020-07-09 Thread Simon Glass
Many of the existing blobs rely on external binaries which may not be available. Move them over to use blob_ext to indicate this. Unfortunately cros-ec-rw cannot use this class because it inherits another. So set the 'external' value for that class. While we are here, drop the import of Entry

[PATCH v3 18/49] binman: Allow missing Intel blobs

2020-07-09 Thread Simon Glass
Update the Intel blob entries to support missing binaries. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) tools/binman/etype/intel_descriptor.py | 7 - tools/binman/etype/intel_ifwi.py | 17 --- tools/binman/etype/section.py | 4 +--

[PATCH v3 15/49] binman: Allow external binaries to be missing

2020-07-09 Thread Simon Glass
Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this

[PATCH v3 11/49] binman: Re-enable concurrent tests

2020-07-09 Thread Simon Glass
With the change to absolute imports the concurrent tests feature unfortunately broke. Fix it. We cannot easy add a warning, since the output messes up tests which check the output. Signed-off-by: Simon Glass --- (no changes since v1) tools/patman/test_util.py | 4 +++- 1 file changed, 3

[PATCH v3 12/49] binman: Use super() instead of specifying parent type

2020-07-09 Thread Simon Glass
It is easier and less error-prone to use super() when the parent type is needed. Update binman to remove the type names. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) tools/binman/etype/_testing.py | 4 ++-- tools/binman/etype/blob.py

[PATCH v3 10/49] binman: Adjust pylibfdt for incremental build

2020-07-09 Thread Simon Glass
If the pylibfdt shared-object file is detected, then Python assumes that the libfdt.py file exists also. Sometimes when an incremental build aborts, the shared-object file is built but the libfdt.py is not. The only way out at this point is to use 'make mkproper', or similar. Fix this by

[PATCH v3 13/49] binman: Add an etype for external binary blobs

2020-07-09 Thread Simon Glass
It is useful to be able to distinguish between ordinary blobs such as u-boot.bin and external blobs that cannot be build by the U-Boot build system. If the external blobs are not available for some reason, then we know that a value image cannot be built. Introduce a new 'blob-ext' entry type for

[PATCH v3 09/49] binman: Fix a few typos in the entry docs

2020-07-09 Thread Simon Glass
Some typos have been fixed in the generated entry docs but the code was not updated. Fix this. Signed-off-by: Simon Glass --- Changes in v3: - Fix the code rather than breaking the README tools/binman/etype/intel_me.py| 2 +-

[PATCH v3 07/49] binman: Set a default toolpath

2020-07-09 Thread Simon Glass
When binman is run from 'make check' it is given a toolpath so that the latest tools (e.g. mkimage) are used. When run manually with no toolpath, it relies on the system mkimage. But this may be missing or old. Make some effort to find the built-from-soruce version by looking in the current

[PATCH v3 08/49] binman: Add support for calling mkimage

2020-07-09 Thread Simon Glass
As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/README.entries | 23

[PATCH v3 06/49] binman: Specify the toolpath when running test coverage

2020-07-09 Thread Simon Glass
At present binman's test coverage runs without a toolpath set. This means that the system tools will be used. That may not be correct if they are out of date or missing and this can result in a reduction in test coverage below 100%. Provide the toolpath to binman in this case. Signed-off-by:

[PATCH v3 05/49] binman: Correct the search patch for pylibfdt

2020-07-09 Thread Simon Glass
Now that binman uses tools/ as its base directory for importing modules, the path to the pylibfdt build by U-Boot is incorrect. Fix it with a new path. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v2) Changes in v2: - Leave the old (object-directory) path in place

[PATCH v3 04/49] binman: cbfs: Fix IFWI typo

2020-07-09 Thread Simon Glass
This comment references the wrong thing. Fix it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) tools/binman/etype/cbfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index

[PATCH v3 03/49] binman: Output errors to stderr

2020-07-09 Thread Simon Glass
At present binman outputs errors to stdout which means that fails are effectively silent when printed by buildman, for example. Fix this by outputing errors to stderr. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v2) Changes in v2: - Add new binman patch to output

[PATCH v3 01/49] dm: core Fix long line in device_bind_common()

2020-07-09 Thread Simon Glass
Fix an over-length line in this function. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) drivers/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index 476133f172..355dbd147a 100644

[PATCH v3 02/49] .gitignore: Ignore Python 3 cache directories

2020-07-09 Thread Simon Glass
These can appear when moving between branches that have different tools in the tree. Ignore them. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2e1c8bf2bf..e66aa864da

[PATCH v3 00/49] rockchip: x86: Support building ROM files automatically with binman

2020-07-09 Thread Simon Glass
Rockchip-based Chromebooks support booting from SPI flash. It is annoying to have to manually build the SPI image when the SD image is built automatically. This feature is already available for x86 devices, so the existing mechanism is reused. Briefly, this allows a BUILD_ROM environment variable

Re: [PATCH 05/10] board_f: mips: Factor out mips-specific bdinfo setup

2020-07-09 Thread Simon Glass
Hi, On Thu, 9 Jul 2020 at 06:28, Heinrich Schuchardt wrote: > > On 09.07.20 12:27, Ovidiu Panait wrote: > > Hi, > > > > On 09.07.2020 12:15, Heinrich Schuchardt wrote: > >> On 09.07.20 10:04, Ovidiu Panait wrote: > >>> Factor out mips-specific bdinfo setup from generic init sequence to > >>>

Re: [PATCH 01/10] board_f: Introduce arch_setup_bdinfo initcall

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:07, Ovidiu Panait wrote: > > Certain architectures (ppc, mips, sh, m68k) use setup board_part1 and > setup_board_part2 calls during pre-relocation init to populate gd->bd > boardinfo fields. This makes the generic init sequence cluttered with > arch-specific ifdefs. > >

Re: [PATCH 03/10] board_f: ppc: Factor out ppc-specific bdinfo setup

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:09, Ovidiu Panait wrote: > > Factor out ppc-specific bdinfo setup from generic init sequence to > arch_setup_bdinfo in arch/powerpc/lib/bdinfo.c. > > Signed-off-by: Ovidiu Panait > --- > > arch/powerpc/lib/bdinfo.c | 42 +++ >

Re: [PATCH v2 43/49] rockchip: Convert evb-rk3288 over to use binman

2020-07-09 Thread Simon Glass
Hi Kever, On Tue, 7 Jul 2020 at 19:03, Kever Yang wrote: > > Hi Simon, > > On 2020/6/14 上午10:57, Simon Glass wrote: > > + optee { > > + description = "OP-TEE"; > > + type = "firmware"; > > +

Re: [PATCH v4 6/6] rockchip: make_fit_atf: add signature handling【请注意,邮件由s...@google.com代发】

2020-07-09 Thread Simon Glass
Hi Kever, On Tue, 7 Jul 2020 at 06:01, Kever Yang wrote: > > Hi Simon, > > On 2020/6/26 上午9:12, Simon Glass wrote: > > Hi Heiko, > > > > On Fri, 19 Jun 2020 at 04:45, Heiko Stuebner wrote: > >> From: Heiko Stuebner > >> > >> If the newly added fit-generator key-options are found, append needed

Re: [PATCH 06/10] dm: blk: Use IS_ENABLED() instead of #ifdefs in blk_post_probe

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:09, Ovidiu Panait wrote: > > Use IS_ENABLED() instead of #ifdef in blk_post_probe function. > > No functional change intended. > > Signed-off-by: Ovidiu Panait > --- > > drivers/block/blk-uclass.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-)

Re: [PATCH v2 43/49] rockchip: Convert evb-rk3288 over to use binman

2020-07-09 Thread Simon Glass
Hi Kever, On Tue, 7 Jul 2020 at 05:57, Kever Yang wrote: > > Hi Simon, > > Thanks for this patch. > > On 2020/6/14 上午10:57, Simon Glass wrote: > > At present this board uses a custom script to produce the .its file. > > Update it to use binman instead. Binman can create all the images that

Re: [PATCH v2 24/49] Makefile: Allow building .rom files for non-x86 boards

2020-07-09 Thread Simon Glass
Hi Bin, On Mon, 29 Jun 2020 at 01:30, Bin Meng wrote: > > Hi Simon, > > On Sun, Jun 14, 2020 at 10:57 AM Simon Glass wrote: > > > > Some non-x86 devices can use SPI flash to boot and need to produce images > > of a fixed size to program the flash. > > > > Add a way to handle this for non-x86

Re: [PATCH 04/10] board_f: sh: Factor out sh-specific bdinfo setup

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:08, Ovidiu Panait wrote: > > Factor out sh-specific bdinfo setup from generic init sequence to > arch_setup_bdinfo in arch/sh/lib/board.c. > > Signed-off-by: Ovidiu Panait > --- > > arch/sh/lib/board.c | 18 ++ > common/board_f.c| 4 ++-- > 2 files

Re: [PATCH 09/10] blkcache: Extend blkcache_init to cover CONFIG_NEEDS_MANUAL_RELOC

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:09, Ovidiu Panait wrote: > > Extend manual relocation of block_cache list pointers to all platforms that > enable CONFIG_NEEDS_MANUAL_RELOC. Remove m68k-specific checks and provide a > single implementation that adds gd->reloc_off to the pre-relocation > pointers. > > Cc:

Re: [PATCH 08/10] common/board_r: Remove initr_serial wrapper

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:09, Ovidiu Panait wrote: > > Remove the initr_serial->serial_initialize indirection and call > serial_initialize directly. > > Signed-off-by: Ovidiu Panait > --- > > common/board_r.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) Reviewed-by: Simon

Re: [PATCH 10/10] common/board_r: Move blkcache_init call earlier in the boot sequence

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:11, Ovidiu Panait wrote: > > blkcache_init manually relocates blkcache list pointers when > CONFIG_NEEDS_MANUAL_RELOC is enabled. However, it is called very late in > the boot sequence, which could be a problem if previous boot calls execute > blkcache operations with the

Re: [PATCH 07/10] drivers: serial: Make serial_initialize return int

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:10, Ovidiu Panait wrote: > > serial_initialize is called only during the common init sequence, after > relocation (in common/board_r.c). Because it has a void return value, it > has to wrapped in initr_serial. In order to be able to get rid of this > indirection, make

Re: [PATCH] serial: Fix SIFIVE debug serial dependency

2020-07-09 Thread Simon Glass
Hi Michal, On Thu, 9 Jul 2020 at 08:17, Michal Simek wrote: > > The commit 4cc24aeaf420 ("serial: Add missing Kconfig dependencies for > debug consoles") has added incorrect dependency for SIFIVE debug uart which > should depend on SIFIVE driver instead of PL01x. Does that mean this should have

Re: [PATCH 1/2] vboot: add support for multiple required keys

2020-07-09 Thread Simon Glass
Hi Thirupathaiah, On Wed, 8 Jul 2020 at 16:47, Thirupathaiah Annapureddy wrote: > > Hi Simon, > > Thanks a lot for reviewing the patch. > > I would appreciate if you could clarify the following in-line questions: > > On 6/29/2020 10:31 AM, Simon Glass wrote: > > Hi Thirupathaiah, > > > > > > On

Re: [PATCH 02/10] board_f: m68k: Factor out m68k-specific bdinfo setup

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 02:09, Ovidiu Panait wrote: > > Factor out m68k-specific bdinfo setup to arch_setup_bdinfo in > arch/m68k/lib/bdinfo.c. Also, use if(IS_ENABLED()) instead of #ifdef where > possible. > > Signed-off-by: Ovidiu Panait > --- > > arch/m68k/lib/bdinfo.c | 32

Re: [PATCH] lib: fdt: Introduce fdtdec_setup_mem_size_base_lowest()

2020-07-09 Thread Simon Glass
Hi Michal, On Thu, 9 Jul 2020 at 07:02, Michal Simek wrote: > > New function should be called from board dram_init() because it initialized > gd->ram_base/ram_size. It finds the lowest available memory. > > On systems with multiple memory nodes finding out the first memory node by >

Re: [PATCH v2 5/8] timer: Allow delays with a 32-bit microsecond timer

2020-07-09 Thread Simon Glass
Hi Bin, On Tue, 7 Jul 2020 at 01:09, Bin Meng wrote: > > Hi Simon, > > On Sat, Jul 4, 2020 at 12:38 AM Simon Glass wrote: > > > > The current get_timer_us() uses 64-bit arithmetic. When implementing > > microsecond-level timeouts, 32-bits is plenty. Add a new function to > > support this. > > >

  1   2   3   >