查看Raspberry的源代码
←
Raspberry
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Qemu == <source lang=bash> $ sudo apt install qemu qemu-system-arm $ </source> * [https://ownyourbits.com/2017/02/06/raspbian-on-qemu-with-network-access/ Raspbian on QEMU with network access] * [https://fadeevab.com/how-to-setup-qemu-output-to-console-and-automate-using-shell-script/ How to Setup QEMU Output to Console] ;;Using Qemu to custom system: * Fetch disk image from: http://www.raspberrypi.org/downloads * Get kernel img and versatile-pb.dtb from: https://github.com/dhruvvyas90/qemu-rpi-kernel * Run the Qemu 1st: <source lang=bash> $ sudo apt-get install qemu $ qemu-system-arm -cpu'?' | grep arm1176 $ qemu-system-arm -cpu arm1176 -m 256 -M versatilepb \ -kernel ./kernel-qemu-4.14.79-stretch \ -dtb ./versatile-pb.dtb \ -hda ./2018-11-13-raspbian-stretch-lite.img \ -append 'root=/dev/sda2 panic=1 init=/bin/bash' \ -no-reboot -serial stdio </source> <pre> -net nic \ -net user,hostfwd=tcp::5022-:22 \ </pre> Edit the /etc/ld.so.preload, remove the 1st line: #/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so QEMU 模拟器上磁盘是认作 /dev/sda , 但是实机上是 /dev/mmcblk0 所以要设定对应的符号链接,创建 /etc/udev/rules.d/90-qemu.rules 并追加以下记录: <pre> KERNEL=="sda", SYMLINK+="mmcblk0" KERNEL=="sda?", SYMLINK+="mmcblk0p%n" KERNEL=="sda2", SYMLINK+="root" </pre> Then re-run the Qemu: <source lang=bash> $ sudo apt-get install qemu $ qemu-system-arm -cpu'?' | grep arm1176 $ qemu-system-arm -cpu arm1176 -m 256 -M versatilepb \ -kernel ./kernel-qemu-4.14.79-stretch \ -dtb ./versatile-pb.dtb \ -hda ./2018-11-13-raspbian-stretch-lite.img \ -append 'root=/dev/sda2 panic=1' \ -no-reboot -serial stdio </source> <br>
返回到
Raspberry
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面