- 浏览: 1445057 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (691)
- linux (207)
- shell (33)
- java (42)
- 其他 (22)
- javascript (33)
- cloud (16)
- python (33)
- c (48)
- sql (12)
- 工具 (6)
- 缓存 (16)
- ubuntu (7)
- perl (3)
- lua (2)
- 超级有用 (2)
- 服务器 (2)
- mac (22)
- nginx (34)
- php (2)
- 内核 (2)
- gdb (13)
- ICTCLAS (2)
- mac android (0)
- unix (1)
- android (1)
- vim (1)
- epoll (1)
- ios (21)
- mysql (3)
- systemtap (1)
- 算法 (2)
- 汇编 (2)
- arm (3)
- 我的数据结构 (8)
- websocket (12)
- hadoop (5)
- thrift (2)
- hbase (1)
- graphviz (1)
- redis (1)
- raspberry (2)
- qemu (31)
- opencv (4)
- socket (1)
- opengl (1)
- ibeacons (1)
- emacs (6)
- openstack (24)
- docker (1)
- webrtc (11)
- angularjs (2)
- neutron (23)
- jslinux (18)
- 网络 (13)
- tap (9)
- tensorflow (8)
- nlu (4)
- asm.js (5)
- sip (3)
- xl2tp (5)
- conda (1)
- emscripten (6)
- ffmpeg (10)
- srt (1)
- wasm (5)
- bert (3)
- kaldi (4)
- 知识图谱 (1)
最新评论
-
wahahachuang8:
我喜欢代码简洁易读,服务稳定的推送服务,前段时间研究了一下go ...
websocket的helloworld -
q114687576:
http://www.blue-zero.com/WebSoc ...
websocket的helloworld -
zhaoyanzimm:
感谢您的分享,给我提供了很大的帮助,在使用过程中发现了一个问题 ...
nginx的helloworld模块的helloworld -
haoningabc:
leebyte 写道太NB了,期待早日用上Killinux!么 ...
qemu+emacs+gdb调试内核 -
leebyte:
太NB了,期待早日用上Killinux!
qemu+emacs+gdb调试内核
真是每个linux的小版本编译的时候都有不同的问题啊,
最近在看《独辟蹊径品内核》《linux2.6内核标准教程》
用到linux2.6.24.编译的问题汇总到这里
环境
从
https://www.kernel.org/pub/linux/kernel/v2.6/
下的2.6.24
解压后
设置menuconfig 选debug
开始编译:
遇到问题:
错误1
参考
http://blog.sina.com.cn/s/blog_8f9cdbbd01014lxj.html
-m elf_x86_64 换成 -m64
-----------------------------------------------
错误2:
参考
http://stackoverflow.com/questions/23194840/linux-2-6-24-kernel-compilation-error-size-expression-for-copy-user-generic-c-d
-----------------------------
错误3:
kernel/mutex.c
这个好使,其他的都是扯淡,什么该config参数,什么加__used都不行,需要把static去掉,加锁和解锁的
https://github.com/socketpair/jslinux_reversed/blob/master/contrib/patches/2.6.20_common_fixes.patch
__mutex_lock_slowpath的两个方法的static去掉
__mutex_unlock_slowpath的两个方法的static去掉
-----------------------------------------
错误4:
解决:
最近在看《独辟蹊径品内核》《linux2.6内核标准教程》
用到linux2.6.24.编译的问题汇总到这里
环境
[root@centos140_11 boot]# gcc --version gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@centos140_11 boot]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) [root@centos140_11 boot]#
从
https://www.kernel.org/pub/linux/kernel/v2.6/
下的2.6.24
解压后
设置menuconfig 选debug
make O=/home/haoning/rtclinux/websocket/web/jslinux/tmp/linux2.6.24.build/kernel/ menuconfig
开始编译:
time make O=/home/haoning/rtclinux/websocket/web/jslinux/tmp/linux2.6.24.build/kernel/ -j10
遇到问题:
错误1
参考
http://blog.sina.com.cn/s/blog_8f9cdbbd01014lxj.html
arch/x86/vdso/Makefile 19 quiet_cmd_syscall = SYSCALL $@ 20 cmd_syscall = $(CC) -m elf_x86_64 -nostdlib $(SYSCFLAGS_$(@F)) \ 21 -Wl,-T,$(filter-out FORCE,$^) -o $@
-m elf_x86_64 换成 -m64
-----------------------------------------------
错误2:
/tmp/cct0Bawg.s: Assembler messages: /tmp/cct0Bawg.s: Error: .size expression for copy_user_generic_c does not evaluate to a constant make[2]: *** [arch/x86/lib/copy_user_64.o] Error 1 make[1]: *** [arch/x86/lib] Error 2 make: *** [sub-make] Error 2
参考
http://stackoverflow.com/questions/23194840/linux-2-6-24-kernel-compilation-error-size-expression-for-copy-user-generic-c-d
arch/x86/lib/copy_user_64.S 347 END(copy_user_generic_c) 348 349 .section __ex_table,"a" 350 .quad 1b,3b 351 .quad 2b,5b 换成 347 END(copy_user_generic_c) 348 349 .section __ex_table,"a" 350 .quad 1b,3b 351 .quad 2b,5b
-----------------------------
错误3:
kernel/built-in.o: In function `mutex_lock': /home/haoning/rtclinux/websocket/web/jslinux/tmp/linux-2.6.24/kernel/mutex.c:92: undefined reference to `__mutex_lock_slowpath' kernel/built-in.o: In function `mutex_unlock': /home/haoning/rtclinux/websocket/web/jslinux/tmp/linux-2.6.24/kernel/mutex.c:118: undefined reference to `__mutex_unlock_slowpath' make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [sub-make] Error 2
kernel/mutex.c
这个好使,其他的都是扯淡,什么该config参数,什么加__used都不行,需要把static去掉,加锁和解锁的
https://github.com/socketpair/jslinux_reversed/blob/master/contrib/patches/2.6.20_common_fixes.patch
__mutex_lock_slowpath的两个方法的static去掉
__mutex_unlock_slowpath的两个方法的static去掉
-----------------------------------------
错误4:
/scripts/unifdef.c:70:0: /usr/include/stdio.h:678:20: note: previous declaration of ‘getline’ was here
解决:
scripts/unifdef.c 207 static int findsym(const char *); 208 static void flushline(bool); 209 //static Linetype getline(void); 210 static Linetype mygetline(void); 211 static Linetype ifeval(const char **); 212 static void ignoreoff(void); 511 Linetype lineval; 512 513 for (;;) { 514 linenum++; 515 //lineval = getline(); 516 lineval = mygetline(); 517 trans_table[ifstate[depth]][lineval](); 518 debug("process %s -> %s depth %d", 519 linetype_name[lineval], 520 ifstate_name[ifstate[depth]], depth); 521 } 522 } 523 524 /* 525 * Parse a line and determine its type. We keep the preprocessor line 526 * parser state between calls in the global variable linestate, with 527 * help from skipcomment(). 528 */ 529 static Linetype 530 //getline(void) 531 mygetline(void) 532 { 533 const char *cp; 534 int cursym; 535 int kwlen;
发表评论
-
xl2tp 备份
2019-09-24 16:25 5762019年9月24日更新: 注意,需要开启firewall ... -
sdl笔记
2019-01-31 17:19 686sdl教程教程 https://github.com/Twin ... -
tinyemu
2019-01-24 17:59 1400参考https://bellard.org/jslinux/t ... -
aws搭建xl2tp给iphone使用
2018-12-26 21:37 18122019年12月26日 可以参考原来的配置 https:// ... -
consul的基本使用
2017-06-27 11:13 1353### 安装 [centos7上consul的安装](ht ... -
lvs的helloworld
2017-06-13 20:36 562###################lvs######### ... -
系统调用的helloworld
2017-05-04 16:14 561《2.6内核标准教程》 p293 #include < ... -
bitcoin和cgminer的安装
2017-04-05 22:45 1922参考 http://blog.csdn.net/rion_ch ... -
ceph安装和常用命令
2017-03-21 21:55 914/etc/hosts ssh-keygen ssh-copy- ... -
mobile terminal 笔记
2016-12-02 15:35 547找出旧的iphone4 越狱之后可以变个小操作系统 mobi ... -
socket基础和select(python)
2016-06-14 17:21 1763上接 c语言的socket基础ht ... -
socket基础(c语言)
2016-06-14 16:45 944不使用select 普通的基础socket连接,对多个客户端的 ... -
ffmpeg+nginx 的直播(2,直播摄像头和麦克风)
2016-05-28 20:21 4258假设我的服务器是centos7 192.168.139.117 ... -
ffmpeg+nginx 的直播(1,直播播放的视频文件)
2016-05-26 17:11 652064位操作系统centos7 ############ 1.一 ... -
socat和netcat(nc)
2016-04-29 22:36 1676转 原文链接: http://www.wenquan.name ... -
neutron基础九(qemu nat网络)
2016-02-06 17:21 1558接上基础八,kvm透传nested忽略 1.在主机ce ... -
neutron基础八(qemu 桥接网络)
2016-02-06 13:13 1491qemu的桥接和nat的qemu启动命令是一样的,但是后续的脚 ... -
neutron基础七(qemu tap)
2016-02-02 17:02 973使用qemu 建立个虚拟机 然后用tap设备, 根据基础六,t ... -
neutron基础六(bridge fdb)
2016-01-28 18:30 2140转发表 在三台机器上建立三个namespace 192.16 ... -
南北流量
2016-01-23 23:26 1764一、三层网络架构: 接入层:负责服务器的接入和隔离 汇聚层:汇 ...
相关推荐
这是半年来,在看ULA的过程中,针对Linux 2.6.24内核顺手做的一点注释。内容不多,个人觉得文件系统和USB这两个模块的注释还有一点意思。 所有注释都是中文,您可以与标准2.6.24内核进行比较,看看具体的注释内容。 ...
Linux 2.6.24 内核注解 增加了mtd层的注解,顺带引出了block文件夹中的注解 若代码和头文件中注解有不一致的,以头文件的注解为准, 因为都是一边看一边加注的,经常会出现第一次理解不对的情况,而后的修改,再...
制作出来的yaffs映像,在linux2.6.24,arm9上面可以成功挂载。-Produced by yaffs image, in linux2.6.24, arm9 above can be successfully mounted.
用于修改linux的开机画面,在网上找了很久,和大家分享。其中包括源码和内核补丁,针对linux2.6.24版本的。
在Debian 4.0rc3上编译内核2.6.24时加入Layer7模块笔记第二版.pdf
已解锁-S3C6400_6410_Linux2.6.24_MFC文档pdf格式,可以转为可读写的word文档。
Linux是一种开源电脑操作系统内核。它是一个用C语言写成,符合POSIX标准的类Unix操作系统。 [1] Linux最早是由芬兰黑客 Linus Torvalds为尝试在英特尔x86架构上提供自由免费的类Unix操作系统而开发的。该计划开始于...
基于Linux2.6.24内核的WSN多频段网关设计.pdf
在Linux2.6.24内核中添加ME3760驱动,包含详细的程序修改点
linux版本为2.6.24 对drivers\base文件夹下的部分代码所做的阅读及分析笔记
我是一个linux的爱好者,我收集的linux的各个版本的内核源代码都发布在这里了,有需要的朋友请用linux采用的规则命名方法在csdn上面搜索下载你所需要的版本号的内核源代码,有时候一个一个的上传太麻烦了,我做了压缩...
为方便&快速下载,提供Linux 2.6源代码
cs8900 嵌入式Linux驱动源代码,此代码已经升级到了Linux 2.6.24版本的支持。
ME3760模块驱动,linux操作系统驱动加载方法
Linux 2.6内核学习笔记本仓库已经开始作为gitbook仓库,访问地址 GitHub访问地址 Something I hope you know before go into the coding~First, please watch or star this repo, I'll be more happy if you follow ...
谢宝友对这个版本的内核注释了很多。值得我们深入学习。尤其是看源码的同学们需要有注释带入门。值得你去下载的linux2.6.24版本内核的注释(只有部分非全部)
linux-2.6.24
Linux内核2.6.24的CFS调度器分析.pdf
Linux的内核源码,对有志于作linux内核编程的人或许有所帮助
我是一个linux的爱好者,我收集的linux的各个版本的内核源代码都发布在这里了,有需要的朋友请用linux采用的规则命名方法在csdn上面搜索下载你所需要的版本号的内核源代码,有时候一个一个的上传太麻烦了,我做了压缩...