[U-Boot] [PATCH 04/12] riscv: nx25: include: Add header files to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add header files for RISC-V. Cache, ptregs, data type and other definitions are included. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu ---

[U-Boot] [PATCH 11/12] riscv: Modify generic codes to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Support common commands bdinfo and image format, also modify common generic flow for RISC-V. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- arch/Kconfig |

[U-Boot] [PATCH 06/12] riscv: board: Add nx25-ae250 to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add nx25-ae250 board to do platform initializations. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- board/AndesTech/nx25-ae250/Kconfig | 24 ++

[U-Boot] [PATCH 05/12] riscv: Add Kconfig to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add Kconfig and makefile for RISC-V Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Cc: Padmarao Begari --- arch/riscv/Kconfig |

Re: [U-Boot] [PATCH 11/11] sunxi: Add limit with the MMC environment

2017-12-22 Thread Maxime Ripard
On Thu, Dec 21, 2017 at 10:52:04PM +, André Przywara wrote: > Hi, > > On 21/12/17 12:40, Maxime Ripard wrote: > > The MMC environment offset is getting very close to the end of the U-Boot > > binary now. Since we want to make sure this will not overflow, add a size > > limit in the board for

[U-Boot] [PATCH 03/12] riscv: nx25: dts: Add AE250 dts to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen AE250 is the Soc using NX25 cpu core base on RISC-V arch. Details please see the doc/README.ae250. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu ---

[U-Boot] [PATCH 02/12] riscv: nx25: lib: Add relative lib funcs to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add makefile, interrupts.c and boot.c,... functions to support RISC-V arch. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu Cc: Padmarao Begari

[U-Boot] [PATCH 01/12] riscv: cpu: Add nx25 to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add Andes nx25 cpu core (called AndesStar V5) to support RISC-V arch Verifications: 1. startup and relocation ok. 2. boot from rom or ram both ok. 2. timer driver ok. 3. uart driver ok 4. mmc driver ok 5. spi driver ok. 6. 32/64 bit both ok. Detail

Re: [U-Boot] [PATCH 11/11] sunxi: Add limit with the MMC environment

2017-12-22 Thread Jagan Teki
On Fri, Dec 22, 2017 at 2:18 PM, Maxime Ripard wrote: > On Thu, Dec 21, 2017 at 10:52:04PM +, André Przywara wrote: >> Hi, >> >> On 21/12/17 12:40, Maxime Ripard wrote: >> > The MMC environment offset is getting very close to the end of the U-Boot >> > binary

[U-Boot] [PATCH 07/12] riscv: configs: Add nx25-ae250.h to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add nx25-ae250 board configuartion options for RISC-V Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- include/configs/nx25-ae250.h | 126

Re: [U-Boot] [PATCH 01/11] cmd: crc32: Disable by default on sunXi

2017-12-22 Thread Jagan Teki
On Thu, Dec 21, 2017 at 8:20 PM, Andre Przywara wrote: > Hi, > > On 21/12/17 12:40, Maxime Ripard wrote: >> The sunXi arm64 build has overflown, leading to the main U-boot binary >> overwriting the environment when flashing the new image, or even worse, >> overwriting

[U-Boot] [PATCH 12/12] riscv: doc: Add relative doc to describe RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add documents to describe NX25 and AE250. Also update other documents for RISC-V. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- README| 19

[U-Boot] [PATCH 09/12] risck: tools: Prelink u-boot

2017-12-22 Thread Andes
From: Rick Chen Add prelink-riscv to arrange .rela.dyn and .rela.got in compile time. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- Makefile|4 ++

[U-Boot] [PATCH 08/12] riscv: defconfig: Add nx25-ae250 defconfig to support RISC-V

2017-12-22 Thread Andes
From: Rick Chen Add nx25-ae250 default configuration for RISC-V Signed-off-by: Rick Chen Signed-off-by: Rick Chen Signed-off-by: Greentime Hu --- configs/nx25-ae250_defconfig | 36

[U-Boot] [PATCH 10/12] riscv: Support standalone

2017-12-22 Thread Andes
From: Rick Chen Run hello_world successfully. U-Boot 2018.01-rc2-00033-gb265b91-dirty (Dec 22 2017 - 13:54:21 +0800) DRAM: 1 GiB MMC: mmc@f0e0: 0 SF: Detected mx25u1635e with page size 256 Bytes, erase size 4 KiB, total 2 MiB In:serial@f030 Out:

