在QEMU硬件环境中启动 kernel 2.6 + busybox as rootfs
## 环境和软件版本
ubuntu 14.04 x86_64
compiler: codesourcery 2009q1 arm-none-linux-gnueabi- i686 [1]
kernel: linux 2.6.33
rootfs: busybox-1.16.0
## compile kernel 2.6.33
```shell
# under source code directory
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- O=path/for/compilation versatile_defconfig
$ make menuconfig ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- O=path/for/compilation
`Kernel Features` => (Y) Use the ARM EABI to compile kernel
```
```shell
# under path/for/compilation directory
$ make -j9 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage -s
```
## compile busybox 1.16.0
```shell
# under source code directory
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
`Busybox Settings` -> `Build Options` -> `Build Busybox as a static binary (no shared libs)`
```
```shell
# under source code directory
$ make -j9 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install
```
Results stay under directory `_install`.
```shell
# under _install/
$ mkdir proc sys dev etc etc/init.d
```
Create _install/etc/init.d/rcS with the following content
```txt
#!/bin/sh
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/mdev -s
```
Add exec permission to rcS.
```shell
# under _install/etc/init.d/
$ chmod +x rcS
```
Create rootfs
```shell
# under _install/
$ find . | cpio -o --format=newc > ../rootfs.img
$ cd ../
$ gzip -c rootfs.img > rootfs.img.gz
$ file rootfs.img
$ file rootfs.img.gz
```
## launch Image on versatilepb board
```shell
# under qemu directory
$ ./qemu-system-arm -M versatilepb -m 128M -initrd path/to/rootfs.img.gz -kernel path/to/zImage -append "root=/dev/ram rdinit=/sbin/init console=ttyAMA0" -nographic
```
Press `Enter` to enter ramfs.
详细内容请见[2]。
[1]: https://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
[2]: https://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/
在QEMU硬件环境中启动 kernel 2.6 + busybox as rootfs相关推荐
- linux java maven项目_Java maven项目在window下运行正常,部署到Linux环境中启动报错,是由什么引起的?...
设定默认时区为:GMT+8 2018-07-19 18:58:12,013 [INFO ] com.eos.manager.web.listener.SpringContextListener.con ...
- 怎样在windows环境中启动某控制台程序并改变它的stdin、stdout和stderr? http://book.77169.org/ask18/how106297.htm
? MSDN里面有一些文档可以看看,方法是利用CreateProcess的 LPSTARTUPINFO 参数, 设置dwFlags为STARTF_USESTDHANDLES: 然后自定义: HANDL ...
- 问题分析报告--在压力场景下OS在某种硬件环境下的性能可能会下降90%的问题
1.问题描述 1.1 基本信息[Basic Information] 集群规模:37+3台物理机,每台128G内存:CPU:2*16C:SATA磁盘,2T*12 hadoop社区版本:** 商业版本: ...
- QEMU模拟vexpress-a9 搭建Linux kernel运行环境
众所周知,QEMU是一个可以模拟ARM架构的虚拟机,拥有高速.开源.跨平台.支持多种架构等优点.接下来,我们将使用QEMU模拟vexpress-a9,并在上面跑一个Linux kernel,为接下来的 ...
- qemu debug linux内核,在QEMU环境中使用GDB调试Linux内核
简介 对用户态进程,利用gdb调试代码是很方便的手段.而对于内核态的问题,可以利用crash等工具基于coredump文件进行调试.其实我们也可以利用一些手段对Linux内核代码进行gdb调试,qem ...
- MIT6.S081操作系统实验——操作系统是如何在qemu虚拟机中启动的?
前言 为了更好的理解基于RISC-V体系的Xv6操作系统是如何在qemu中启动的,我将详细地梳理从执行make qemu命令开始到Xv6的shell启动为止的具体流程. 执行make qemu后发生了 ...
- Istio-0.8.0在Minikube环境中快速启动Bookinfo示例
Istio-0.8.0在Minikube环境中快速启动Bookinfo示例 之前发表了从零开始应用Istio--入门示例,使用的istio版本比较低,在0.8.0版本下发现很多命令不一样了,所以总结一 ...
- 在linux oracle 10g/11g x64bit环境中,goldengate随os启动而自己主动启动的脚本
在linux oracle 10g/11g x64bit环境中,goldengate随os启动而自己主动启动的脚本 在linux.oracle 10g/11g x64bit环境中,goldengate ...
- virtualbox 硬件加速配置页中已启用硬件虚拟化,但主机并不支持。需要禁用硬件虚拟化才能启动虚拟机
错误:virtualbox 硬件加速配置页中已启用硬件虚拟化,但主机并不支持.需要禁用硬件虚拟化才能启动虚拟机 解决办法: 选择[系统] 硬件加速 去掉勾选 保存 即可
最新文章
- 原创 | 工业场景中的预测性维护
- allegro16.3 中的orcad capture CIS 无法打开何解决?
- Printk与sched_clock_init的一点分析
- 网管型工业交换机和 非网管型工业交换机的优缺点
- extjs设计器破解程序及开发调试工具
- 大楼通信综合布线系统_什么是网络综合布线系统组成?网络综合布线系统如何选择线缆?...
- 黑苹果之微星(MSI)主板BIOS详细设置篇
- android和手环传输数据,智能手环工作原理_智能手环是如何进行数据传输的 - 全文...
- 王者荣耀的服务器是什么系统,王者荣耀健康系统 健康系统是什么
- 如何安装使用Oracle10g
- 【LeetCode】279. 完全平方数 【动态规划】【四平方和定理】
- 十年风雨路,中国MES市场亟呼健康的生态系统
- Max-Product Loopy Belief Propagation for Solving MRF's energy function minimization
- 商城-3 查询商品详情页信息
- python之torchlight使用_《火炬之光2》功能型MOD制作教程
- [纸上谈兵 1]——App启动优化
- tf 2.0 -- Flatten --数据熨斗
- 网络工程师都学什么?网络工程师学习路线内容
- 微信公众平台获取access_token和极速发票源码JAVA
- 迅雷后台程序结束不掉,郁闷