[PATCH v4] test/py: net_boot: Add test cases for net boot

Tom Rini trini at konsulko.com
Fri May 3 22:07:20 CEST 2024


On Fri, May 03, 2024 at 05:39:46PM +0530, Love Kumar wrote:

> Add tests for booting image using tftpboot/pxe boot commands, tftpboot
> boot case loads the FIT image into DDR and boots using bootm command
> whereas pxe boot cases downloads the pxe configuration file from the
> TFTP server and interprets it to boot the images mentioned in the pxe
> configurations file.
> This test relies on boardenv_* containing configuration values including
> the parameter 'pattern'. tftpboot/pxe boot cases boots the Linux till the
> boot log pattern value is matched. For example, if the parameter
> 'pattern' is defined as 'login:', it will boot till login prompt.
> 
> Signed-off-by: Love Kumar <love.kumar at amd.com>
> ---
> Changes in v2:
>  - Expand commit message
> Changes in v3:
>  - Add the config option to skip the test
>  - Remove imi command to check FIT image config
>  - Configure static networking only if DHCP fails
> Changes in v4:
>  - Use configured timeout for tftpboot

Getting closer! Can we make this more robust and check for failure strings too?
For example:
U-Boot> tftpboot 200000 v6.6/image.fit.nocomp
Waiting for Ethernet connection... done.
Using smsc95xx_eth device
TFTP from server 192.168.1.10; our IP address is 192.168.1.100
Filename 'v6.6/image.fit.nocomp'.
Load address: 0x200000
Loading: ##################################################  82 MiB
         2.7 MiB/s
done
Bytes transferred = 85984256 (5200400 hex)
U-Boot> U-Boot> crc32 200000 $filesize
CRC32 for 00200000 ... 054003ff ==> 754c839a
U-Boot> U-Boot> bootm 200000
Wrong Image Type for bootm command
ERROR -91: can't get kernel image!
U-Boot>

This only fails when we hit timeout.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240503/e07b52a0/attachment.sig>


More information about the U-Boot mailing list