关于linux内核(3.0.8)编译移植中出现的问题总结

在编译linux内核3.0.8当中出现的问题   交叉编译器版本4.4.6

1.In file included from drivers/usb/host/ehci-hcd.c:124:
drivers/usb/host/ehci.h:747: warning: function declaration isn‘t a prototype
drivers/usb/host/ehci-hcd.c:1290:2: error: #error "missing bus glue for ehci-hcd"
make[3]: *** [drivers/usb/host/ehci-hcd.o] 错误 1
make[2]: *** [drivers/usb/host] 错误 2
make[1]: *** [drivers/usb] 错误 2
make: *** [drivers] 错误 2

解决方式: make menuconfig-> Device Drivers -> USB support -> EHCI HCD(usb 2.0 support)

2.arch/arm/plat-samsung/built-in.o: In function `s3c_pm_enter‘:
/opt/EmbedSky/TQ210/Kernel_3.0.8_TQ210_for_Linux_v2.4/arch/arm/plat-samsung/pm.c:316: undefined reference to `s3c_cpu_save‘
arch/arm/plat-samsung/built-in.o: In function `s3c_i2c0_set_platdata‘:
/opt/EmbedSky/TQ210/Kernel_3.0.8_TQ210_for_Linux_v2.4/arch/arm/plat-samsung/dev-i2c0.c:72: undefined reference to `s3c_i2c0_cfg_gpio‘
net/built-in.o: In function `tcp_is_local6‘:
/opt/EmbedSky/TQ210/Kernel_3.0.8_TQ210_for_Linux_v2.4/net/ipv4/tcp.c:3340: undefined reference to `rt6_lookup‘
net/built-in.o: In function `tcp_nuke_addr‘:
/opt/EmbedSky/TQ210/Kernel_3.0.8_TQ210_for_Linux_v2.4/net/ipv4/tcp.c:3363: undefined reference to `in6addr_any‘
make: *** [.tmp_vmlinux1] 错误 1
解决方式 :make menuconfig-> Networking support-> Networking option-> 选择 Network packet filtering framework (Netfilter) --->

3.security/commoncap.c: In function ‘cap_capable‘:
security/commoncap.c:90: error: ‘AID_NET_RAW‘ undeclared (first use in this function)
security/commoncap.c:90: error: (Each undeclared identifier is reported only once
security/commoncap.c:90: error: for each function it appears in.)
security/commoncap.c:92: error: ‘AID_NET_ADMIN‘ undeclared (first use in this function)
make[1]: *** [security/commoncap.o] 错误 1
make: *** [security] 错误 2

解决方式 :make menuconfig-> Networking support-> Networking option-> 选择 Only allow certain groups to create sockets 选项

