UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 61733

PetaLinux 2013.10 - Zynq Design With Only Ethernet GEM1 Fails To Build

Description

My system includes only Zynq GEM1 for Ethernet. 

During the petalinux-build operation, my build fails with the following messages in <PLNX_PROJ>/build/build.log:

[ALL  ] board.c: In function 'board_eth_init':
[ALL  ] board.c:144:7: error: 'CONFIG_ZYNQ_GEM_PHY_ADDR1' undeclared (first use in this function)
[ALL  ] board.c:144:7: note: each undeclared identifier is reported only once for each function it appears in
[ERROR] make[3]: *** [/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux/u-boot/u-boot-plnx/board/xilinx/zynq/board.o] Error 1
[ALL  ] make[3]: Leaving directory `/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux/u-boot/src/u-boot-plnx/board/xilinx/zynq'
[ERROR] make[2]: *** [/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux/u-boot/u-boot-plnx/board/xilinx/zynq/libzynq.o] Error 2
[ALL  ] make[2]: Leaving directory `/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux/u-boot/src/u-boot-plnx'
[ERROR] make[1]: *** [/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux/u-boot/u-boot-plnx/u-boot] Error 2
[ALL  ] make[1]: Leaving directory `/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux/u-boot'
[ALL  ] make: *** [sub_build_component_/none/u-boot/single/u-boot-plnx] Error 2
[ALL  ] make: Leaving directory `/group/bcapps/tmcdowe/cases/1016958/01_repro/sw_plnx/zc706_gem1_bug/build/linux'

 

Solution

This is caused by incorrect logic in the <PLNX_PROJ>/build/linux/u-boot/petalinux-auto-board.h.template file.  

The logic in this file is not creating a constant called CONFIG_ZYNQ_GEM_PHY_ADDR1

This can be resolved by putting the following line in the <PLNX_PROJ>/subsystems/linux/configs/u-boot/petalinux-user-config.h.template file :

#define CONFIG_ZYNQ_GEM_PHY_ADDR1 <ADDR>

<ADDR> should be set to the MDIO PHY address for the PHY in your system.  

Most Xilinx evaluation platforms default to a value of 7. 

If this is the only Ethernet interface in your system you can also try a value of 0.

AR# 61733
Date Created 08/08/2014
Last Updated 08/28/2014
Status Active
Type General Article
Tools
  • PetaLinux
  • PetaLinux - 2013.10