Ubuntu14.04 Linux x86_64 Kernel Compiler
来源:互联网 发布:水果软件虚拟键盘 编辑:程序博客网 时间:2024/06/05 07:29
0x01 Kernel 3.9.9 Compiler
git tag 详细版本
git checkout 版本号
git branch -a 在哪一个分支上
make menuconfig 在kernel hacking中选中compile the kernel with debug info
make bzImage 编译内核
0x02 QEMU debug Kernel
qemu-system-x86_64 -s -S -kernel bzImage -nographic 会出现内核pannic
[ 3.711331] VFS: Cannot open root device “(null)” or unknown-block(0,0): error -6 [ 3.730405] Please append a correct “root=” boot option; here are the available partitions:
原因:缺少根设备
下载busy
make O=../obj/busybox/ menuconfig
然后最重要的是静态连接:
Busybox Setting:
>Build Option
>>Build Busybox as a static bina
make
make install
创建根文件夹,将_install复制到ramdisk中
mkdir ramdisk
cd ramdisk
cp -av /obusybox/_install/ .
初程化进程
ln -s bin/busybox init
设置开机程序
mkdir -pv {bin,sbin,etc,proc,sys,usr/{bin,sbin},dev}
vim etc/inittab
::sysinit:/etc/init.d/rcS::askfirst:-/bin/sh::restart:/sbin/init::ctrlaltdel:/sbin/reboot::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a
编写系统初始化命令
mkdir etc/init.d/rcS
vim rcS
#!/bin/shmount procmount -o remount,rw /mount -aclear echo "opoi Start :D ......"
chmod +x rcS
设置自动挂载的文件
cd ramdisk/etc/
vim fstab
# /etc/fstabproc /proc proc defaults 0 0sysfs /sys sysfs defaults 0 0devtmpfs /dev devtmpfs defaults 0 0
压缩镜像
cd ramdisk
find . -print0 | cpio –null -ov –format=newc | gzip -9 > my-linux/obj/initramfs.cpio.gz
运行
cd obj/
qemu-system-x86_64 -kernel bzImage -initrd initramfs.cpio.gz
无形界面
qemu-system-x86_64 -kernel bzImage -initrd initramfs.cpio.gz -append “console=ttyS0” -nographic
阅读全文
0 0
- Ubuntu14.04 Linux x86_64 Kernel Compiler
- Linux Kernel Compiler
- ubuntu14.04 内核升级到 linux kernel 4.9
- OpenCV3.1+numpy1.10.4+ubuntu14.04 x86_64:
- Ubuntu14.04 x86_64-linux-gnu环境下安装caffe无GPU
- 升级ubuntu14.04之后导致编译linux kernel出错的解决
- Ubuntu14.04编译安装Kernel(上)
- Ubuntu14.04编译安装Kernel(下)
- ubuntu14.04 theano nvcc compiler not found on $PATH
- ubuntu14.04下使用360wifi出现Kernel panic
- You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker.
- ubuntu14.04交叉编译ffmpeg出现unable to create an executable file. C compiler test failed.
- Oracle11g for linux x86_64
- linux x86_64 openssh
- Ubuntu14.04 Linux install g++
- ubuntu14.04 编译linux内核
- Ubuntu14.04安装Linux源码
- Ubuntu14.04安装Linux内核
- [Ext JS 6 By Example 翻译] 第2章
- 【差分约束系统】POJ1201[Intervals]题解
- C++之虚函数、虚函数表的内存分布
- [Ext JS 6 By Example 翻译] 第3章
- gfojzy_13 脑洞记搜
- Ubuntu14.04 Linux x86_64 Kernel Compiler
- [Ext JS 6 By Example 翻译] 第4章
- FFMPEG学习【libavutil】:Mathematics:AVRational
- 学习一门技术的惯用方法
- ASP.NET一些基本概念
- [Ext JS 6 By Example 翻译] 第5章
- 我的第一个Python程序
- ABP使用过程中的错误
- [Ext JS 6 By Example 翻译] 第6章