/********************************************************************************
* RPi 2B QEMU 模拟树莓派
* 说明:
* 网络上又找到一些资料,不过在我的电脑上运行会出一些问题,经验证,需要提前
* 修改文件系统中的链接库和分区挂载表。
*
* 2017-5-21 台湾 中和区 曾剑锋
*******************************************************************************/ 一、参考文档:
. Emulating Jessie image with .x.xx kernel
https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki/Emulating-Jessie-image-with-4.x.xx-kernel
. Change Screen Resolution?
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=136280
. CONFIG.TXT
https://www.raspberrypi.org/documentation/configuration/config-txt/README.md 二、下载内核:
https://github.com/dhruvvyas90/qemu-rpi-kernel 三、下载树莓派系统:
. https://downloads.raspberrypi.org/raspbian_lite_latest
. https://downloads.raspberrypi.org/raspbian_latest 四、操作流程:
. 文件系统修改:
. fdisk -l <树莓派系统镜像>
zengjf@zengjf:~/rpi$ sudo fdisk -l ---raspbian-jessie-lite.img
[sudo] password for zengjf:
Disk ---raspbian-jessie-lite.img: 1.3 GiB, bytes, sectors
Units: sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disklabel type: dos
Disk identifier: 0xb2455b06 Device Boot Start End Sectors Size Id Type
---raspbian-jessie-lite.img1 63M c W95 FAT
---raspbian-jessie-lite.img2 .2G Linux . 磁盘偏移计算: * =
. mount -v -o offset= -t ext4 your-image-file.img /mnt
. cd /mnt
. sudo vim ./etc/ld.so.preload
注释掉所有的内容就可以了,一般里面只有一行,直接注释掉就OK了。
. sudo vim ./etc/fstab
看到和/dev/mmcblk有关的都可以注释掉。
. cd ~
. sudo umount /mnt
. 参考运行命令:
. lite版参考执行命令
qemu-system-arm -kernel kernel-qemu-4.4.-jessie -cpu arm1176 -m -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda ---raspbian-jessie-lite.img
. desktop版参考执行命令
qemu-system-arm -kernel kernel-qemu-4.4.-jessie -cpu arm1176 -m -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda ---raspbian-jessie.img

RPi 2B QEMU 模拟树莓派的更多相关文章

  1. 使用QEMU模拟树莓派

    QEMU上的树莓派 我们开始设置一个Lab VM.我们将使用Ubuntu并在其中模拟我们所需的ARM版本. 首先,获取最新的Ubuntu版本并在VM中运行它: https://www.ubuntu.c ...

  2. RPi 2B USB 远程桌面

    /******************************************************************** * RPi 2B USB 远程桌面 * 说明: * 用作废的 ...

  3. Android telnet RPi 2B

    /************************************************************************* * Android telnet RPi 2B * ...

  4. RPi 2B Android telnet ssh

    /*********************************************************************** * RPi 2B Android telnet ssh ...

  5. RPi 2B Documentation

    /********************************************************************** * RPi 2B Documentation * 声明: ...

  6. RPi 2B Raspbian system install

    /***************************************************************************** * RPi 2B Raspbian系统安装 ...

  7. RPi 2B SD read-only filesytem

    /**************************************************************************** * RPi 2B SD read-only ...

  8. RPi 2B apache2 mysql php5 and vsftp

    /************************************************************************* * RPi 2B apache2 mysql ph ...

  9. windows 远程桌面连接 RPi 2B

    /************************************************************************* * windows 远程桌面连接 RPi 2B * ...

随机推荐

  1. BZOJ 一句话题解

    菜鸡刷题记录 [题号:题解] 1008:简单排列组合 #include <bits/stdc++.h> using namespace std; #define ll long long ...

  2. Silverlight中获取控件中子控件

    如题:,直接来看代码: /// <summary> /// 查找并返回第一个 相同 name的子元素 /// </summary> /// <typeparam name ...

  3. 【转】Matlab使用过程中内存不足问题的总结

    使用matlab过程中经常会出现内存不足的问题,这里转载一篇来自http://blog.csdn.net/xiaojidan2011/article/details/8089532 的博文,解决这一问 ...

  4. Firebug控制台详解(转)

    本文转自:http://www.ruanyifeng.com/blog/2011/03/firebug_console_tutorial.html 作者: 阮一峰 日期: 2011年3月26日 Fir ...

  5. 正式学习React(四) ----Redux源码分析

    今天看了下Redux的源码,竟然出奇的简单,好吧.简单翻译做下笔记: 喜欢的同学自己可以去github上看:点这里 createStore.js import isPlainObject from ' ...

  6. AtCoder Regular Contest 097

    AtCoder Regular Contest 097 C - K-th Substring 题意: 求一个长度小于等于5000的字符串的第K小子串,相同子串算一个. K<=5. 分析: 一眼看 ...

  7. Graph_Master(连通分量_B_Trajan+完全图)

    hdu_4635 题目大意:给出一张DAG(n个点,m条边),求出能加的最大边数,使得该图无重边,无自环,非强连通. 题解:这题题面很好理解,也没有什么很难的点,主要是如何求出最大边数需要动点脑筋.首 ...

  8. CocoaPods学习系列1——安装和常规使用

    CocoaPods是一个Github上的开源项目,目前已经成为iOS开发过程中标准的依赖库管理器,提供了一种对第三方类库简单优雅的集成和管理方案. 其工作原理,是将第三方类库统一管理到一个名为Pods ...

  9. Hibernate -- Session的主键生成策略

    *缓存:集合--集合放置到内存中       *  只要session存在 session的一级缓存肯定存在.       *当执行查询时,以oid为oid=1条件到session的一级缓存中查找oi ...

  10. JavaScript tips —— 谈谈数组乱序

    前言 先看一个段代码 function randArr (arr) { return arr.sort(() => { return (Math.random() - 0.5); }); } 目 ...