[PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

Pali Rohár pali at kernel.org
Sat Aug 27 16:47:49 CEST 2022


On Saturday 27 August 2022 10:41:00 Tom Rini wrote:
> On Sat, Aug 27, 2022 at 04:32:37PM +0200, Pali Rohár wrote:
> > On Saturday 27 August 2022 10:30:05 Tom Rini wrote:
> > > On Sat, Aug 27, 2022 at 02:56:15PM +0200, Pali Rohár wrote:
> > > > On Saturday 27 August 2022 08:53:08 Tom Rini wrote:
> > > > > On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár wrote:
> > > > > 
> > > > > > Now when loadx and loady commands could be aborted / cancelled by CTRL+C,
> > > > > > allow to configure timeout for initial x/y-modem packet via env variable
> > > > > > $loadxy_timeout and by default use value from new compile-time config
> > > > > > option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means
> > > > > > infinite timeout. Default value is 90s which is the measured value used
> > > > > > before this change for loadx and loady commands.
> > > > > > 
> > > > > > Other load commands loadb and loads already waits infinitely. Same behavior
> > > > > > for loadx and loady commands can be achieved by setting $loadxy_timeout or
> > > > > > CONFIG_CMD_LOADXY_TIMEOUT to 0.
> > > > > > 
> > > > > > Signed-off-by: Pali Rohár <pali at kernel.org>
> > > > > > ---
> > > > > > Changes in v2:
> > > > > > * Allow to set timeout via env instead of permanent infinite timeout
> > > > > 
> > > > > This breaks platforms like "porter" where we have SPL_YMODEM support but
> > > > > do not have environment support.
> > > > 
> > > > By "breaks" do you mean compile error? Because if env is not set then
> > > > CONFIG_CMD_LOADXY_TIMEOUT is used. Just I'm not sure if env_get()
> > > > function returns NULL or what when there is no environment support.
> > > 
> > > Yes, it fails to link.
> > 
> > Then just #ifdef for env is needed. I will prepare v3. Which defconfig it is?
> 
> It's the "porter" defconfig, sorry I thought it would be clearer.
> There's probably others too in the case of SPL_YMODEM without SPL_ENV,
> it was just the first one I guessed.

Ou, I did not think that porter is defconfig. It sounds like code
porting. Anyway I have already sent v3 and now I tested it with
porter_defconfig that it compiles fine:
https://patchwork.ozlabs.org/project/uboot/patch/20220827143755.21412-1-pali@kernel.org/


More information about the U-Boot mailing list