News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TE0720 Network access in u-boot

Started by Rafael, May 12, 2015, 09:32:32 AM

Previous topic - Next topic

Rafael

Hello,

I have used the new TE0720-02-refplnx.bsp to build petalinux.
When I interrupt boot process at u-boot I have no network access. I cannot ping, dhcp or tftp a server.
When I continue the boot process everything works fine in Linux.

I have set up the u-boot environment correctly. That means ethaddr is set to MAC (that one from petalinux). I have set up the ipaddr and serverip correctly.

Any idea?

Regards

Rafael.

Oleksandr Kiyenko

Hello Rafael,

Can you show us your u-boot configuration
subsystems/linux/configs/u-boot/platform-auto.h
and
subsystems/linux/configs/u-boot/platform-top.h

Best regards
Oleksand Kiyenko

Rafael

Hello Oleksand,

please see the attachment.

Oleksandr Kiyenko

Hello Rafael,

Please add to your platform-top.h
#define CONFIG_ZYNQ_GEM_PHY_ADDR0   0
and set
#define CONFIG_SERVERIP ???
#define CONFIG_IPADDR ???
depending on your network configuration

Best regards
Oleksandr Kiyenko

Rafael

Hello Oleksandr,

I have added the configuration and it still doesn't work.

What I'm wondering is that I have used saveenv in u-boot to set the ipaddr and serverip. The configuration was saved in the QSPI Flash.
When I boot know with SD boot it still reads the u-boot environment  values from QSPI Flash instead of the new configuration from SD card.

Maybe I have mest up my u-boot enironment variables. I have attached the printenv output.

Antti Lukats

it all depends where the env is defined to be, it does not matter if you boot from sd or spi, the env can in both cases be in SPI

there is no standard way of reading env vars from SD card asfaik, or at least it is not possible to say to uboot that env is "in SD card"...

Rafael

OK I have solved the issue.

The problem was that the u-boot environment variable ethaddr was set to 00:0a:35:00:3a:d2 and the real MAC initialised by the fsbl bevor u-boot is 00:04:A3:DB:FC:E4. They don't mach!

So I could see with wireshark that during ping from u-boot the packages are send out with the correct MAC 00:04:A3:DB:FC:E4 and the answers from my network were also present but the higher layers from u-boot have filtered them out because of the MAC configuration mismatch in u-boot (ethaddr =  00:0a:35:00:3a:d2).

whent I set ethaddr manual to  00:04:A3:DB:FC:E4 it works.

It has to be set manualy in the petalinux-config depending on the real MAC from current board. If I empty this entry in the configuration ethaddr is not set in u-boot and it will also fail to communicate in u-boot telling me that ethaddr is not set.

PS: in your Referenz Project the MAC address is set in petalinux-configuration, so this problem should have anyone. Maybe it would be better to remove the entry so users will be forced to enter a MAC in u-boot. I think a automatic solution is still not availible?

Antti Lukats

we use macskip env variable this is official flag to tell u-boot to NOT overwrite the MAC address.
Setting MAC to "" in petalinux is not that clean solution.

Rafael

yes i understand, it will not override is but network will not work in u-boot if the MACs are not equal in Hardware and u-boot.
When linux boots everythink is ok.

pgross

Thanks. Setting the right MAC address solved the problem for me too.

Antti Lukats

correct, unfortunately there is no clea way to "import" the MAC into uboot, unless written to environment.

Antti Lukats

Hi,

there is a clean solution to get correct mac address from hardware into u-boot, we will soon update the FSBL and u-boot platform_top.h
to reflect the needed changes. After that the board fixed factor MAC address is used all the way. There is still no need to patch any source code.