Skip to contentSkip to conversation

network not work with u-boot

U-Boot 张国富 2 participants 5 messages Dec 5, 2018 – Dec 6, 2018

lore
Share & tools
lore

张国富

author
#0 lore raw

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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 14985 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181205/508dfc5d/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 19172 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181205/508dfc5d/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 40420 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181205/508dfc5d/attachment-0002.png>

#1 lore raw

Dear 张国富,

Quoted 3 lines · In message <[email protected]> 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

Signature · 5 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
One difference between a man and a machine is that a machine is quiet
when well oiled.
#2 lore raw

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 张国富,

Quoted 3 lines · In message <[email protected]> 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

Signature · 12 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
One difference between a man and a machine is that a machine is quiet
when well oiled.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Catch.jpg
Type: image/jpeg
Size: 19932 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181206/9cbe8722/attachment.jpg>
#3 lore raw

Dear "cleancode at 163.com",

Quoted 2 lines · In message <[email protected]> you wrote:

Thank you so much, I managed to upload the kernel image by using a tftp server in my desktop.

Fine.

Quoted 1 line

I thought the tftp was a kind of ftp with a naming difference...

These are totally different protocols.

Quoted 2 lines

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

Signature · 4 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
COBOL is for morons.                                 -- E.W. Dijkstra
#4 lore raw

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 at 163.com
CC: u-boot
Subject: Re: [U-Boot] network not work with u-boot Dear "cleancode at 163.com",

Quoted 2 lines · In message <[email protected]> you wrote:

Thank you so much, I managed to upload the kernel image by using a tftp server in my desktop.

Fine.

Quoted 1 line

I thought the tftp was a kind of ftp with a naming difference...

These are totally different protocols.

Quoted 2 lines

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

Signature · 4 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
COBOL is for morons.                                 -- E.W. Dijkstra