免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3976 | 回复: 7
打印 上一主题 下一主题

交叉编译内核linux2.6.9时make zImage错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-05 17:06 |只看该作者 |倒序浏览
之前操作为:

1..首先修改Makefile 里面ARCH=arm CROSS_COMPILE=arm-linux-(之前已经将arm-linux-所在的目录export PATH=/usr/local/arm/3.3.2/bin:写入etc/profile里面)

2..make mrproper

3..make menuconfig,直接使用load an alternate configuration file 将尤龙光盘资料里带的pxa27x_kernel2.6.9_rel_zzm.tar.gz里面的kernel_pxa270.cfg载入到里面,后出现错误一堆,其中部分如下:

/boot/config-2.4.20-8:1907: trying to assign nonexistent symbol X86_TSC_DISABLE
/boot/config-2.4.20-8:1914: trying to assign nonexistent symbol HZ
/boot/config-2.4.20-8:1917: trying to assign nonexistent symbol BINFMT_COFF
/boot/config-2.4.20-8:1921: trying to assign nonexistent symbol ACPI_HT_ONLY
/boot/config-2.4.20-8:1922: trying to assign nonexistent symbol ACPI_BUSMGR
/boot/config-2.4.20-8:1923: trying to assign nonexistent symbol ACPI_SYS
/boot/config-2.4.20-8:1924: trying to assign nonexistent symbol ACPI_CPU
/boot/config-2.4.20-8:1928: trying to assign nonexistent symbol ACPI_CMBATT
/boot/config-2.4.20-8:1930: trying to assign nonexistent symbol ACPI_RELAXED_AML
/boot/config-2.4.20-8:1942: trying to assign nonexistent symbol TUX
/boot/config-2.4.20-8:1943: trying to assign nonexistent symbol NETLINK
/boot/config-2.4.20-8:1961: trying to assign nonexistent symbol BLK_DEV_ISAPNP
/boot/config-2.4.20-8:1965: trying to assign nonexistent symbol IDEDMA_PCI_WIP
/boot/config-2.4.20-8:1966: trying to assign nonexistent symbol IDEDMA_NEW_DRIVE_LISTINGS

4..make clean

5..make zImage

drivers/usb/gadget/pxa2xx_udc.c:2372: error: initializer element is not constant
drivers/usb/gadget/pxa2xx_udc.c:2372: error: (near initialization for `memory.ep')
make[2]: *** [drivers/usb/gadget/pxa2xx_udc.o] Error 1
make[1]: *** [drivers/usb/gadget] Error 2

请问是何原因呢?谢谢!

论坛徽章:
0
2 [报告]
发表于 2007-09-05 18:11 |只看该作者
It like you miss definings of something.

Also, can you make sure using config-2.4.20-8 for this kernel (2.6.9) ?

论坛徽章:
0
3 [报告]
发表于 2007-09-06 10:12 |只看该作者
对,我机器的kernal是2.4.20-8(执行uname -r结果),源代码的版本是2.6.9,是在kernel.org下载地。


再次重复上述步骤后,又到第5步时出现以下错误:

drivers/block/floppy.c: In function `floppy_grab_irq_and_dma':
drivers/block/floppy.c:4422: error: `IRQ_FLOPPYDISK' undeclared (first use in this function)
drivers/block/floppy.c:4430: error: `DMA_FLOPPY' undeclared (first use in this function)
drivers/block/floppy.c: In function `floppy_release_irq_and_dma':
drivers/block/floppy.c:4509: error: `DMA_FLOPPY' undeclared (first use in this function)
drivers/block/floppy.c:4511: error: `IRQ_FLOPPYDISK' undeclared (first use in this function)
make[2]: *** [drivers/block/floppy.o] Error 1
make[1]: *** [drivers/block] Error 2
make: *** [drivers] Error 2


谢谢!!!!!!!!!!

论坛徽章:
0
4 [报告]
发表于 2007-09-06 21:09 |只看该作者
It like that your system is redhat 9.

You should use building target like menuconfig to configure kernel, not use 2.4.x configuration file.

IRQ_FLOPPYDISK undeclared? just grep it in kernel header directory!

论坛徽章:
0
5 [报告]
发表于 2007-09-07 10:25 |只看该作者
怎么做您说的这个:You should use building target like menuconfig to configure kernel, not use 2.4.x configuration file.?
思索半天未得其解,具体应该怎样做呢?谢谢!

论坛徽章:
0
6 [报告]
发表于 2007-09-07 18:19 |只看该作者
Just run "make menuconfig" before building kernel.

论坛徽章:
0
7 [报告]
发表于 2007-09-07 21:41 |只看该作者
对。出错时,就是这么做的呀!

论坛徽章:
0
8 [报告]
发表于 2007-09-07 23:22 |只看该作者
感觉会不会是这样的:你现在编译的是2.6的内核,但你用的配置是2.4的
虽然是向下兼容,但也有可能有很多地方是不同的啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP