环境介绍

Win7 64 + Vmware 11 + ubuntu14.04 32

u-boot 版本:u-boot-2015-04

Linux kernel版本:linux-3.16.y

busybox版本:1_24_stable

交叉编译工具链:arm-linux-gnueabi-

qemu版本:stable-2.4

目的

这篇博文的目的是实现NFS根文件系统的挂载。具体步骤如下。

步骤

1、参照上一篇博文,以保证Qemu的网络是可以用的。

2、配置u-boot的环境变量bootargs

setenv bootargs 'root=/dev/nfs rw nfsroot=192.168.11.20:/nfs_rootfs/rootfs init=/linuxrc console=ttyAMA0 ip=192.168.11.5'

3、配置kernel

配置内核,使其支持nfs挂载根文件系统

make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm O=./out_vexpress_3_16/ menuconfig

配置:

File systems  --->

[*] Network File Systems  --->

<*>   NFS client support

<*>     NFS client support for NFS version 3

[*]       NFS client support for the NFSv3 ACL protocol extension

[*]   Root file system on NFS

然后重新编译内核

make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm O=./out_vexpress_3_16 LOADADDR=0x60003000 uImage -j2

将生成的uImage拷贝到/tftpboot下

4、启动

qemu-system-arm -M vexpress-a9 \
-kernel /root/tq2440_work/u-boot/u-boot/u-boot \
-nographic \
-m 512M \
-net nic,vlan= -net tap,vlan=,ifname=tap0
-sd /root/tq2440_work/busybox_study/a9rootfs.ext3

注:这里的-sd参数此时可以不用设置。

启动信息:

VFS: Mounted root (nfs filesystem) on device :.
Freeing unused kernel memory: 236K (805c2000 - 805fd000) Please press Enter to activate this console.
[root@vexpress ]#
[root@vexpress ]#
[root@vexpress ]#
[root@vexpress ]# mount
rootfs on / type rootfs (rw)
192.168.11.20:/nfs_rootfs/rootfs on / type nfs (rw,relatime,vers=,rsize=,wsize=,namlen=,hard,nolock,proto=udp,timeo=,retrans=,sec=sys,mountaddr=192.168.11.20,mountvers=,mountproto=udp,local_lock=all,addr=192.168.11.20)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=)

此时我们由于指定了-sd参数,所以我们还可以访问原来的根文件系统,方法如下:

[root@vexpress ]# ls /dev/mmcblk0  -lh
brw-rw---- , Dec : /dev/mmcblk0
[root@vexpress ]# df -h
Filesystem Size Used Available Use% Mounted on
192.168.11.20:/nfs_rootfs/rootfs
.6G .1G .7G % /
tmpfs 250.7M 250.7M % /tmp
tmpfs 250.7M 250.7M % /dev
[root@vexpress ]# mount -t ext3 /dev/mmcblk0 /mnt/tmp
random: nonblocking pool is initialized
kjournald starting. Commit interval seconds
EXT3-fs (mmcblk0): using internal journal
EXT3-fs (mmcblk0): mounted filesystem with writeback data mode
[root@vexpress ]# ls /mnt/tmp/
bin etc linuxrc mnt root sys usr
dev lib lost+found proc sbin tmp var
[root@vexpress ]#

5、开启图形界面

  • 修改u-boot参数
setenv bootargs 'root=/dev/nfs rw nfsroot=192.168.11.20:/nfs_rootfs/rootfs init=/linuxrc console=ttyAMA0 console=tty0 ip=192.168.11.5'
  • 执行命令
qemu-system-arm -M vexpress-a9 \
-kernel /root/tq2440_work/u-boot/u-boot/u-boot \
-serial stdio \
-m 512M \
-net nic,vlan= -net tap,vlan=,ifname=tap0 \
-sd /root/tq2440_work/busybox_study/a9rootfs.ext3

截图:

未完待续。

用Qemu模拟vexpress-a9 (四) --- u-boot引导kernel,用nfs挂载根文件系统的更多相关文章

  1. qemu 模拟-arm-mini2440开发板-启动u-boot,kernel和nfs文件系统

    qemu 本文介绍了如何编译u-boot.linux kernel,然后用qemu启动u-boot和linux kernel,达到与开发板上一样的学习效果! 虽然已经买了2440开发板,但是在实际学习 ...

  2. qemu 模拟-arm-mini2440开发板-启动u-boot,kernel和nfs文件系统【转】

    转自:http://www.cnblogs.com/riskyer/p/3366001.html qemu 本文介绍了如何编译u-boot.linux kernel,然后用qemu启动u-boot和l ...

  3. 用Qemu模拟vexpress-a9 (五) --- u-boot引导kernel,device tree的使用

    环境介绍 Win7 64 + Vmware 11 + ubuntu14.04 32 u-boot 版本:u-boot-2015-04 Linux kernel版本:linux-3.16.y busyb ...

  4. Qemu搭建ARM vexpress开发环境(三)----NFS网络根文件系统

    Qemu搭建ARM vexpress开发环境(三)----NFS网络根文件系统 标签(空格分隔): Qemu ARM Linux 经过上一篇<Qemu搭建ARM vexpress开发环境(二)- ...

  5. 用Qemu模拟vexpress-a9 (一) --- 搭建Linux kernel调试环境【转】

    转自:http://www.cnblogs.com/pengdonglin137/p/5023342.html#_label2 阅读目录(Content) 环境介绍: 下载Linux内核 安装arm的 ...

  6. 用Qemu模拟vexpress-a9 (一) --- 搭建Linux kernel调试环境

    参考: http://blog.csdn.net/linyt/article/details/42504975 环境介绍: Win7 64 + Vmware 11 + ubuntu14.04 32 u ...

  7. mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(四制作根文件系统及通过NFS挂载文件系统)

    http://blog.csdn.net/yinjiabin/article/details/7489563 根文件系统一般包括: 1)基本的文件系统结构,包含一些必须的目录,比如:/dev,/pro ...

  8. CentOS 7 利用qemu模拟ARM vexpress A9开发板

    听说qemu用于仿真arm很不错,今日就来试了一把.由于刚刚开始,了解的并不多.本文仅仅记录Qemu装载Linux kernel和busybox根文件系统的过程.后续将会深入了解仿真的其他内容. 先上 ...

  9. 嵌入式linux:通过qemu模拟mini2440开发环境

    1 编译安装QEMU 首先下载qemu for mini2440,直接打包下载 http://repo.or.cz/w/qemu/mini2440.git/snapshot/HEAD.tar.gz  ...

随机推荐

  1. 2015 Multi-University Training Contest 1 - 1001 OO’s Sequence

    OO’s Sequence Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5288 Mean: 给定一个数列,让你求所有区间上满足 ...

  2. 2015年百度之星初赛(1) --- F 矩形面积

    矩形面积 Problem Description 小度熊有一个桌面,小度熊剪了很多矩形放在桌面上,小度熊想知道能把这些矩形包围起来的面积最小的矩形的面积是多少.   Input 第一行一个正整数 T, ...

  3. 重温html5的新增的标签和废除的标签

    HTML5已经盛行有段时间了,对于标签的使用,按照规范,哪些该用,哪些不该用,你是否都掌握了呢.今天我在这里详细列举下: 新增的结构标签 section元素 表示页面中的一个内容区 块,比如章节.页眉 ...

  4. 与众不同 windows phone (38) - 8.0 关联启动: 使用外部程序打开一个文件或URI, 关联指定的文件类型或协议

    [源码下载] 与众不同 windows phone (38) - 8.0 关联启动: 使用外部程序打开一个文件或URI, 关联指定的文件类型或协议 作者:webabcd 介绍与众不同 windows ...

  5. [ASP.NET MVC] ASP.NET Identity学习笔记 - 原始码下载、ID型别差异

    [ASP.NET MVC] ASP.NET Identity学习笔记 - 原始码下载.ID型别差异 原始码下载 ASP.NET Identity是微软所贡献的开源项目,用来提供ASP.NET的验证.授 ...

  6. 领域对象模型(domain object model)

    在Play程序中,模型(model)占据了核心地位.它是程序操作的信息的特定领域的表现方式. Martin Fowler这样定义模型: 负责表达业务概念,业务状态信息以及业务规则.尽管保存业务状态的技 ...

  7. 任意类型转换为IntPtr

    之前,将数组.结构体等转换为IntPtr使用的是Marshal.Copy().Marshal.StructureToPtr(),但是有个问题自定义的结构体数组没法这样转化,一般网上给出的解决方法就是通 ...

  8. andriod 获得drawable下所有图片

    package com.example.yanlei.my1; import android.app.AlertDialog; import android.content.Context; impo ...

  9. 实验12:Problem G: 强悍的矩阵运算来了

    这个题目主要是乘法运算符的重载,卡了我好久,矩阵的乘法用3个嵌套的for循环进行,要分清楚矩阵的乘法结果是第一个矩阵的行,第二个矩阵的列所组成的矩阵. 重载+,*运算符时,可以在参数列表中传两个矩阵引 ...

  10. 在XcodeGhost事件之后,获取更纯净的Xcode的方法。

    正值Xcode 7正式版本的更新,IOS界就冒出了个甚至可以说成涉及国家安全的大事也不为过的事件: 也可以点击网址链接看总结的更完整的文章:众多知名 APP 都中毒了,XCodeGhost 病毒事件汇 ...