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

2020-10-28 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 set_i

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

2020-10-28 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

[RESEND PATCH v6 16/17] test/py: efi_capsule: test for FIT image capsule

2020-10-28 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 T

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

2020-10-28 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 | 2 + tools/mk

[RESEND PATCH v6 17/17] test/py: efi_capsule: test for raw image capsule

2020-10-28 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 T

Re: [RESEND PATCH v6 00/17] efi_loader: add capsule update support

2020-10-28 Thread Tom Rini
On Thu, Oct 29, 2020 at 09:25:11AM +0900, AKASHI Takahiro wrote: > # > # This is a reminder. Nothing changed, but rebasing. > # Wasn't one of the outstanding requests to make the DFU related changes less intrusive and thus easier to review by someone (me) who is not the primary author of the DFU

Re: [RESEND PATCH v6 00/17] efi_loader: add capsule update support

2020-10-28 Thread AKASHI Takahiro
Tom, On Wed, Oct 28, 2020 at 08:30:49PM -0400, Tom Rini wrote: > On Thu, Oct 29, 2020 at 09:25:11AM +0900, AKASHI Takahiro wrote: > > > # > > # This is a reminder. Nothing changed, but rebasing. > > # > > Wasn't one of the outstanding requests to make the DFU related changes > less intrusive and

Re: Failed to make encrypt amlogic vim3

2020-10-28 Thread Jaehoon Chung
I found why failed. Discard this mail. Best Regards, Jaehoon Chung On 10/29/20 9:11 AM, Jaehoon Chung wrote: > Dear Neil > > I have a question about vim3 board. > When i have build with mainline u-boot, i have faced on below problem. > (I have referred to doc/board/amlogic/khadas-vim3.rst) > >

Re: [RESEND PATCH v6 00/17] efi_loader: add capsule update support

2020-10-28 Thread Tom Rini
On Thu, Oct 29, 2020 at 09:59:12AM +0900, AKASHI Takahiro wrote: > Tom, > > On Wed, Oct 28, 2020 at 08:30:49PM -0400, Tom Rini wrote: > > On Thu, Oct 29, 2020 at 09:25:11AM +0900, AKASHI Takahiro wrote: > > > > > # > > > # This is a reminder. Nothing changed, but rebasing. > > > # > > > > Wasn't

Re: [RESEND PATCH v6 00/17] efi_loader: add capsule update support

2020-10-28 Thread AKASHI Takahiro
Tom, On Wed, Oct 28, 2020 at 11:22:29PM -0400, Tom Rini wrote: > On Thu, Oct 29, 2020 at 09:59:12AM +0900, AKASHI Takahiro wrote: > > Tom, > > > > On Wed, Oct 28, 2020 at 08:30:49PM -0400, Tom Rini wrote: > > > On Thu, Oct 29, 2020 at 09:25:11AM +0900, AKASHI Takahiro wrote: > > > > > > > # > >

Re: [RESEND PATCH v6 00/17] efi_loader: add capsule update support

2020-10-28 Thread AKASHI Takahiro
On Wed, Oct 28, 2020 at 11:22:29PM -0400, Tom Rini wrote: > On Thu, Oct 29, 2020 at 09:59:12AM +0900, AKASHI Takahiro wrote: > > Tom, > > > > On Wed, Oct 28, 2020 at 08:30:49PM -0400, Tom Rini wrote: > > > On Thu, Oct 29, 2020 at 09:25:11AM +0900, AKASHI Takahiro wrote: > > > > > > > # > > > > #

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

2020-10-28 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 serv

[PATCH v7 02/17] dfu: modify an argument type for an address

2020-10-28 Thread AKASHI Takahiro
The range of an addressable pointer can go beyond 'integer'. So change the argument type to a void pointer. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- common/update.c | 3 ++- drivers/dfu/dfu_alt.c | 6 +++--- include/dfu.h | 4 ++-- 3 files changed, 7 ins

[PATCH v7 01/17] dfu: rename dfu_tftp_write() to dfu_write_by_name()

2020-10-28 Thread AKASHI Takahiro
This function is essentially independent from tftp, 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_WRITE_ALT, was introduced so that the file will be compiled with different op

[PATCH v7 05/17] efi_loader: add option to initialise EFI subsystem early

2020-10-28 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 featu

[PATCH v7 03/17] common: update: add a generic interface for FIT image

2020-10-28 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 | 15 ++ c

[PATCH v7 04/17] dfu: export dfu_list