4.出现以下编译错误:
arch/arm/mach-s5pv210/mach-tq210.c:567: error: ‘CONFIG_FB_S3C_NR_BUFFERS‘ undeclared here (not in a function)
arch/arm/mach-s5pv210/mach-tq210.c:567: error: ‘CONFIG_FB_S3C_NUM_OVLY_WIN‘ undeclared here (not in a function)
arch/arm/mach-s5pv210/mach-tq210.c:567: error: ‘CONFIG_FB_S3C_NUM_BUF_OVLY_WIN‘ undeclared here (not in a function)
arch/arm/mach-s5pv210/mach-tq210.c:952: error: variable ‘EmbedSky_LCD_fb_data‘ has initializer but incomplete type
arch/arm/mach-s5pv210/mach-tq210.c:953: error: unknown field ‘hw_ver‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:953: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:953: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:954: error: unknown field ‘clk_name‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:954: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:954: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:955: error: unknown field ‘nr_wins‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:955: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:955: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:956: error: unknown field ‘default_win‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:956: error: ‘CONFIG_FB_S3C_DEFAULT_WINDOW‘ undeclared here (not in a function)
arch/arm/mach-s5pv210/mach-tq210.c:956: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:956: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:957: error: unknown field ‘swap‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:957: error: ‘FB_SWAP_WORD‘ undeclared here (not in a function)
arch/arm/mach-s5pv210/mach-tq210.c:957: error: ‘FB_SWAP_HWORD‘ undeclared here (not in a function)
arch/arm/mach-s5pv210/mach-tq210.c:957: error: invalid operands to binary | (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:957: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:957: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:972: error: unknown field ‘cfg_gpio‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:972: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:972: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:973: error: unknown field ‘backlight_on‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:973: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:973: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:974: error: unknown field ‘backlight_onoff‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:974: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:974: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c:975: error: unknown field ‘reset_lcd‘ specified in initializer
arch/arm/mach-s5pv210/mach-tq210.c:975: warning: excess elements in struct initializer
arch/arm/mach-s5pv210/mach-tq210.c:975: warning: (near initialization for ‘EmbedSky_LCD_fb_data‘)
arch/arm/mach-s5pv210/mach-tq210.c: In function ‘tq210_map_io‘:
arch/arm/mach-s5pv210/mach-tq210.c:2099: error: invalid use of undefined type ‘struct s3c_platform_fb‘
arch/arm/mach-s5pv210/mach-tq210.c:2099: warning: initialization from incompatible pointer type
arch/arm/mach-s5pv210/mach-tq210.c:2112: error: invalid operands to binary * (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2112: error: invalid operands to binary + (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2112: error: invalid operands to binary * (have ‘int‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2112: warning: assignment makes integer from pointer without a cast
arch/arm/mach-s5pv210/mach-tq210.c:2119: error: invalid operands to binary * (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2119: error: invalid operands to binary + (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2119: error: invalid operands to binary * (have ‘int‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2119: error: invalid operands to binary * (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2119: error: invalid operands to binary + (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2119: error: invalid operands to binary * (have ‘struct s5p_media_device *‘ and ‘struct s5p_media_device *‘)
arch/arm/mach-s5pv210/mach-tq210.c:2119: warning: comparison between pointer and integer
arch/arm/mach-s5pv210/mach-tq210.c: In function ‘tq210_machine_init‘:
arch/arm/mach-s5pv210/mach-tq210.c:2253: error: implicit declaration of function ‘s3c_fb_set_platdata‘
make[1]: *** [arch/arm/mach-s5pv210/mach-tq210.o] 错误 1
make: *** [arch/arm/mach-s5pv210] 错误 2
解决方式:make menuconfig-> Device Drivers -> Graphics support-> 选中Support for frame buffer devices ->

5.出现以下编译错误:arm-linux-ld: error: Source object drivers/input/touchscreen/gx801.module has EABI version 5, but target drivers/input/touchscreen/built-in.o has EABI version 0
arm-linux-ld: failed to merge target specific data of file drivers/input/touchscreen/gx801.module
arm-linux-ld: error: Source object drivers/input/touchscreen/gt811.module has EABI version 5, but target drivers/input/touchscreen/built-in.o has EABI version 0
arm-linux-ld: failed to merge target specific data of file drivers/input/touchscreen/gt811.module
make[3]: *** [drivers/input/touchscreen/built-in.o] 错误 1
make[2]: *** [drivers/input/touchscreen] 错误 2
make[1]: *** [drivers/input] 错误 2
make: *** [drivers] 错误 2

解决方式:在网上查资料说是编译器的问题 换一个编译器就能搞定 但是在之前的编译过程中我并没有出现此问题 因此我将内核重新解压编译 就没有这个问题了

原文地址:https://www.cnblogs.com/lucky-3/p/10063558.html

时间: 2024-10-01 07:06:07

关于linux内核(3.0.8)编译移植中出现的问题总结的相关文章

《linux 内核完全剖析》编译linux 0.12 内核 Ubuntu 64bits 环境

我×...终于好了,大概3 4个小时吧...各种毛刺问题.终究还是闯过来了.... [email protected]:~/Downloads/linux-0.00-050613/linux-0.00$ make ld -s -x -M head.o  -o system > System.map dd bs=32 if=boot of=Image skip=1 16+0 records in 16+0 records out 512 bytes (512 B) copied, 0.000605

安装 Linux 内核 4.0

大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0.代号为‘Hurr durr I'm a sheep’的Linux内核4.0是目前为止最新的主干内核.它是稳定版3.19.4之后发布的内核.4月12日是所有的开源运动爱好者的大日 子,Linux Torvalds宣布了Linux内核4.0的发布,它现在就已经可用了.由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的 硬件支持以及很多有趣的功能都有新的版本,它原本被期望是一次重要版本.但是实

如何在Ubuntu/CentOS上安装Linux内核4.0

大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0.代号为‘Hurr durr I'm a sheep’的Linux内核4.0是目前为止最新的主干内核.它是稳定版3.19.4之后发布的内核.4月12日是所有的开源运动爱好者的大日 子,Linux Torvalds宣布了Linux内核4.0的发布,它现在就已经可用了.由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的 硬件支持以及很多有趣的功能都有新的版本,它原本被期望是一次重要版本.但是实

Linux内核3.0移植并基于Initramfs根文件系统启动

Linux内核移植与启动 Target borad:FL2440 Bootloader:U-boot-2010.09 交叉编译器:buildroot-2012.08 1.linux内核基础知识 首先,磨刀不误砍柴工.在动手进行linux内核移植之前,我们有必要对linux内核进行一定的了解. 1.1 Linux内核启动过程概述 一个嵌入式Linux系统从软件角度看可以分为四个部分:  引导加载程序(Bootloader),Linux内核,文件系统,应用程序. 其中Bootloader是系统启动或

《linux 内核全然剖析》编译linux 0.12 内核 Ubuntu 64bits 环境

我×.. . 最终好了,大概3 4个小时吧...各种毛刺问题.终究还是闯过来了.. .. [email protected]:~/Downloads/linux-0.00-050613/linux-0.00$ make ld -s -x -M head.o  -o system > System.map dd bs=32 if=boot of=Image skip=1 16+0 records in 16+0 records out 512 bytes (512 B) copied, 0.000

Linux内核编程-0:来自内核的 HelloWorld

Linux内核编程一直是我很想掌握的一个技能.如果问我为什么,我也说不上来. 也许是希望有一天自己的ID也出现在内核开发组的邮件列表里?或是内核发行文件的CREDITS文件上? 也许是吧.其实更多的,可能是对于底层的崇拜,以及对于内核的求索精神. 想到操作系统的繁杂,想到软件系统之间的衔接,内心觉得精妙的同时,更是深深的迷恋. 所以从这篇文章开始,我要真正的走进Linux内核里了,让代码指引我,去奇妙的世界一探究竟. 在这篇文章中,一起来对内核说Hello World. 本次的编程环境: Cen

2019-举例跟踪分析Linux内核5.0系统调用处理过程

简介 学号520 实验环境基于ubuntu18.04 选择系统调用号20 getpid()分析 实验目的 学会使用gdb工具跟踪linux内核函数调用 学会使用C代码和嵌入式汇编使用系统中断 分析system_call中断处理过程 实验步骤 1.下载linux5.0.1内核并编译 wget https://mirrors.aliyun.com/linux-kernel/v5.x/linux-5.0.1.tar.xz xz -d linux-5.0.1.tar.xz tar -xvf linux-

分析Linux内核5.0系统调用处理过程

学号: 363 本实验来源 https://github.com/mengning/linuxkernel/ 一.实验要求 1.编译内核5.02.qemu -kernel linux-5.0.1/arch/x86/boot/bzImage -initrd rootfs.img3.选择系统调用号后两位与您的学号后两位相同的系统调用进行跟踪分析https://github.com/mengning/menu4.给出相关关键源代码及实验截图,撰写一篇博客(署真实姓名或学号最后3位编号),并在博客文章中

Linux内核的配置与编译(X86平台)

说明:只供学习交流 目的: (1):配置.编译X86平台下的Linux-2.6.29内核 (2):在vmware下安装编译好的内核并启动 工具: Gcc编译器, Linux-2.6.29内核 步骤: (一):清除临时文件,中间文件和配置文件等(刚从网上下载下来的文件这步可省略). make clean 删除大多数的由编译生成的文件.但会保留内核的配置文件.config. make mrproper 删除所有的编译生成的文件,还有内核配置文件,再加上各种备份文件. make distclean m