[PATCH v2 11/12] arm: mvebu: Espressobin: Use new API for setting default env at runtime

Pali Rohár pali at kernel.org
Tue Nov 9 16:37:44 CET 2021


On Friday 05 November 2021 09:50:42 Pali Rohár wrote:
> On Thursday 04 November 2021 20:02:33 Simon Glass wrote:
> > On Wed, 3 Nov 2021 at 17:23, Marek Behún <kabel at kernel.org> wrote:
> > >
> > > From: Marek Behún <marek.behun at nic.cz>
> > >
> > > ESPRESSObin's board code uses an ad-hoc solution for ensuring that
> > > ethaddrs are not overwritten by `env default -a` command and that the
> > > `fdtfile` is set to correct value when `env default -a` is called.
> > >
> > > This ad-hoc solution is overwriting the default_environment[] buffer in
> > > board_late_init().
> > >
> > > Since now we have a specific API for overwriting default environment,
> > > convert this ad-hoc code to this new API.
> > >
> > > Signed-off-by: Marek Behún <marek.behun at nic.cz>
> > > ---
> > >  board/Marvell/mvebu_armada-37xx/board.c     | 135 +++++++++++++-------
> > >  configs/mvebu_espressobin-88f3720_defconfig |   1 +
> > >  include/configs/mvebu_armada-37xx.h         |  17 +--
> > >  3 files changed, 90 insertions(+), 63 deletions(-)
> > 
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> Hello Simon! This change needs to be properly tested to ensure that
> detection of eMMC is still correctly working and erase of MAC addresses
> does not happen again. I will try to find some time during next week to
> test this patch series on Espressobin board.

Hello! I have tested this change and it does NOT work.

Loading Environment from SPIFlash... SF: Detected w25q64dw with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

=> echo $fdtfile

=>

Seems that $fdtfile is not set to default value when using default
environment. Calling 'env default -a' fixes it:

=> env default -a
## Resetting to default environment
=> echo $fdtfile 
marvell/armada-3720-espressobin.dtb
=> 


More information about the U-Boot mailing list