[PATCH] xhci: Only build xhci_reset_hw() if CONFIG_DM_USB is enabled

2020-07-09 Thread Nicolas Saenz Julienne
This was breaking build on some configurations. Signed-off-by: Nicolas Saenz Julienne --- Matthias, I don't know if it's possible at this stage, but I'd ideally squash this into the offending patch. drivers/usb/host/xhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/

[PATCH] include/bitfield.h: include byteorder.h

2020-07-09 Thread Nicolas Saenz Julienne
This is needed in order to use the cpu_to_*()/*_to_cpu() family of functions. Signed-off-by: Nicolas Saenz Julienne --- IMO the ideal thing would be to squash this into the original patch. include/linux/bitfield.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/bitfield.h b/i

Re: [v2] test: Have test_fs work with non-functional guestmount tools

2020-07-09 Thread Simon Glass
On Thu, 9 Jul 2020 at 07:42, Tom Rini wrote: > > Since 2011 Ubuntu has intentionally broken support for guestmount[1] by > default and requires sysadmin intervention to re-enable support. This > in turn exposed that in our tests if guestmount is available but fails > we do not fall back to trying

[PATCH] board/km: update MAINTAINERS email

2020-07-09 Thread Holger Brunck
Signed-off-by: Holger Brunck CC: Valentin Longchamp --- board/keymile/common/qrio.h | 2 +- board/keymile/km83xx/MAINTAINERS | 2 +- board/keymile/km_arm/MAINTAINERS | 2 +- board/keymile/kmp204x/MAINTAINERS | 2 +- board/keymile/secu1/MAINTAINERS | 2 +- 5 files changed, 5 insertions(

[PATCH 4/4] fs/squashfs: add support for zlib decompression

2020-07-09 Thread Joao Marcos Costa
Add call to zlib's 'uncompress' function. Add function to display the right error message depending on the decompression's return value. Signed-off-by: Joao Marcos Costa --- fs/squashfs/sqfs_decompressor.c | 24 1 file changed, 24 insertions(+) diff --git a/fs/squashfs/

[PATCH 3/4] fs/squashfs: add sources for zlib decompression

2020-07-09 Thread Joao Marcos Costa
Add zlib (v1.2.11) functions to U-Boot. SquashFS depends on those functions to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- include/u-boot/zlib.h | 32 +++ lib/zlib/u

[PATCH 0/4] Add support for the SquashFS filesystem

2020-07-09 Thread Joao Marcos Costa
Hello! This series adds support for the SquashFS filesystem. For now, zlib is the only supported compression type. This is my first contribution to U-Boot as well as to a major Open Source project. Best regards, Joao Marcos Costa Joao Marcos Costa (4): fs/squashfs: new filesystem fs/squashfs

[PATCH 2/4] fs/squashfs: add filesystem commands

2020-07-09 Thread Joao Marcos Costa
Add 'ls' (sqfsls) and 'load' (sqfsload) commands. Signed-off-by: Joao Marcos Costa --- cmd/Kconfig | 6 ++ cmd/Makefile | 1 + cmd/sqfs.c | 43 +++ 3 files changed, 50 insertions(+) create mode 100644 cmd/sqfs.c diff --git a/cmd/Kconfig b/cmd/Kc

[PATCH 1/4] fs/squashfs: new filesystem

2020-07-09 Thread Joao Marcos Costa
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa --- common/spl/Kconfig |9 + fs/Kconfig |2 + fs/Makefile |

[PATCH 0/3] phy: rockchip: Add PCIe phy driver

2020-07-09 Thread Jagan Teki
This series add PCIe PHY driver for rockchip platform. Tested on ROC-RK3399-PC and RockPi 4. Any inputs? Jagan. Jagan Teki (3): phy: Add Rockchip PCIe PHY driver pci: rockchip: Switch to generic-phy pci: rockchip: Drop legacy PHY driver drivers/pci/Kconfig | 1 + d

[PATCH 1/3] phy: Add Rockchip PCIe PHY driver

2020-07-09 Thread Jagan Teki
Add the Rockchip PCIe PHY driver as part of Generic PHY framework. Signed-off-by: Jagan Teki --- drivers/phy/rockchip/Kconfig | 7 + drivers/phy/rockchip/Makefile| 1 + drivers/phy/rockchip/phy-rockchip-pcie.c | 271 +++ 3 files changed, 279 insert

[PATCH 2/3] pci: rockchip: Switch to generic-phy

2020-07-09 Thread Jagan Teki
Now, we have a PCIe PHY driver as part of the Generic PHY framework. Let's use it instead of legacy PHY driver. Signed-off-by: Jagan Teki --- drivers/pci/Kconfig | 1 + drivers/pci/pcie_rockchip.c | 20 ++-- drivers/pci/pcie_rockchip.h | 5 + 3 files changed, 16 ins

[PATCH 3/3] pci: rockchip: Drop legacy PHY driver

2020-07-09 Thread Jagan Teki
Drop the legacy PHY driver and it's associated code since the PHY handling driver now part of Generic PHY framework. Signed-off-by: Jagan Teki --- drivers/pci/Makefile| 2 +- drivers/pci/pcie_rockchip.c | 75 +++- drivers/pci/pcie_rockchip.h | 146 -

Re: [PATCH v3 1/1] cmd: blkls: Add blkls command

2020-07-09 Thread Heinrich Schuchardt
On 7/8/20 5:02 AM, Tom Rini wrote: > On Mon, Mar 30, 2020 at 05:22:58PM +0200, Niel Fourie wrote: > >> Add a command to print a list of available block device drivers, >> and for each, the list of known block devices. >> >> Signed-off-by: Niel Fourie >> Cc: Simon Glass >> Cc: Stefan Roese >> Rev

Re: [PATCH 1/4] fs/squashfs: new filesystem

2020-07-09 Thread Rasmus Villemoes
On 09/07/2020 19.51, Joao Marcos Costa wrote: > Add support for SquashFS filesystem. Right now, it does not support > compression but support for zlib will be added in a follow-up commit. Cool, thanks for proposing this. While I'm not really in a position to review these, just one comment below.

[PATCH v2] efi_loader: display RO attribute with TEE-backed variables

2020-07-09 Thread Ilias Apalodimas
A previous commit adds support for displaying variables RO flag. Let's add it on the TEE backed variable storage as well. Signed-off-by: Ilias Apalodimas --- Changes since v1: - Better describe smm_variable_var_check_property struct members - Use struct var_check_property as input in set_proper

Re: [PATCH 1/4] fs/squashfs: new filesystem

2020-07-09 Thread Joao Marcos Costa
Hello! On Thu, 9 Jul 2020 21:50:03 +0200 Rasmus Villemoes wrote: > On 09/07/2020 19.51, Joao Marcos Costa wrote: > > Add support for SquashFS filesystem. Right now, it does not support > > compression but support for zlib will be added in a follow-up > > commit. > > Cool, thanks for proposing

Re: Please pull u-boot-x86

2020-07-09 Thread Tom Rini
On Thu, Jul 09, 2020 at 05:50:03PM +0800, Bin Meng wrote: > Hi Tom, > > This PR includes the following changes for U-Boot v2020.10: > > - Add two- and three-argument versions of CONFIG_IS_ENABLED in linux/kconfig.h > - Adds a new feature which supports copying modified parts of > the frame buffe

[PATCH v3 1/8] lib: rsa: export rsa_verify_with_pkey()

2020-07-09 Thread AKASHI Takahiro
This function will be used to implement public_key_verify_signature() in a later patch. rsa_verify() is not suitable here because calculation of message digest is not necessary. Signed-off-by: AKASHI Takahiro --- include/u-boot/rsa.h | 3 +++ lib/rsa/rsa-verify.c | 8 2 files changed, 7

[PATCH v3 0/8] efi_loader: secure boot: support intermediate certificates in signature

2020-07-09 Thread AKASHI Takahiro
Summary === under the current implementation of secure boot merged in v2020.07-rc1, UEFI subsystem verifies a signature using certificates that are coming from signature dtabase, i.e. "db." In real world, an image is signed by a signer, but its certificate can also be signed by another CA and,

[PATCH v3 2/8] lib: crypto: add public_key_verify_signature()

2020-07-09 Thread AKASHI Takahiro
This function will be called from x509_check_for_self_signed() and pkcs7_verify_one(), which will be imported from linux in a later patch. While it does exist in linux code and has a similar functionality of rsa_verify(), it calls further linux-specific interfaces inside. That could lead to more f

[PATCH v3 3/8] lib: crypto: enable x509_check_for_self_signed()

2020-07-09 Thread AKASHI Takahiro
When the file, x509_public_key.c, was imported from linux code in commit b4adf627d5b7 ("lib: crypto: add x509 parser"), x509_check_for_self_signed() was commented out for simplicity. Now it need be enabled in order to make pkcs7_verify_one(), which will be imported in a later patch, functional

[PATCH v3 5/8] lib: crypto: add pkcs7_digest()

2020-07-09 Thread AKASHI Takahiro
This function was nullified when the file, pkcs7_verify.c, was imported because it calls further linux-specific interfaces inside, hence that could lead to more files being imported from linux. We need this function in pkcs7_verify_one() and so simply re-implement it here instead of re-using the c

[PATCH v3 4/8] lib: crypto: import pkcs7_verify.c from linux

2020-07-09 Thread AKASHI Takahiro
The file, pkcs7_verify.c, will now be imported from linux code (crypto/asymmetric_keys/pkcs7_verify.c) and modified to fit into U-Boot environment. In particular, pkcs7_verify_one() function will be used in a later patch to rework signature verification logic aiming to support intermediate certifi

[PATCH v3 8/8] test/py: efi_secboot: add test for intermediate certificates

2020-07-09 Thread AKASHI Takahiro
In this test case, an image may have a signature with additional intermediate certificates. A chain of trust will be followed and all the certificates in the middle of chain must be verified before loading. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py| 156 ++

[PATCH v3 7/8] efi_loader: signature: rework for intermediate certificates support

2020-07-09 Thread AKASHI Takahiro
In this commit, efi_signature_verify(with_sigdb) will be re-implemented using pcks7_verify_one() in order to support certificates chain, where the signer's certificate will be signed by an intermediate CA (certificate authority) and the latter's certificate will also be signed by another CA and so

[PATCH v3 6/8] lib: crypto: export and enhance pkcs7_verify_one()

2020-07-09 Thread AKASHI Takahiro
The function, pkcs7_verify_one(), will be utilized to rework signature verification logic aiming to support intermediate certificates in "chain of trust." To do that, its function interface is expanded, adding an extra argument which is expected to return the last certificate in trusted chain. The

[PATCH] test/py: efi_secboot: fix Test Case 6c

2020-07-09 Thread AKASHI Takahiro
As the commit cb7116030aff ("efi_loader: time based authentication") fixed the timestamp handling, Test Case 6c has no longer worked as expected. So adjust the timestamp of "dbx" variable. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py| 4 +++- test/py/tests/te

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. > > >

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 > fdtdec_setup_

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 M

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] 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 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 seri

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 Glass

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 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 c

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 boa

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(-) Reviewed

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 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 +++ > common/b

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 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. > > In

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 > >>> arch

[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 1

[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

[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 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 e9aed8310c..

[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 err

[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 t

[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: Simo

[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 direct

[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 tools/binman/etype/_testin

[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 +- tools/binman/etype/powerpc_mpc85xx_bootpg_re

[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 t

[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 removing

[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 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 inser

[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 beh

[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 +-- to

[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 insertio

[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 sin

[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 b/arch/arm/mach-rockchip

[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 d

[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 Py

[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, 1

[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 e32de90843

[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 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 previ

[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 --g

[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 n

[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 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) arch/arm/dts/

[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 --- a/M

[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 o

[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 delet

[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 sin

[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 ru

[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 cod

[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 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 cod

[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 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 b/Mak

[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 mi

[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 +997

[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 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 arch/arm/mach-rockchip/fit_spl_

[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(+), 1

[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 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 a/arch/x86/dts/u

[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 chang

[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 a/c

[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 efficien

[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 devic

[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) configs/chromebook_coral_defconfig

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 > > > microseco

<    1   2   3   >