U-boot TFTP via SPL is broken in u-boot sources

Hi,
Earlier, I couldn’t get a SPL build from latest u-boot sources to TFTP uboot binary successfully, so I used the old SPL build from v2014.07 ( https://github.com/u-boot/u-boot/commit/524123a70761110c5cf3ccc5f52f6d4da071b959 ) which can TFTP latest ums configured uboot.

Next, on Windows and OSX, I’m facing an issue as the SPL device has two usb configuration descriptions, one with single interface and other with two interfaces. We need the configuration with two interfaces to TFTP uboot. Linux, by default sets the configuration with two interfaces hence uboot TFTP is working on lInux.

WIndows and OSX are setting configuration with single interface by default and the other configuration can’t be set through libusb as I’ve tried on Windows. So, TFTP of uboot isn’t working on either.

Next, solution can be to disable configuration with one interface for spl device from uboot sources. So, we get back to first issue to get latest SPL to transfer uboot.

Michael did a git bisect on u-boot to see where things went wrong with uboot TFTP. Here’s his log https://pastebin.com/hwXJUf3K

Here’s log of all uboot outputs https://pastebin.com/t2WNLQsQ

So, we get the first bad commit at https://github.com/u-boot/u-boot/commit/98d2d5e8c473232dc718763dbec284b7349dcc05

I need help in fixing this.

Thanks
Ravi

Hi,
Earlier, I couldn’t get a SPL build from latest u-boot sources to TFTP uboot binary successfully, so I used the old SPL build from v2014.07 ( https://github.com/u-boot/u-boot/commit/524123a70761110c5cf3ccc5f52f6d4da071b959 ) which can TFTP latest ums configured uboot.

Next, on Windows and OSX, I’m facing an issue as the SPL device has two usb configuration descriptions, one with single interface and other with two interfaces. We need the configuration with two interfaces to TFTP uboot. Linux, by default sets the configuration with two interfaces hence uboot TFTP is working on lInux.

WIndows and OSX are setting configuration with single interface by default and the other configuration can’t be set through libusb as I’ve tried on Windows. So, TFTP of uboot isn’t working on either.

Next, solution can be to disable configuration with one interface for spl device from uboot sources. So, we get back to first issue to get latest SPL to transfer uboot.

Michael did a git bisect on u-boot to see where things went wrong with uboot TFTP. Here’s his log https://pastebin.com/hwXJUf3K

Here’s log of all uboot outputs https://pastebin.com/t2WNLQsQ

So, we get the first bad commit at https://github.com/u-boot/u-boot/commit/98d2d5e8c473232dc718763dbec284b7349dcc05

Great job tracking this down. You should engage the uboot list for this.

This bisect found the source of a initial problem with the TFTP transfer not completing.

I found that if you comment out the two line added by this commit the transfer continues.
http://git.denx.de/?p=u-boot.git;a=blobdiff;f=drivers/usb/gadget/ether.c;h=cc6cc1f32ae299425bd610cc446281771a722fb5;hp=988cffb31c75905360e827607909798139778430;hb=71fc5f91d20ea6466fd6e45235257bec6eb5f413;hpb=43880ce5be8e6e5c26d88705be08161bde55deeb

Then I performed another bisect to determine when the bootp started failing.
https://pastebin.com/TRfbHfRQ

This was a tedious process because I had to apply a (sometime subtly different) patch during each bisect because the support was never mainlined during the last project.

Here is a idea of the patch that was used:
https://pastebin.com/w204LMsr

The first failing commit represents a pivotal change in U-Boot in the way that SPL/TPL was being built.
I have a feeling that the issue is somehow memory related but am still not sure.