Re: [U-Boot] [PATCH v5 2/2] common: Generic firmware loader for file system

2017-12-22 Thread Lothar Waßmann
Hi, On Fri, 22 Dec 2017 08:04:32 + Chee, Tien Fong wrote: > On Jum, 2017-12-22 at 08:44 +0100, Lothar Waßmann wrote: > > Hi, > > > > On Fri, 22 Dec 2017 01:43:38 + Chee, Tien Fong wrote: > > > > > > On Kha, 2017-12-21 at 16:08 +0100, Lothar Waßmann wrote: > > > > > > > > Hi, > > > > >

Re: [U-Boot] [PATCH v5 2/2] common: Generic firmware loader for file system

2017-12-22 Thread Chee, Tien Fong
On Jum, 2017-12-22 at 09:47 +0100, Lothar Waßmann wrote: > Hi, > > On Fri, 22 Dec 2017 08:04:32 + Chee, Tien Fong wrote: > > > > On Jum, 2017-12-22 at 08:44 +0100, Lothar Waßmann wrote: > > > > > > Hi, > > > > > > On Fri, 22 Dec 2017 01:43:38 + Chee, Tien Fong wrote: > > > > > > > >

Re: [U-Boot] [PATCH 12/13] ARM: dts: am574x-idk: Add initial support

2017-12-22 Thread Lokesh Vutla
On Tuesday 19 December 2017 01:34 AM, Tom Rini wrote: > On Mon, Dec 18, 2017 at 03:04:24PM +0530, Lokesh Vutla wrote: > >> Add initial dts support for am574x-idk >> >> Signed-off-by: Lokesh Vutla >> --- >> - DTS patch posted to kernel:

[U-Boot] [PATCH v3 2/2] Enable test case with A20-OLinuXino-Lime2

2017-12-22 Thread Stefan Mavrodiev
Driver testing is done with A20-OLinuXino-Lime2. Testing requirements are: - Exposing spi0 alternative pins in the dts file - Add alias node, enabling driver probing - Enable spi flash related options in the defconfig file The testing log is: U-Boot SPL 2018.01-rc2-00023-gfa13cb3-dirty

[U-Boot] [PATCH v3 1/2] arm: sunxi: Allwinner A10 SPI driver

2017-12-22 Thread Stefan Mavrodiev
Add spi driver for sun4i, sun5i and sun7i SoCs. The driver is adapted from mailine kernel. Signed-off-by: Stefan Mavrodiev --- Changes for v3: - Add required changes in dts and defeconfig file for testing Changes for v2: - Updated copyright including original owners

Re: [U-Boot] [PATCH 1/3] ddr: fsl: Do not allow for interactive mode in SPL

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 05:29:31AM +, York Sun wrote: > Why not? I used it before. In SPL, rather than full U-Boot? -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de

Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists

2017-12-22 Thread Daniel Schwierzeck
On 22.12.2017 04:13, Tom Rini wrote: > There are no CMDs to be run in SPL and no need for any of their lists. > > CC: Stefano Babic > Cc: Fabio Estevam > Cc: Jagan Teki > Cc: Maxime Ripard > Cc:

Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists

2017-12-22 Thread Daniel Schwierzeck
Hi Tom, On 22.12.2017 04:13, Tom Rini wrote: > There are no CMDs to be run in SPL and no need for any of their lists. > > CC: Stefano Babic > Cc: Fabio Estevam > Cc: Jagan Teki > Cc: Maxime Ripard >

Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 02:29:11PM +0100, Daniel Schwierzeck wrote: > Hi Tom, > > On 22.12.2017 04:13, Tom Rini wrote: > > There are no CMDs to be run in SPL and no need for any of their lists. [snip] > > diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds > > index

Re: [U-Boot] [PATCH 1/3] ddr: fsl: Do not allow for interactive mode in SPL

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 04:19:26PM +, York Sun wrote: > Either sending 'd' through UART, or save a variable ddr_interactive. OK, thanks, withdrawn! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de

Re: [U-Boot] [PATCH 11/12] riscv: Modify generic codes to support RISC-V

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 03:44:28PM +0800, Andes wrote: > From: Rick Chen > > Support common commands bdinfo and image format, > also modify common generic flow for RISC-V. > > Signed-off-by: Rick Chen > Signed-off-by: Rick Chen >

