惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
博客园 - Franky
Martin Fowler
Martin Fowler
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
The Cloudflare Blog
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
J
Java Code Geeks
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
腾讯CDC
博客园_首页
博客园 - 司徒正美
D
DataBreaches.Net
I
InfoQ
GbyAI
GbyAI
IT之家
IT之家
罗磊的独立博客

Mox的笔记库

2026PPoPP MLIR Tutorial学习 | Mox的笔记库 MacOS配置《明日方舟:终末地》 | Mox的笔记库 2025:向内生长 | Mox的笔记库 由mlir::ExecutionEngine引发的跨系统问题 | Mox的笔记库 WSL2配置Cuda-Tile环境记录(未完待续) | Mox的笔记库 Vibe Coding手搓项目记录 | Mox的笔记库 给Debian上包——以DuckDB为例 | Mox的笔记库 UCPD.sys事件存档 | Mox的笔记库 换新电脑之Mac mini M4从购买到配置 | Mox的笔记库 Mac配置MLX-C开发环境 | Mox的笔记库 RISC-V meets RDBMS——RISC-V架构上可运行数据库一览 | Mox的笔记库 DuckDB Sort实现调查 | Mox的笔记库 修复Redis在树莓派5上无法运行的问题 | Mox的笔记库 如何在MLIR中自定义类型并且输出运行 | Mox的笔记库 网站网络结构变更记录 | Mox的笔记库 EDBT25论文阅读:PhoebeDB——A Disk-Based RDBMS Kernel for High-Performance and Cost-Effective OLTP SIGMOD25论文阅读:BPF-DB:——A Kernel-Embedded Transactional Database Management System For eBPF Applications Apache Arrow Gandiva项目解析 | Mox的笔记库 VLDB24论文阅读:Cloud-Native Database Systems and Unikernels——Reimagining OS Abstractions for Modern Hardware NoisePage源码分析(未完待续) | Mox的笔记库 VLDB20论文阅读:Mainlining Databases——Supporting Fast Transactional Workloads on Universal Columnar Data File Formats VLDB17论文阅读:Relaxed Operator Fusion for In-Memory Databases:Making Compilation, Vectorization, and Prefetching Work Together At Last 论文阅读:How not to structure your database-backed web applications——a study of performance bugs in the wild SIGMOD24阅读:ROME——Robust Query Optimization via Parallel Multi-Plan Execution 文章阅读:First Past the Post-Evaluating Query Optimization in MongoDB SIGMOD文章阅读:Apache Calcite——A Foundational Framework for Optimized Query Processing Over Heterogeneous Data Sources VLDB23论文阅读:Analyzing the Impact of Cardinality Estimation on Execution Plans in Microsoft SQL Server SIGMOD22论文阅读:Efficient Massively Parallel Join Optimization for Large Queries VLDB论文阅读:Weaving Relations for Cache Performance VLDB22论文阅读:ConnectorX——Accelerating Data Loading From Databases to Dataframes
Arch Linux运行树莓派系统(2022年) | Mox的笔记库
MocusEZ · 2022-08-04 · via Mox的笔记库

需要安装QEMU及其相应的aarch64虚拟包,具体安装方法已经忘了,网上应该能搜得到(比如Arch wiki),本篇主要内容是树莓派系统镜像的提取

Arch wiki QEMU

参考国外的脚本(注意,稍微做了一丢丢修改,适应QEMU7.0的配置),把树莓派的btd和kernel提取出来,启动镜像

https://gist.githubusercontent.com/Ch0pin/191007e621e806a6283d5ec5416b8847/raw/1be4b0d62c526eff245734ed38b034fabc8448e2/rasp

pwn@host$ mkdir aarch64_tests && cd aarch64_tests

pwn@host$ wget https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2022-01-28/2022-01-28-raspios-bullseye-arm64.zip | busybox unzip -

pwn@host$ sudo mkdir /mnt/raspbian

pwn@host$ fdisk -l 2022-01-28-raspios-bullseye-arm64.img

# Check the 'Start' value of 2022-01-28-raspios-bullseye-arm64.img1 and multiply by 512 That will be your **N**

pwn@host$ sudo mount -v -o offset=N -t vfat 2022-01-28-raspios-bullseye-arm64.img /mnt/raspbian

pwn@host$ cp /mnt/raspbian/kernel8.img $(pwd)

pwn@host$ cp /mnt/raspbian/bcm2710-rpi-3-b-plus.dtb $(pwd)

pwn@host$ sudo umount /mnt/raspbian

# Ensure you have QEMU 7.0 installed at this point

pwn@host$ qemu-img resize 2022-01-28-raspios-bullseye-arm64.img 8G

pwn@host$ qemu-system-aarch64 -m 1024 -M raspi3b -kernel kernel8.img -dtb bcm2710-rpi-3-b-plus.dtb -sd 2022-01-28-raspios-bullseye-arm64.img -append "console=ttyAMA0 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4" -nographic -device usb-net,netdev=net0 -netdev user,id=net0,hostfwd=tcp::5555-:22

# At this point raspbian should boot on the terminal

raspberrypi login: pi

Password: raspberry

pi@raspberry:~$ sudo service ssh start

pi@raspberry:~$ sudo update-rc.d ssh enable

# At this point we should have been inside the QEMU RaspbianOS instance with ssh

pwn@host$ ssh pi@127.0.0.1 -p 5555

pi@raspberry:~$ sudo apt update && sudo apt install neovim nasm -y && bash -c "$(curl -fsSL http://gef.blah.cat/sh)"

由于没用libvirtd管理,所以只能通过脚本启动

qemu-system-aarch64 -m 1024 -M raspi3b -smp 4 -kernel kernel8.img -dtb bcm2710-rpi-3-b-plus.dtb -sd 2022-01-28-raspios-bullseye-arm64.img -append "console=ttyAMA0 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4" -nographic -device usb-net,netdev=net0 -netdev user,id=net0,hostfwd=tcp::5555-:22

换源

选了北外源

deb https://mirrors.bfsu.edu.cn/debian/ bullseye main contrib non-free

# deb-src https://mirrors.bfsu.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.bfsu.edu.cn/debian/ bullseye-updates main contrib non-free

# deb-src https://mirrors.bfsu.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.bfsu.edu.cn/debian/ bullseye-backports main contrib non-free

# deb-src https://mirrors.bfsu.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.bfsu.edu.cn/debian-security bullseye-security main contrib non-free

# deb-src https://mirrors.bfsu.edu.cn/debian-security bullseye-security main contrib non-free

# 编辑 `/etc/apt/sources.list.d/raspi.list` 文件,删除原文件所有内容,用以下内容取代:

deb http://mirrors.bfsu.edu.cn/raspberrypi/ bullseye main

扩容+SSH配置

爬墙看下面参考资料

结语

感觉体验并不流畅,启动缓慢,一方面可能是qemu的网卡没配置好,网速时好时坏,另外有可能是用了dektop版本的问题,一堆桌面应用去抢1GB内存肯定不够用。平时的话qemu-user应该够我做Arm64实验了,用不上这个。

tips:后面换了lite版本,跑起来相对流畅,至少能顺利把实验做完了。

总之,不推荐使用这种方式开发树莓派

现在先写一下,没准以后能用得上

参考资料

Emulating Raspberry Pi with QEMU


avatar

探索未曾设想的道路