首页>>论坛 >>技术社区 >>OpenHW社区论坛 >>嵌入式操作系统及ZYNQ >>资料共享
|
我要发帖  | 我要投票  | 我要回复  | 收藏
1 2 3 4 5 尾页

Petalinux讨论帖

版主: Jerry Fan  玄剑  jennyzheng  XUPteam 
Petalinux讨论帖
 

最近很多人都开始认识petalinux,并使用它,它的支持比uclinux要很多,资料也很全。建议大家使用。
另外也有很多人一直遇到了不少问题,我们一起在这里讨论吧。以后关于petalinux的问题,就在这个帖子中回复吧。

petalinux网站上提供的开发包,petalinux-v0.30-rc1.tar.gz,其中2.4内核的uclinux的移植比较成熟,而且和赵峰老师的书上的流程基本相似,建议使用。

如果要使用2.6内核的uclinux,记得选上uart的驱动,默认是不选择的,而且在很底层的地方。
Device Drivers --->
     Character devices --->
          Serial drivers --->
             [*] Xilinx uartlite serial port support
             [*] Support for console on Xilinx uartlite serial port
这个包对于2.6内核的移植不是很成熟,不是很建议使用。

 

Walkie

 

以下是楼主原贴

--------------------------------------

我想移植petalinux,但在 centos5中内核编译有错误,错误如下:

net/libnet.a(net.o): In function `ArpRequest':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c:219:undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetStartAgain':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x2f4): undefined reference to `eth_halt'
net/libnet.a(net.o): In function `NetSendPacket':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x3f8): undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetSendUDPPacket':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x6f4): undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetReceive':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xac8): undefined reference to `eth_send'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xb5c): undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetLoop':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xff0): undefined reference to `eth_halt'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xffc): undefined reference to `eth_init'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x1208): undefined reference to `eth_halt'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x1284): undefined reference to `eth_halt'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x12c0): undefined reference to `eth_rx'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x13ec): undefined reference to `eth_halt'
make[1]: *** [u-boot] Error 1
make[1]: Leaving directory `/petalinux-v0.30-rc1/software/petalinux-dist/u-boot'
make: *** [u-boot] Error 2
请高手帮忙解决一下,谢谢!

 

 

[最后修改于2009-04-26 00:30]
 
相关主题
回复 链接 收藏
 
RE:内核编译时发生错误
 
你用的是什么网卡?
 
回复 链接 收藏
 
回复:内核编译时发生错误
 

什么什么卡?我没有用网卡啊!可能是内核配置时有问题!在编译内核时我如果不选用build U-Boot这一选项,编译就没有问题!也不知道能不能不选。

 
回复 链接 收藏
 
RE:内核编译时发生错误
 
因为你没有加网卡所导致的。
include/configs/petalogix-microblaze-auto.h (最新版本的 .template 文件)
去掉关于网络的配置。
解答参考:
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2008/12/msg00067.html
 
回复 链接 收藏
 
回复:内核编译时发生错误
 

非常谢谢!我的移植成功了!谢谢!

 
回复 链接 收藏
 
回复:内核编译时发生错误
 

为什么我一关电源,什么东西都没了?是不是DDR_SDRAM的原因啊?

有什么方法让它掉电后东西不丢呢?谢谢!

 
回复 链接 收藏
 
回复:内核编译时发生错误
 

陈青 ,我也在移植petalinux,我也是edk工具安装在windows下,遇到了问题,你能把你移植的详细步骤写给我吗?

 
回复 链接 收藏
 
回复:内核编译时发生错误
 

我用的是centos5.3 ,edk9.1。我给几个参考资料你吧!PetaLinux_v0.30.pdfLab 2.doc

附件:请先登陆查看附件!
 
回复 链接 收藏
 
RE:内核编译时发生错误
 
陈青 我能和你用电话交流一下吗 我这边移植的任务很急 很需要你的帮助 我的电话是13917159671 希望你能帮助我
 
回复 链接 收藏
 
回复:内核编译时发生错误
 

你把问题发到这个网上,详细点,很多高手帮你的!

 
回复 链接 收藏
 
回复:内核编译时发生错误
 

请给我详细讲一下内核要配置那些参数,我看了你那份文档,编译内核还是有问题

 
回复 链接 收藏
 
RE:内核编译时发生错误
 
陈青,我也遇到你的问题,错误如下:
net/libnet.a(net.o): In function `ArpRequest':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c:219:undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetStartAgain':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x2f4): undefined reference to `eth_halt'
net/libnet.a(net.o): In function `NetSendPacket':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x3f8): undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetSendUDPPacket':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x6f4): undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetReceive':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xac8): undefined reference to `eth_send'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xb5c): undefined reference to `eth_send'
net/libnet.a(net.o): In function `NetLoop':
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xff0): undefined reference to `eth_halt'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0xffc): undefined reference to `eth_init'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x1208): undefined reference to `eth_halt'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x1284): undefined reference to `eth_halt'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x12c0): undefined reference to `eth_rx'
/petalinux-v0.30-rc1/software/petalinux-dist/u-boot/net/net.c(.text+0x13ec): undefined reference to `eth_halt'
make[1]: *** [u-boot] Error 1
make[1]: Leaving directory `/petalinux-v0.30-rc1/software/petalinux-dist/u-boot'
make: *** [u-boot] Error 2
请问你是怎么解决的?是通过include/configs/petalogix-microblaze-auto.h (最新版本的 .template 文件)
去掉关于网络的配置吗?
 