Re: [U-Boot] [PATCH 05/12] riscv: Add Kconfig to support RISC-V

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 03:44:22PM +0800, Andes wrote: > From: Rick Chen > > Add Kconfig and makefile for RISC-V > > Signed-off-by: Rick Chen > Signed-off-by: Rick Chen > Signed-off-by: Greentime Hu > Cc:

Re: [U-Boot] [PATCH 09/12] risck: tools: Prelink u-boot

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 03:44:26PM +0800, Andes wrote: > From: Rick Chen > > Add prelink-riscv to arrange .rela.dyn and .rela.got > in compile time. > > Signed-off-by: Rick Chen > Signed-off-by: Rick Chen > Signed-off-by:

Re: [U-Boot] [PATCH 1/3] ddr: fsl: Do not allow for interactive mode in SPL

2017-12-22 Thread York Sun
Either sending 'd' through UART, or save a variable ddr_interactive. York Sent from my iPhone > On Dec 22, 2017, at 08:06, Tom Rini wrote: > >> On Fri, Dec 22, 2017 at 04:02:49PM +, York Sun wrote: >> >> If SPL is used, the full driver is in SPL. It initializes DDR.

Re: [U-Boot] [PATCH 3/3] SPL: Do not include cmd lists

2017-12-22 Thread Tom Rini
On Thu, Dec 21, 2017 at 10:13:23PM -0500, Tom Rini wrote: > There are no CMDs to be run in SPL and no need for any of their lists. > > CC: Stefano Babic > Cc: Fabio Estevam > Cc: Jagan Teki > Cc: Maxime Ripard

[U-Boot] [PATCH] x86: Move commands from under arch/x86 to cmd/x86/

2017-12-22 Thread Tom Rini
We only need to compile and link these files when building for full U-Boot. Move them to under cmd/x86/ to make sure they aren't linked in and undiscarded due to u_boot_list_2_cmd_* being included). Cc: Bin Meng Signed-off-by: Tom Rini ---

Re: [U-Boot] [PATCH 1/3] ddr: fsl: Do not allow for interactive mode in SPL

2017-12-22 Thread York Sun
If SPL is used, the full driver is in SPL. It initializes DDR. It only makes sense to have this feature there, not after relocation. We only disable this feature is the SPL size becomes a problem. York Sent from my iPhone > On Dec 22, 2017, at 04:36, Tom Rini wrote: > >>

Re: [U-Boot] [PATCH 1/3] ddr: fsl: Do not allow for interactive mode in SPL

2017-12-22 Thread Tom Rini
On Fri, Dec 22, 2017 at 04:02:49PM +, York Sun wrote: > If SPL is used, the full driver is in SPL. It initializes DDR. It only > makes sense to have this feature there, not after relocation. We only > disable this feature is the SPL size becomes a problem. OK, but I don't understand how you

[U-Boot] [PATCH] arm: socfpga: Guard commands with CONFIG_SPL_BUILD tests

2017-12-22 Thread Tom Rini
In order for these commands to not be included in SPL we need to guard compilation with CONFIG_SPL_BUILD checks. Reorganize some sections of code slightly in order to avoid new warnings and mark the command functions as static as they should have been before. Cc: Marek Vasut

[U-Boot] [PATCH] power: Rearrange code to guard power command with CONFIG_SPL_BUILD guard

2017-12-22 Thread Tom Rini
In order to discard this code when unused in SPL we need to guard the command with a check for CONFIG_SPL_BUILD and we rearrange the code slightly to make this cleaner. Cc: Jaehoon Chung Signed-off-by: Tom Rini --- drivers/power/power_core.c | 61

[U-Boot] [PATCH v2 01/16] efi_selftest: colored test output

2017-12-22 Thread Heinrich Schuchardt
Add color coding to output: test sectionblue success green errors red todoyellow summary white others light gray Signed-off-by: Heinrich Schuchardt --- v2 no change --- include/efi_selftest.h | 27

[U-Boot] [PATCH v2 02/16] efi_loader: simplify efi_remove_all_protocols

2017-12-22 Thread Heinrich Schuchardt
Replace list_for_each_safe() and list_entry() by list_for_each_entry_safe(). Signed-off-by: Heinrich Schuchardt --- v2 no change --- lib/efi_loader/efi_boottime.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[U-Boot] [PATCH v2 10/16] efi_loader: fix signature of efi_disconnect_controller

