博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
RPi 2B QEMU 模拟树莓派
阅读量:7046 次
发布时间:2019-06-28

本文共 2455 字,大约阅读时间需要 8 分钟。

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

转载地址:http://gvzol.baihongyu.com/

你可能感兴趣的文章
企业如何针对用户数据进行有效保护
查看>>
Tomcat启动时报 java.lang.OutOfMemoryError: Java heap space
查看>>
Active Directory 基础回顾 (三)FSMO迁徙方式小总结
查看>>
Shell Script不同运行方式的区别
查看>>
Linux系统基本网络配置之ifconfig命令
查看>>
看几大IT公司的JSON利器
查看>>
Cocos2d-x 物理场景简单搭建
查看>>
认识“JPG、TXT”格式的病毒
查看>>
redhat6.2配置本地yum源
查看>>
tomcat配置文件server.xml详解
查看>>
ipython的两种安装方式
查看>>
有流媒体功能的lnmp部署练习,强化练习
查看>>
android消息机制,异步和多线程
查看>>
Linux下抓包工具tcpdump以及分析包的工具wireshark
查看>>
设置新建maven项目的jdk版本
查看>>
用copy命令将两个文件绑定,上传asp马
查看>>
FIR.im:iOS 8.1.3 “各路助手挺尸”、“封杀一切助手”的背后
查看>>
我的友情链接
查看>>
找出一个数组中唯一没有成对出现的两个数
查看>>
Ajax (部分一)自己做的,总结页面向后台传Form值、单个值和后台向前台传一个或是一组值...
查看>>