cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shmadoge
Visitor
Visitor
1,456 Views
Registered: ‎08-13-2018

Petalinux build on u-boot with "undefined reference to `ioremap_nocache'"

Jump to solution

I'm trying to build linux distro for custom board with zynq and after configuring sw project i'm getting this error:

drivers/net/built-in.o: In function `emaclite_ofdata_to_platdata':
| /home/e_rush/work/test_boot/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/u-boot-xlnx/v2018.01-xilinx-v2018.2+gitAUTOINC+21812b5fd3-r0/git/drivers/net/xilinx_emaclite.c:602: undefined reference to `ioremap_nocache'

Manually changing line in xilinx_emaclite.c from:

emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
0x10000);

to:

emaclite->regs = (struct emaclite_regs *)pdata->iobase;

lets me build but I don't think that is valid solution. 

Do you guys have any idea how to prevent this?

Vivado and Petalinux version is 2018.2.

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
shabbirk
Moderator
Moderator
1,378 Views
Registered: ‎12-04-2016

Hi

It looks to me that uboot emaclite driver has not been updated being a legacy IP. I would suggest to disable the uboot driver and keep linux emaclite driver enabled. You can disable uboot driver using this step: petalinux-config -c u-boot -> Device  drivers -> Network device support -> emaclite

View solution in original post

0 Kudos
7 Replies
shabbirk
Moderator
Moderator
1,410 Views
Registered: ‎12-04-2016

Hi

May I what changes have you done with ethernet in your design? 

0 Kudos
shmadoge
Visitor
Visitor
1,401 Views
Registered: ‎08-13-2018
I don't think there is a problem with design(here it is https://drive.google.com/open?id=15GvklzztV2NUtktcJscMqIqp4rdOLh-i ), since I checked source code of xilinx u-boot and there is no function ioremap_nocache (which is called from emaclight driver) in arm/asm/io, it was deleted couple of years ago.

https://github.com/Xilinx/u-boot-xlnx/blob/master/drivers/net/xilinx_emaclite.c
https://github.com/Xilinx/u-boot-xlnx/blob/master/arch/arm/include/asm/io.h

0 Kudos
shabbirk
Moderator
Moderator
1,394 Views
Registered: ‎12-04-2016

Hi

Is it possible to share your HDF?

 

Best Regards

Shabbir

0 Kudos
shmadoge
Visitor
Visitor
1,389 Views
Registered: ‎08-13-2018
0 Kudos
shabbirk
Moderator
Moderator
1,379 Views
Registered: ‎12-04-2016

Hi

It looks to me that uboot emaclite driver has not been updated being a legacy IP. I would suggest to disable the uboot driver and keep linux emaclite driver enabled. You can disable uboot driver using this step: petalinux-config -c u-boot -> Device  drivers -> Network device support -> emaclite

View solution in original post

0 Kudos
stephenm
Moderator
Moderator
1,360 Views
Registered: ‎09-12-2007

I seen this issue too. Seems like a bug. I patched driver same as you and has been working fine for me

0 Kudos
kelemixx
Contributor
Contributor
674 Views
Registered: ‎11-21-2014

+1 for same issue.

0 Kudos