9

I'm trying to install Linux on an FPGA board. The linux flavour is petalinux for Xilinx FPGA chips.

The current Xilinx SoC has a Cortex A9 processor and a programmable hardware logic i.e FPGA. I captured the boot message on the terminal:

.....................U-boot time.......................partition.......................................................

[Fri Dec 27 15:18:53.108 2013] Copying Linux from SD to RAM...
[Fri Dec 27 15:18:53.129 2013] Device: SDHCI
[Fri Dec 27 15:18:53.129 2013] Manufacturer ID: 2
[Fri Dec 27 15:18:53.129 2013] OEM: 544d
[Fri Dec 27 15:18:53.129 2013] Name: SA04G 
[Fri Dec 27 15:18:53.129 2013] Tran Speed: 25000000
[Fri Dec 27 15:18:53.129 2013] Rd Block Len: 512
[Fri Dec 27 15:18:53.129 2013] SD version 1.10
[Fri Dec 27 15:18:53.129 2013] High Capacity: Yes
[Fri Dec 27 15:18:53.129 2013] Capacity: 3951034368
[Fri Dec 27 15:18:53.129 2013] Bus Width: 1-bit
[Fri Dec 27 15:18:53.129 2013] reading zImage
[Fri Dec 27 15:18:59.367 2013] 
[Fri Dec 27 15:18:59.367 2013] 2304852 bytes read
[Fri Dec 27 15:18:59.381 2013] reading devicetree.dtb
[Fri Dec 27 15:18:59.475 2013] 
[Fri Dec 27 15:18:59.475 2013] 2709 bytes read
[Fri Dec 27 15:18:59.491 2013] reading ramdisk8M.image.gz
[Fri Dec 27 15:19:06.121 2013] 
[Fri Dec 27 15:19:06.121 2013] 2501584 bytes read
[Fri Dec 27 15:19:06.144 2013] Trying to set up GEM link...
[Fri Dec 27 15:19:06.144 2013] Resetting PHY...
[Fri Dec 27 15:19:06.144 2013] 
[Fri Dec 27 15:19:06.144 2013] PHY reset complete.
[Fri Dec 27 15:19:06.144 2013] Waiting for PHY to complete auto-negotiation...
[Fri Dec 27 15:19:18.176 2013] ***Error: Auto-negotiation stalled...
[Fri Dec 27 15:19:18.176 2013] ping failed; host 10.10.70.101 is not alive

I'm specifically interested in these lines:

[Fri Dec 27 15:19:06.144 2013] PHY reset complete.
[Fri Dec 27 15:19:06.144 2013] Waiting for PHY to complete auto-negotiation...
[Fri Dec 27 15:19:18.176 2013] ***Error: Auto-negotiation stalled...
[Fri Dec 27 15:19:18.176 2013] ping failed; host 10.10.70.101 is not alive

Question #1: I guess these lines are for TCP/IP?

As can be seen about 12 seconds are wasted in here. The thing is I need a fast boot system, and would not be needing TCP/IP at all in the end application.

The Linux that I installed so far was using a pre-built image provided by Xilinx. Now to get rid of the TCP/IP part (since I don't need it, and if I don't have it in OS, this 12 seconds could be saved - this is my understanding), I'm planning to build my own Linux kernel.

So I downloaded the source code of for PetaLinux, assuming I'll have to cross compile it from my host system.

Question #2: But I want to know how can I exclude the TCP/IP part from the OS source, so that when the OS boots it will never execute those time consuming TCP/IP routines?

Question #3: I'm also not sure if in pre-built image can we have any option to disable TCP/IP part?

My aim is to get rid of these lines during the boot process:

[Fri Dec 27 15:19:06.144 2013] PHY reset complete.
[Fri Dec 27 15:19:06.144 2013] Waiting for PHY to complete auto-negotiation...
[Fri Dec 27 15:19:18.176 2013] ***Error: Auto-negotiation stalled...
[Fri Dec 27 15:19:18.176 2013] ping failed; host 10.10.70.101 is not alive
  • step 1: find out what init system is being used. step 2: poke around its config files. – strugee Jan 6 '14 at 7:20
  • Do you have the kernel source ? How are you booting it as of now ? Is there a device-tree involved ? – Stark07 Jan 6 '14 at 11:27
  • That message is from U-Boot, Linux hasn't booted yet at that point. – Gilles Jan 6 '14 at 23:59
2

Question 2: I believe those prints are from uboot. If so, I believe you have "CONFIG_PHY_RESET" defined - could you please check your uboot configuration for for that? To disable this feature, you'd probably have to check your config, usually something similar to: ./include/configs/YourBoardConfigFile.h, is what uboot would use.

One of the other answers called out to use Kconfig - I checked my uboot's menuconfig and that option was not present.

If you take a look at the uboot source file: ./drivers/net/4xx_enet.c, search for "CONFIG_PHY_RESET", it would appear that code is being executed:

#if defined(CONFIG_PHY_RESET)
/*
 * Reset the phy, only if its the first time through
 * otherwise, just check the speeds & feeds
 */
if (hw_p->first_init == 0) {

Shortly afterwards, you can see the "Waiting for PHY auto negotiation to complete" text printed, so this should be right where your issue is (or close to it - there were a few other files that had similar initialization depending on architecture).

For some reason, the README file in the top level uboot source calls out CONFIG_PHY_RESET_DELAY, but not CONFIG_PHY_RESET, so you may have missed it there.

Question 3: If the CONFIG_PHY_RESET is the issue, then this would need to be set at compile time. You should be able to download Xilinx's uBoot source for your board.

I'm not sure why the reset is needed, so I didn't really answer question 1 of yours, but it seems like some PHY's have different requirements on being reset upon initialzation and even some need a certain amount of delay.

0

That system apparently wants to ping the IP address 10.10.70.101, probably because it's checking its own IP address or its gateway. This part means the system is configured with a network interface with that IP address or a similar one.

The pause happens because in the process of configuring IP, it loads the Ethernet network driver, which does PHY autonegotiation, it essentially tries to see what's connected to it. Since nothing is connected, it times out.

You should probably look for wherever this Linux distribution keeps the network interface settings. A cursory google search indicates this U-Boot has the variable ipaddr per http://www.denx.de/wiki/view/DULG/UBootEnvVariables

-1

Use Kconfig or its graphical analogues to disable Networking upon compilation of kernel. Examples: see this.

  • 2
    Please don't just post links, include as much relevant content directly on this site. If the site you're linking to goes away then your answer becomes worthless. – slm Jan 6 '14 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.