回复 链接 收藏
 
回复:内核编译时发生错误
 

我硬件搭建没有用网卡,所以我把关于网络的都没选,然后build u-boot这项也不选!就可以了

 
回复 链接 收藏
 
回复:内核编译时发生错误
 

我没把build u-boot这一项选上,移植也成功了。请问我用了u-boot和没用u-boot有什么区别?要怎样修改才能把u-boot也编译进去

 
回复 链接 收藏
 
RE:内核编译时发生错误
 
好像U-BOOT需要网络功能的支持。
如果你想用可以试试修改.template。

这方面我也刚刚起步。
大家一起互相学习学习。
 
回复 链接 收藏
 
回复:内核编译时发生错误
 
引用第 6 楼 陈青于2009-04-22 12:54:28发表:

为什么我一关电源,什么东西都没了?是不是DDR_SDRAM的原因啊?

有什么方法让它掉电后东西不丢呢?谢谢!

因为image文件下载到ram中,所以一关电源就没东西了。

如果你想要不丢失的话可以下载到FLASH中。

 
回复 链接 收藏
 
RE:内核编译时发生错误
 
不过这样的话,好像就要使用U-BOOT功能了。
 
回复 链接 收藏
 
RE:内核编译时发生错误
 
下载uClinux内核到开发板:
a)
在EDK Menu上选择Debug->Lanuch XMD,输入:
dow –data image.bin 0x22000000 其中0x22000000是你的内存地址
con 0x22000000
应该就能看到你的内核在终端启动了,输入用户名root,密码root,就可以进入文件系统。
b)
要下载到flash里,可以直接在Menu上选择Device Configuration->Program Flash Memory,选择image.elf,并勾上转化为srec格式,选上生成bootloader。在Applications里右击bootloader工程,勾上Mark to Initialize BRAMs,重新下载bitstream,应该就能看到uclinux在串口启动了。
 
回复 链接 收藏
 
RE:内核编译时发生错误
 
你可以试试这个,如果还有问题。我们可以再讨论讨论。
 
回复 链接 收藏
 
RE:Petalinux讨论帖
 
To qianfengraul
我没把build u-boot这一项选上,移植也成功了。请问我用了u-boot和没用u-boot有什么区别?要怎样修改才能把u-boot也编译进去
u-boot需要网络支持,你的系统中可能没有网卡。请检查一下。
用了u-boot,就可以从网络boot你的系统,或者从flash中boot你的系统。
但是其实一般来说,你如果是直接放入内存中,就是板卡DDR中来启动你的uclinux,那么这个就没有必要了。
 
Walkie
回复 链接 收藏
 
回复:Petalinux讨论帖
 

