`wget` cmd's data is garbled and isn't equal to the file on the server
Background:
- This occurs on commit "25edd247" (master as of 2023-10-14).
- U-boot is running on an RK3588 QuartzPro64, soon to be mainlined, similar to the evb-rk3588_defconfig.
- My desktop machine 192.168.1.101 runs a HTTP and TFTP server, serving a kernel iamge (sha1sum bbc059b2e3e34b7941ea378f82cb4ce7607a25e0) from the same directory.
The problem: If I load this image via u-boot's wget cmd, the sha1sum of the output doesn't match. OTOH, the TFTP output matches the expected sha1sum.
This manifested itself to me as kernel oops on most boots when I loaded the kernel over HTTP, perhaps expected for corrupted memory.
Please observe below the steps producing this:
=> setenv serverip 192.168.1.101
=> setenv bootfile Image
=> dhcp
ethernet@fe1b0000 Waiting for PHY auto negotiation to complete....... done
BOOTP broadcast 1
DHCP client bound to address 192.168.1.109 (715 ms)
Using ethernet@fe1b0000 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.109
Filename 'Image'.
Load address: 0xc00800
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##################################################
24.1 MiB/s
done
Bytes transferred = 41752584 (27d1808 hex)
=> echo $?
0
=> sha1sum 0xc00800 27d1808
sha1 for 00c00800 ... 033d2007 ==> bbc059b2e3e34b7941ea378f82cb4ce7607a25e0
=> wget 0xa000800 192.168.1.101:/Image
HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Packets received 28899, Transfer Successful
Bytes transferred = 41752584 (27d1808 hex)
=> echo $?
0
=> sha1sum 0xa000800 27d1808
sha1 for 0a000800 ... 0c7d2007 ==> 5163de4e24ec7edd982bac5bfe9d5083fcb61bf4
=> sha1sum 0xc00800 808
sha1 for 00c00800 ... 00c01007 ==> 64ac9532ed551972a5e2c3cb4aaf84449dcbea64
=> sha1sum 0xa000800 808
sha1 for 0a000800 ... 0a001007 ==> 64ac9532ed551972a5e2c3cb4aaf84449dcbea64
=> sha1sum 0xc00800 d808
sha1 for 00c00800 ... 00c0e007 ==> c8e583ee0df2f85c1dd4a54799eaa7f76fce85f2
=> sha1sum 0xa000800 d808
sha1 for 0a000800 ... 0a00e007 ==> c3b9be07aa08880bc7e90ea712f9a663b5ff5cf3
This shows that:
- at least up to the first 0x808 bytes, the two outputs match.
- beyond 0xd808 bytes, the two outputs differ.
Relevant enabled config: CONFIG_PROT_TCP_SACK=y
Shall I check whether this reproduces on the proposed "net/lwip: add lwip library for the network stack"[0]?