redhat server 5.3内核升极2.6.18 升级到 3.5 装systemtap 原创
1. 在 LINUX 3.5源代码目录下执行 yum install ncurses-devel make menuconfig
2 打开内核跟踪事件,用于SYSTEMTAP跟踪
kernel hacking --->tracers(new)--->enable uprobes-based dynamic events
文件系统相关选项要打开
即为
CONFIG_SYSFS_DEPRECATED_V2=y
不这样设为出错,安装内核重起后就会出现如下状况
mount: could not find filesystem ‘/dev/root’
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
3. 头文件出错
In file included from /usr/include/sys/time.h:31,
from /usr/include/linux/input.h:12,
from samples/hidraw/hid-example.c:14:
/usr/include/sys/select.h:78: error: conflicting types for 'fd_set'
/usr/include/linux/types.h:12: error: previous declaration of 'fd_set' was here
In file included from /usr/include/linux/input.h:14,
from samples/hidraw/hid-example.c:14:
/usr/include/sys/types.h:46: error: conflicting types for 'loff_t'
/usr/include/linux/types.h:30: error: previous declaration of 'loff_t' was here
/usr/include/sys/types.h:62: error: conflicting types for 'dev_t'
/usr/include/linux/types.h:13: error: previous declaration of 'dev_t' was here
In file included from /usr/include/sys/types.h:133,
from /usr/include/linux/input.h:14,
from samples/hidraw/hid-example.c:14:
/usr/include/time.h:105: error: conflicting types for 'timer_t'
/usr/include/linux/types.h:22: error: previous declaration of 'timer_t' was here
In file included from /usr/include/linux/input.h:14,
from samples/hidraw/hid-example.c:14:
/usr/include/sys/types.h:198: error: conflicting types for 'int64_t'
/usr/include/linux/types.h:98: error: previous declaration of 'int64_t' was here
/usr/include/sys/types.h:204: error: conflicting types for 'u_int64_t'
/usr/include/linux/types.h:97: error: previous declaration of 'u_int64_t' was here
In file included from /usr/include/linux/input.h:14,
from samples/hidraw/hid-example.c:14:
/usr/include/sys/types.h:235: error: conflicting types for 'blkcnt_t'
/usr/include/linux/types.h:114: error: previous declaration of 'blkcnt_t' was here
mples/hidraw/hid-example.c:35:26: error: linux/hidraw.h: No such file or directory
samples/hidraw/hid-example.c: In function ‘main’:
samples/hidraw/hid-example.c:50: error: storage size of ‘rpt_desc’ isn’t known
samples/hidraw/hid-example.c:51: error: storage size of ‘info’ isn’t known
samples/hidraw/hid-example.c:67: error: ‘HIDIOCGRDESCSIZE’ undeclared (first use in this function)
samples/hidraw/hid-example.c:67: error: (Each undeclared identifier is reported only once
samples/hidraw/hid-example.c:67: error: for each function it appears in.)
samples/hidraw/hid-example.c:75: error: ‘HIDIOCGRDESC’ undeclared (first use in this function)
samples/hidraw/hid-example.c:86: warning: implicit declaration of function ‘HIDIOCGRAWNAME’
samples/hidraw/hid-example.c:93: warning: implicit declaration of function ‘HIDIOCGRAWPHYS’
samples/hidraw/hid-example.c:100: error: ‘HIDIOCGRAWINFO’ undeclared (first use in this function)
samples/hidraw/hid-example.c:51: warning: unused variable ‘info’
samples/hidraw/hid-example.c:50: warning: unused variable ‘rpt_desc’
make[2]: *** [samples/hidraw/hid-example] Error 1
make[1]: *** [samples/hidraw] Error 2
make: *** [vmlinux] Error 2
处理方法:
[root@localhost linux-3.5]# cp include/linux/hidraw.h /usr/include/linux/
[root@localhost linux-3.5]# cp include/linux/hid.h /usr/include/linux/
vi samples/hidraw/hid-example.c
将13-15行的如下3行移动到33行以后。/* Linux */
#include <linux/types.h>
#include <linux/input.h>
#include <linux/hidraw.h>/* Unix */
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>/* C */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
vi /usr/include/linux/input.h
line 647 #define BUS_PCI 0x01 #define BUS_ISAPNP 0x02 #define BUS_USB 0x03 #define BUS_HIL 0x04 #define BUS_BLUETOOTH 0x05 /*以下一行为新增*/ #define BUS_VIRTUAL 0x06 #define BUS_ISA 0x10 #define BUS_I8042 0x11 #define BUS_XTKBD 0x12 #define BUS_RS232 0x13 #define BUS_GAMEPORT 0x14 #define BUS_PARPORT 0x15 #define BUS_AMIGA 0x16 #define BUS_ADB 0x17 #define BUS_I2C 0x18 #define BUS_HOST 0x19 #define BUS_GSC 0x1A /*以下两行为新增*/ #define BUS_ATARI 0x1B #define BUS_SPI 0x1C
4.确定参数设置 .config
[root@localhost linux-3.5]# cat .config | grep CONFIG_DEBUG_INFO CONFIG_DEBUG_INFO=y [root@localhost linux-3.5]# cat .config | grep CONFIG_KPROBES CONFIG_KPROBES=y [root@localhost linux-3.5]# cat .config | grep CONFIG_RELAY CONFIG_RELAY=y [root@localhost linux-3.5]# cat .config | grep CONFIG_DEBUG_FS CONFIG_DEBUG_FS=y [root@localhost linux-3.5]# cat .config | grep CONFIG_MODULES CONFIG_MODULES=y [root@localhost linux-3.5]# cat .config | grep CONFIG_MODULE_UNLOAD CONFIG_MODULE_UNLOAD=y[root@localhost linux-3.5]#cat .config | grep CONFIG_UTRACE (linux 3.5 没有这个选项) CONFIG_UTRACE=y[root@localhost linux-3.5]#cat .config | grep CONFIG_SYSFS_DEPRECATED_V2CONFIG_SYSFS_DEPRECATED_V2=y
5.make CONFIG_DEBUG_SECTION_MISMATCH=y 编绎内核
故障问题:
编译内核时出现“make CONFIG_DEBUG_SECTION_MISMATCH=y” 错误提示:
root@localhost linux-3.5]#make modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 1106 modules
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
排错记录:
编辑.config文件,加入:CONFIG_DEBUG_SECTION_MISMATCH=y重新编译,还是出错,于是直接
make CONFIG_DEBUG_SECTION_MISMATCH=y编译成功。
root@localhost linux-3.5]#make CONFIG_DEBUG_SECTION_MISMATCH=y
6.make modules_install
7.make install
8.make headers_install
redhat server 5.3内核升极2.6.18 升级到 3.5 装systemtap 原创相关推荐
- linux内核版本 2.6.39,编译RedHat Linux-2.6.39内核
1. 准备编译环境 1)RedHat Server 5.1 Linux 2.6.18-53.el5: 2)linux-2.6.39.tar.bz2源代码 2.工作目录 #cd /usr/src/ 2 ...
- linux内核更新/修补程序,Ubuntu 18.04.3 LTS无需重启即可轻松修补Linux内核
Ubuntu 18.04.3 LTS本月早些时候推出了更新的内核和图形堆栈,以及所有最新的软件包更新和增强的Livepatch集成. 由Ubuntu 19.04(Disco Dingo)的Linux ...
- Linux内核升级,从2.6.18升级到3.2.14
今日在centos上安装jsp环境,即(Nginx+jdk+mysql+tomcat)发现nginx启动后无法访问,于是查看日志,log如下 [root@AY12122501352213a7156 ~ ...
- 容器里有10升油,现在只有两个分别能装3升和7升油的瓶子,需要将10 升油等分成2 个5 升油。编写程序,输出分油的操作过程。
容器里有10升油,现在只有两个分别能装3升和7升油的瓶子,需要将10 升油等分成2 个5 升油.编写程序,输出分油的操作过程. 这个思路是看别人的,代码是自己写的 思路其实很容易理解,就是三个桶之间互 ...
- 容器里有10升油,现在只有两个分别能装3升和7升油的瓶子,需要将10 升油等分成2 个5 升油。程序输出分油次数最少的详细操作过程
引入 1.容器里有10升油,现在只有两个分别能装3升和7升油的瓶子,需要将10 升油等分成2 个5 升油.程序输出分油次数最少的详细操作过程. 思考 这题主要是要求了输出分油次数最少的操作,网上很多算 ...
- 华为在 5G 初期不考虑盈利;网易发布数据中台;微软 SQL Server 2019 免费支持 Java | 极客头条...
快来收听极客头条音频版吧,智能播报由标贝科技提供技术支持. 「CSDN 极客头条」,是从 CSDN 网站延伸至官方微信公众号的特别栏目,专注于一天业界事报道.风里雨里,我们将每天为朋友们,播报最新鲜有 ...
- CentOS6.0/RedHat Server 6.4安装配置过程 详细图解!
1.准备安装 1.1 系统简介 CentOS 是什么? CentOS是一个基于Red Hat 企业级 Linux 提供的可自由使用的源代码企业级的 Linux 发行版本.每个版本的 CentOS 都会 ...
- redhat7 linux内核版本,CentOS和Redhat发行版linux内核版本的对应关系
由于Redhat和CentOS的发行版本现在众多,所以我们应该知道CentOS和Redhat及linux内核之间版本的对应关系对维护系统还是很有帮助的.对应的列表如下: Redhat 9.0----- ...
- oracle 9.2.0.2,在RedHat enterprise server 3 安装oracle9i 2.0.0.1 并升级到9.2.0.6
oracle9i 2.0.4上个月从oracle网站下载没有安装在els3上. 参考了网上的一些文章,并根据文章的提示找了一些资料和补丁,完成了这次的安装.[@more@] 1.安装RedHat EL ...
最新文章
- Django 实现分库
- 这 3 个字是未来发展关键,不重视的企业,正在被淘汰
- 计算机设备图标怎么删除,电脑设备和驱动器中没用的图标怎么删除? 我的电脑中手机...
- 图形结构:克隆图,图的遍历的应用,递归和迭代
- Qt实用快捷键(较全面)
- SpringBoot-Web原生组件的注入
- ProjectEuler 5
- 计算机图形学E6——倒水问题emm和OpenGL没啥关系
- vue 中二维码的使用和工具比较
- 阶段3 1.Mybatis_05.使用Mybatis完成CRUD_1 回顾Mybatis的环境搭建-实现查询所有功能
- 快播案:程序正义、盗版和色情
- 阿里云大数据工程师(ACP)认证考试大纲
- matlab读取snp文件,bcftools 提取vcf(snp/indel)文件子集
- PPT总结篇之字体,图片
- java定时自动关机软件
- 计算机室内设计cad实践报告,cad室内设计实习报告
- js/javaScript通过setTimeout做动画和需要注意的点
- 爱奇艺自主研发的动态化框架!
- 华清远见22071作业1011
- scapy python_Python中使用Scapy小记
热门文章
- 贪婪算法在求解最小生成树中的应用(JAVA)--Prim算法
- oracle创建、删除索引等操作
- 编码是件有逻辑的事情
- java 如何使用dylib,如何在应用程序中使用dylib文件?
- c#网页自动化脚本语言,c# – 创建用于创建网页的脚本语言
- wps for linux alpha 15 语言包,WPS Office for Linux Alpah 7发布
- qdir 类似工具_qdir 类似工具_支持 Win8.1,全能资源管理器 Q-Dir 5.74 发布
- spring框架 web开发_go语言web开发框架学习:Iris框架讲解(一)
- 2021年货节消费趋势报告
- .describe() python_【python小白上路系列】函数