请问各位一个问题:我现在没选build u-boot这一项,2.6内核编译成功了,生成了image.bin、image.elf、image.srec、linux.bin、romfs.img这五个文件,然后回到工程中在DDR2地址0x90000000中下载了image.bin,在超级终端中可以看到Linux2.6的内核启动了,然后我输入用户名和密码就可以正常使用Linux系统了,现在我想要把PC机上的图片数据通过tftp协议传输到FPGA的Linux系统中去,不知应该怎么用?我在移植的Linux系统中只找到了ftpd这个命令。请大家教我!

 
回复 链接 收藏
 
RE:Petalinux讨论帖
 
既然有ftpd,
何必直接使用ftp协议呢?呵呵

petalinux中ftpd以及thttpd都是有的。而且登陆进去之后都是已经启动好了。
你设置一下你主机的ip,和fpga上的系统上的IP在一个域里面,
我记得fpga上系统默认是198.168.1.1还是198.168.1.10,具体的你可以使用ifconfig查看一下。
然后使用一些ftp软件,比如flashfxp等,直接输入fpga系统ip登陆就好了。
你要是一定要使用tftp,在编译你uclinux的时候,有一个user setting这个,里面有一个busy box,找到tftp,选上就好了。然后你在主机上建立一个tftp server(这样的软件也很多)。
如果只是为了传送数据,直接使用ftp吧。
这些Petalinux都帮你做好了。

 
Walkie
回复 链接 收藏
 
回复:Petalinux讨论帖
 

我在移植的linux中打了ifconfig命令后显示如下内容:

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

是不是说明我EDK工程中网卡没装阿?可是我添加了Ethernet MAC的ip核了

 
回复 链接 收藏
 
RE:Petalinux讨论帖
 
To qianfengraul
你网络没有起来。
你要是添加了ethernet的IP,那么你在配置内核的时候网卡的驱动有添加吗?
内核2.4和内核2.6网卡驱动所在的方式不太一样。
这个帖子的8楼提供了很好的文档,是xilinx的工程师ricky写的。你可以参考一下。其中有讲到哪里添加网卡的驱动
 
Walkie
回复 链接 收藏
 
回复:Petalinux讨论帖
 

按照rick工程师的文档中的要求,我在内核中配置了Customize Kernel Settings -> Device Drivers ->  Network device support -> Ethernet (10 or 100Mbit) ->  Deselect Xilinx 10/100OPB EMC support ->  Select Xilinx 10/100 OPB EMACLITE support,但在make all后出现了以下错误:

CC      drivers/net/xilinx_emaclite/adapter.o
drivers/net/xilinx_emaclite/adapter.c: In function `XEmacLite_GetConfig':
drivers/net/xilinx_emaclite/adapter.c:184: error: `CONFIG_XILINX_ETHERNETLITE_NUM_INSTANCES' undeclared (first use in this function)
drivers/net/xilinx_emaclite/adapter.c:184: error: (Each undeclared identifier is reported only once
drivers/net/xilinx_emaclite/adapter.c:184: error: for each function it appears in.)
drivers/net/xilinx_emaclite/adapter.c: In function `probe':
drivers/net/xilinx_emaclite/adapter.c:532: error: `CONFIG_XILINX_ETHERNETLITE_0_HIGHADDR' undeclared (first use in this function)
drivers/net/xilinx_emaclite/adapter.c:533: error: `CONFIG_XILINX_ETHERNETLITE_0_BASEADDR' undeclared (first use in this function)
drivers/net/xilinx_emaclite/adapter.c:532: warning: unused variable `remap_size'
make[4]: *** [drivers/net/xilinx_emaclite/adapter.o] 错误 1
make[3]: *** [drivers/net/xilinx_emaclite] 错误 2
make[2]: *** [drivers/net] 错误 2
make[1]: *** [drivers] 错误 2
make[1]: Leaving directory `/home/qianfengraul/task/test/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix'
make: *** [linux] 错误 1
[root@localhost petalinux-dist]#

请问怎样改进?

 

 
回复 链接 收藏
 
我要发帖  | 我要投票  | 我要回复  | 收藏
1 2 3 4 5 尾页