2017-12-22 Thread Heinrich Schuchardt
Handles should be passed as efi_handle_t and not as void *. Signed-off-by: Heinrich Schuchardt --- v2 no change --- include/efi_api.h | 6 -- lib/efi_loader/efi_boottime.c | 7 --- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git

[U-Boot] [PATCH v2 07/16] efi_loader: implement OpenProtocolInformation

2017-12-22 Thread Heinrich Schuchardt
efi_open_protocol_information provides the agent and controller handles as well as the attributes and open count of an protocol on a handle. Signed-off-by: Heinrich Schuchardt --- v2 no change --- lib/efi_loader/efi_boottime.c | 41

[U-Boot] [PATCH v2 16/16] efi_loader: consistently use efi_handle_t for handles

2017-12-22 Thread Heinrich Schuchardt
We should consistently use the efi_handle_t typedef when referring to handles. Signed-off-by: Heinrich Schuchardt --- v2 no change --- cmd/bootefi.c | 10 - include/efi_api.h | 20 ++ include/efi_loader.h |

[U-Boot] [PATCH v2 14/16] efi_selftest: remove todo in device path test

2017-12-22 Thread Heinrich Schuchardt
The installation of UninstallProtocol is functional now. So we do not expect errors when calling it. Call UninstallProtocol with correct level of indirection for parameter handle. Signed-off-by: Heinrich Schuchardt --- v2 no change ---

[U-Boot] [PATCH v2 09/16] efi_loader: implement ConnectController

2017-12-22 Thread Heinrich Schuchardt
Implement the ConnectController boot service. Signed-off-by: Heinrich Schuchardt --- v2 no change --- include/efi_api.h | 22 ++ include/efi_loader.h | 2 + lib/efi_loader/efi_boottime.c | 178 -- 3

[U-Boot] [PATCH v2 13/16] efi_selftest: remove todo in manage protocols

2017-12-22 Thread Heinrich Schuchardt
The installation of UninstallProtocols is functional now. So we do not expect errors when calling it. Signed-off-by: Heinrich Schuchardt --- v2 no change --- lib/efi_selftest/efi_selftest_manageprotocols.c | 22 +++--- 1 file changed, 11

[U-Boot] [PATCH 1/3] efi_selftest: avoid superfluous messages for event services

2017-12-22 Thread Heinrich Schuchardt
In the event services test debug output is written even if no failure is detected. Remove this distracting output. Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest_events.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[U-Boot] [PATCH v2 04/16] efi_loader: list of open protocol infos

2017-12-22 Thread Heinrich Schuchardt
Add a list of open protocol infos to each protocol of a handle. Provide helper functions to access the list items. Signed-off-by: Heinrich Schuchardt --- v2 no change --- include/efi_loader.h | 15 ++- lib/efi_loader/efi_boottime.c | 35

[U-Boot] [PATCH v2 15/16] efi_selftest: test for (Dis)ConnectController

2017-12-22 Thread Heinrich Schuchardt
This unit test checks the following protocol services: ConnectController, DisconnectController, InstallProtocol, UninstallProtocol, OpenProtocol, CloseProtcol, OpenProtocolInformation Signed-off-by: Heinrich Schuchardt --- v2 define binding_interface as static struct

[U-Boot] [PATCH v2 05/16] efi_loader: open_info in OpenProtocol

2017-12-22 Thread Heinrich Schuchardt
efi_open_protocol has to keep track of opened protocols. OpenProtocol enters the agent and controller handle information into this list. Signed-off-by: Heinrich Schuchardt --- v2 no change --- lib/efi_loader/efi_boottime.c | 107

[U-Boot] [PATCH v2 06/16] efi_loader: open_info in CloseProtocol

2017-12-22 Thread Heinrich Schuchardt
efi_open_protocol and efi_close_protocol have to keep track of opened protocols. Check if the protocol was opened for the same agent and controller. Remove all open protocol information for this pair. Signed-off-by: Heinrich Schuchardt --- v2 no change ---

[U-Boot] [PATCH v2 08/16] efi_loader: debug output installed device path

2017-12-22 Thread Heinrich Schuchardt
When a device path protocol is installed write the device path to the console in debug mode. For printing the new macro EFI_PRINT is used, which can be reused for future diagnostic output. Remove unused EFI_PRINT_GUID macro Signed-off-by: Heinrich Schuchardt --- v2

[U-Boot] [PATCH 2/3] efi_selftest: avoid superfluous messages for task priority levels

