[U-Boot] network not work with u-boot

Hi all, Recently I came across a problem, and I tried many things but it still does not work. I have a board with a u-boot ready and the kernel image yet to upload. Unfortunately the board could not get the kernel image by ftp. The kernel image was built ready and the ftp server was running in my WIN 10 desktop, whose IP Addr is 172.16.0.10/255.255.0.0, accordingly, the board was configured as IP Addr to be 172.16.0.100/255.255.0.0. This was what I get: No progress could be made and stuck there.
So I used the Wireshark to record what was going on from my desktop, and it showed me that: Destination unreachable (Port unreachable) I thought it was the uImage file missing, but it turned out that it was definitely there: I downloaded the uImage file by chrome browser on ftp://172.16.0.10/ At last, I checked the u-boot configurations and I found a strange thing, as shown below: The configuration item ipaddr1 could be introduced by misspelling, I guess this also happens sometime for everyone here. But strange enough that it could not be deleted, I tried "setenv ipaddr1", "setenv ipaddr1 72.16.0.100", and the item ipaddr1 was still there.
What is the root cause for the failure of ftp operation? does it have something to do with the strange configuration item ipaddr1? Any information or suggestion is highly appreciated.
--
Best wishes.
Zhangguofu (Gary)

Dear 张国富,
In message 3ddf0dcd.d340.1677de6d85a.Coremail.cleancode@163.com you wrote:
Recently I came across a problem, and I tried many things but it still does not work. I have a board with a u-boot ready and the kernel image yet to upload. Unfortunately the board could not get the kernel image by ftp.
If what you write is correct, then this is expected behaviour.
U-Boot does not have support for TCP/IP, and so it cannot implement the FTP protocol. All we have is TFTP = TRIVIAL FTP.
You your FTP server will not help - you need a TFTP server instead.
This also explains the port mismatch you see in wireshark.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Thank you so much, I managed to upload the kernel image by using a tftp server in my desktop. I thought the tftp was a kind of ftp with a naming difference...
As for the configuration item ipaddr1, I still cannot delete it, I am not happy about that. Do you or anyone else know how to delete this kind of ill-spelled items? If not, I can accept it as it has no side-effect to the system, the uboot brings up the linux kernel every time. However, if there is a way to delete, it would make me happier.
-- Best wishes.
Zhangguofu (Gary)
From: Wolfgang Denk Date: 2018-12-05 21:37 To: 张国富 CC: u-boot Subject: Re: [U-Boot] network not work with u-boot Dear 张国富,
In message 3ddf0dcd.d340.1677de6d85a.Coremail.cleancode@163.com you wrote:
Recently I came across a problem, and I tried many things but it still does not work. I have a board with a u-boot ready and the kernel image yet to upload. Unfortunately the board could not get the kernel image by ftp.
If what you write is correct, then this is expected behaviour.
U-Boot does not have support for TCP/IP, and so it cannot implement the FTP protocol. All we have is TFTP = TRIVIAL FTP.
You your FTP server will not help - you need a TFTP server instead.
This also explains the port mismatch you see in wireshark.
Best regards,
Wolfgang Denk

Dear "cleancode@163.com",
In message 2018120610134234682514@163.com you wrote:
Thank you so much, I managed to upload the kernel image by using a tftp server in my desktop.
Fine.
I thought the tftp was a kind of ftp with a naming difference...
These are totally different protocols.
As for the configuration item ipaddr1, I still cannot delete it, I am not happy about that. Do you or anyone else know how to delete this kind of ill-spelled items?
You can run "md" on the memory region which holds the environment, to find out which special characters sneaked in. They you can try to delete the variable by carefully typing the same characters.
Alternatively, you can reset your environment to default and re-add all wanted settings.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Highly appraciated for your help, I'll try them.
Best wishes.
Zhangguofu (Gary)
From: Wolfgang Denk Date: 2018-12-06 16:13 To: cleancode@163.com CC: u-boot Subject: Re: [U-Boot] network not work with u-boot Dear "cleancode@163.com",
In message 2018120610134234682514@163.com you wrote:
Thank you so much, I managed to upload the kernel image by using a tftp server in my desktop.
Fine.
I thought the tftp was a kind of ftp with a naming difference...
These are totally different protocols.
As for the configuration item ipaddr1, I still cannot delete it, I am not happy about that. Do you or anyone else know how to delete this kind of ill-spelled items?
You can run "md" on the memory region which holds the environment, to find out which special characters sneaked in. They you can try to delete the variable by carefully typing the same characters.
Alternatively, you can reset your environment to default and re-add all wanted settings.
Best regards,
Wolfgang Denk
participants (3)
-
cleancode@163.com
-
Wolfgang Denk
-
张国富