2020-10-28 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 b/drivers/dfu/d

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

2020-10-28 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 +++ include/ef

[PATCH v7 06/17] efi_loader: add efi_create_indexed_name()

2020-10-28 Thread AKASHI Takahiro
This function will be used from several places in UEFI subsystem to generate some specific form of utf-16 variable name. For example, L"Capsule0001" Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 3 +++ lib/efi_loader/efi_setup.c | 30 ++ 2 files cha

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

2020-10-28 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 lo

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

2020-10-28 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 set_i

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

2020-10-28 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. Signed-off-by:

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

2020-10-28 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 v7 08/17] efi_loader: capsule: add capsule_on_disk support

2020-10-28 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. Please

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

2020-10-28 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 v7 14/17] cmd: add "efidebug capsule" command

2020-10-28 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 v7 16/17] test/py: efi_capsule: test for FIT image capsule

2020-10-28 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 T

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

2020-10-28 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 | 2 + tools/mk

[PATCH v7 17/17] test/py: efi_capsule: test for raw image capsule

2020-10-28 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 T

Re: [PATCH] imx: mx6cuboxi: Disable CONFIG_IMX_THERMAL

2020-10-28 Thread Baruch Siach
Hi Simon, Adding Walter to Cc. On Thu, Oct 29 2020, Simon Glass wrote: > This feature is incompatble with of-platdata since it uses the > U_BOOT_DEVICE() macro. With of-platdata the only devices permitted are > those created by dtoc. > > Drop this option for now, until the driver can be corrected

[PATCH 1/5] arm: dts: armada-cp110-slave: add missing cps_nand

2020-10-28 Thread Baruch Siach
From: Shmuel Hazan Align node properties to kernel dts node. Keep U-Boot specific nand-enable-arbiter, and num-cs for compatibility with the current driver. Reviewed-by: Stefan Roese Signed-off-by: Shmuel Hazan Signed-off-by: Baruch Siach --- arch/arm/dts/armada-cp110-slave.dtsi | 16 ++

[PATCH 2/5] arm: dts: armada-cp110-master: update nand-controller

2020-10-28 Thread Baruch Siach
Align node properties to kernel dts node. The change of compatible property does not affect any currently supported board. Keep U-Boot specific nand-enable-arbiter, and num-cs for compatibility with the current driver. Reviewed-by: Stefan Roese Signed-off-by: Baruch Siach --- arch/arm/dts/arm

[PATCH 5/5] mtd: nand: pxa3xx: enable NAND controller if the SoC needs it

2020-10-28 Thread Baruch Siach
From: Shmuel Hazan Based on Linux kernel commit fc256f5789cb ("mtd: nand: pxa3xx: enable NAND controller if the SoC needs it"). This commit adds support for the Armada 8040 nand controller. The kernel commit says this: Marvell recent SoCs like A7k/A8k do not boot with NAND flash control

[PATCH 3/5] mtd: pxa3xx_nand: port to use driver model

2020-10-28 Thread Baruch Siach
From: Shmuel Hazan Use the generic DT code to find the device compatible property for us. This makes the driver look more like other current drivers. It also make it easier to add support for other variants like Armada 8K in a future commit. Signed-off-by: Shmuel Hazan Signed-off-by: Baruch Sia

[PATCH 0/5] mtd: pxa3xx_nand: add support for Armada 8k

2020-10-28 Thread Baruch Siach
This series adds NAND flash support to Aramda 8k systems. Patches make the necessary changes to the pxa3xx_nand driver and DT files. v3: Address Stefan's comments on patch #3 Move hunks from patch #3 to #5 to fix bisectability v2: Rebase on current master. Fixes conflict with commit 661c98

[PATCH 4/5] mtd: pxa3xx_nand: remove dead code

2020-10-28 Thread Baruch Siach
The kfree() call is unreachable, and is not needed. Remove this call and the fail_disable_clk label. Reviewed-by: Stefan Roese Signed-off-by: Baruch Siach --- drivers/mtd/nand/raw/pxa3xx_nand.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/raw

Re: [PATCH 0/5] mtd: pxa3xx_nand: add support for Armada 8k

2020-10-28 Thread Stefan Roese
Hi Baruch, On 29.10.20 07:52, Baruch Siach wrote: This series adds NAND flash support to Aramda 8k systems. Patches make the necessary changes to the pxa3xx_nand driver and DT files. v3: Address Stefan's comments on patch #3 Move hunks from patch #3 to #5 to fix bisectability Thanks. I

<    1   2