2017-12-22 Thread Heinrich Schuchardt
In the task priority levels test debug output is written even if no failure is detected. Remove this distracting output. Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest_tpl.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[U-Boot] [PATCH 0/3] efi_selftest: beautify test output

2017-12-22 Thread Heinrich Schuchardt
Remove some superfluous messages if no error occurs. Do not cut off device paths in test output. Heinrich Schuchardt (3): efi_selftest: avoid superfluous messages for event services efi_selftest: avoid superfluous messages for task priority levels efi_selftest: do not cut off u16 strings

[U-Boot] [PATCH 3/3] efi_selftest: do not cut off u16 strings when printing

2017-12-22 Thread Heinrich Schuchardt
Device paths can be very long. Due to a limited output buffer the output for device paths is cut off. We can avoid this by directly calling the boottime service with the the device path string. Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest_console.c |

[U-Boot] [PATCH v2 03/16] efi_selftest: do not try to close device path protocol

2017-12-22 Thread Heinrich Schuchardt
CloseProtocol cannot be called without agent handle. There is no need to close the device path protocol if it has been opened without agent handle. Signed-off-by: Heinrich Schuchardt --- v2 no change --- lib/efi_selftest/efi_selftest_devicepath.c | 8 1

[U-Boot] [PATCH v2 00/16] efi_loader: implement driver management

2017-12-22 Thread Heinrich Schuchardt
This series implements the OpenProtocolInformation, ConnectController, and DisconnectController boot services. The EFI application creating a new device will call ConnectController to request the installation of all necessary drivers. Before deleting the device it will call DisconectController to

[U-Boot] [PATCH v2 12/16] efi_loader: disconnect controllers in UninstallProtocol

2017-12-22 Thread Heinrich Schuchardt
The UninstallProtocol boot service should first try to disconnect controllers that have been connected with EFI_OPEN_PROTOCOL_BY_DRIVER. If the protocol is still opened by an agent, it should be closed. Signed-off-by: Heinrich Schuchardt --- v2 no change ---

[U-Boot] [PATCH v2 11/16] efi_loader: implement DisconnectController

2017-12-22 Thread Heinrich Schuchardt
Unfortunately we need a forward declaration because both OpenProtocol and CloseProtocol have to call DisconnectController. And DisconnectController calls both OpenProtcol and CloseProtocol. Signed-off-by: Heinrich Schuchardt --- v2 Return EFI_NOT_FOUND in

[U-Boot] [PATCH 1/1] efi_loader: use correct format string for unsigned long

2017-12-22 Thread Heinrich Schuchardt
virt_size is of type unsigned long. So it should be printed with %ul. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_image_loader.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_image_loader.c

Re: [U-Boot] [PATCH v5 2/2] common: Generic firmware loader for file system

2017-12-22 Thread Chee, Tien Fong
On Jum, 2017-12-22 at 08:44 +0100, Lothar Waßmann wrote: > Hi, > > On Fri, 22 Dec 2017 01:43:38 + Chee, Tien Fong wrote: > > > > On Kha, 2017-12-21 at 16:08 +0100, Lothar Waßmann wrote: > > > > > > Hi, > > > > > > On Thu, 21 Dec 2017 12:48:53 + Chee, Tien Fong wrote: > > > > > > > >

Re: [U-Boot] Dragonboard410c and Dragonboard820c patchset

2017-12-22 Thread Jorge Ramirez
On 12/22/2017 03:29 AM, Peter Robinson wrote: On Thu, Dec 21, 2017 at 8:12 AM, Jorge Ramirez wrote: On 12/14/2017 02:26 PM, Jorge Ramirez-Ortiz wrote: The following version fixes some nasty compiler warnings present in the previous version. Sorry about it.

Re: [U-Boot] How to restore NVRAM on MTD partition from backup

2017-12-22 Thread Lukasz Majewski
On Wed, 20 Dec 2017 13:19:58 + (UTC) "A.W.C." wrote: > Hi, > > U-Boot 2009.03 on custom board. Nice :-) I assume that it is not possible to move to newer one? >How to restore NVRAM on MTD partition > from backup use U-boot memory commands, by uploading backup over

[U-Boot] [PATCH] ARM: sunxi: Remove left-over cd-inverted property from pcDuino3

2017-12-22 Thread Tuomas Tynkkynen
Commit 8620f384098b ("dm: sunxi: Linksprite_pcDuino3: Correct polarity of MMC card detect") claims that the Pcduino3 device tree had an incorrect polarity for the card detect pin and thus changed the polarity flag of the cd-gpios from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW. Actually the DT was

[U-Boot] [PATCH 00/11] Introduce variables whitelisting in environment

2017-12-22 Thread Quentin Schulz
This patch series is based on this[1] patch series from Maxime. This is an RFC. It's been only tested in a specific use case on a custom i.MX6 board. It's known to break compilation on a few boards. I have a use case where we want some variables from a first environment to be overriden by

[U-Boot] [PATCH 01/11] env: fix ret not being set and fails when no env could have been init

2017-12-22 Thread Quentin Schulz
This patch is fixing things that most likely will be done by Maxime in the v2 of his patch series for multiple environments support, one way or the other. Signed-off-by: Quentin Schulz --- env/env.c | 21 +++-- 1 file changed, 11 insertions(+),

[U-Boot] [PATCH 04/11] env: make nowhere an env medium like the others

2017-12-22 Thread Quentin Schulz
Since we now allow the loading of different environment media by priority, we can mimic the current fallback system with nowhere medium by adding a load function to the nowhere driver (and make it the medium with the lowest priority). Nowhere then becomes a valid environment medium. This also

[U-Boot] [PATCH 03/11] env: add support for whitelisting variables from secondary environments

2017-12-22 Thread Quentin Schulz
This patch makes it possible to have a first environment that will be the base environment, secondary environment that will be pre-loaded and have its variables passing through the whitelist "mask" to override variables in the base environment. The base environment will be the environment with

[U-Boot] [PATCH 02/11] lib: hashtable: support whitelisting env variables

2017-12-22 Thread Quentin Schulz
When passing the vars array to himport_r, variables in the array that are not in the loaded environment are removed from the current environment. Of course, this isn't suitable for whitelisting some variables. Let's introduce a whitelisting boolean that will not remove array variables that are

[U-Boot] [PATCH 08/11] env: add env_driver parameter to env_import_redund

2017-12-22 Thread Quentin Schulz
To prepare for an upcoming patch that uses the location of the driver used when doing an env_import_redund, add env_driver as an argument of env_import_redund so that it can be used within. Update all calls to this function and the prototype. Signed-off-by: Quentin Schulz

[U-Boot] [PATCH 10/11] env: introducing env_info struct for storing info per env

2017-12-22 Thread Quentin Schulz
To introduce the ability to use multiple environments at the same time, it is required to store a few information about each of the environment. Each environment has a different env_addr, "validity" (redund or main) and status of init (failed or succeeded). This structure is meant to be used in

[U-Boot] [PATCH 09/11] env: make env_locations a global variable

2017-12-22 Thread Quentin Schulz
Make env_locations a global variable so that it can be used in env drivers. Signed-off-by: Quentin Schulz --- env/env.c | 2 +- include/environment.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/env/env.c b/env/env.c index

[U-Boot] [PATCH 07/11] env: gd flags without ENV_READY is enough to discriminate in

2017-12-22 Thread Quentin Schulz
env_get_default To prepare the removal of env_valid in an upcoming patch, and since the ENV_READY flag in gd is enough to discriminate in env_get_char, let's update env_get_char to return the variable in the default environment when ENV_READY flag is not set and remove env_valid setting and

[U-Boot] [PATCH 06/11] env: add env_driver to env_driver functions' arguments

2017-12-22 Thread Quentin Schulz
Might be interesting to get some infos about the driver (e.g. its location) when inside one of its functions. Signed-off-by: Quentin Schulz --- env/eeprom.c | 6 +++--- env/env.c | 8 env/ext4.c| 4 ++-- env/fat.c

[U-Boot] [PATCH 05/11] cmd: saveenv: enable the saveenv command when ENV_IS_NOWHERE is defined

2017-12-22 Thread Quentin Schulz
but another env medium is enabled too Now that it is possible to have multiple environments at the same time, nowhere included, enable the saveenv command when nowhere medium is enabled but accompanied by another medium on which the saveenv command is possible. Signed-off-by: Quentin Schulz

[U-Boot] [PATCH 11/11] env: store information about each environment in gd

2017-12-22 Thread Quentin Schulz
To store the "validity" (redund or main), the env_addr (different when redund or main env is used) and the init status of the environment for each environment, an array of env_info structure is created in the global data pointer. Move all calls to env_addr, env_valid and env_has_init to the new