[主題分享] 溫柔的教你用 QEMU 開始寫系統軟體 (QEMU for System Software Development, a Gentle Introduction)
===
###### tags: `twlkh`, `qemu`, `system-software`
* 講者:Scott Tsai
* 時間:10/20 (四) 7:00 ~ 9:00 pm
* 視訊會議 URL: https://zoom.us/j/2109998888 (需安裝 [Chrome App](https://chrome.google.com/webstore/category/apps?hl=en) 或 Desktop、Mobile 版本)
* 投影片:https://docs.google.com/document/d/14fap8rPRY1RX85NOTgZkGUzuY_kw51pygaFL37uE0VM/edit
* 錄影: https://www.youtube.com/watch?v=l9pdrJX-SxA
# Introduction
一直想研究系統軟體,但很神奇的一直有藉口不做嗎?此篇適合初學者的分享會設好一個 ARMv7-A 32 bit,方便寫 bare metal 程式,也方便研究 Linux 的開發環境。討論如何在上面作自動化實驗與開發。然後你的藉口就又少一個了!
預備知識:願意學一點 Python 語言。沒用過的話,花一點時間看一下: [Python for Programmers with 3 Hours](https://stephensugden.com/crash_into_python/)。
Geared towards people who always wanted to study system software but keep coming up with excuses not to. Will help you set up an ARMv7-A 32 bit development environment for writing your own bare metal programs and booting a full Linux system, to the point of tracing a dynamically linked `hello world` program.
Prerequisites: willingness to learn a bit of Python scripting. Spend a few hours and read [Python for Programmers with 3 Hours](https://stephensugden.com/crash_into_python/) if you don’t know the language.
## Content
* Getting to a fast edit-compile-debug cycle for bare metal programs on the simulator
* Programmatically control the QEMU simulator ([qapi](http://wiki.qemu.org/Features/QAPI))
* Machine Level Debugging
* Programmatically read/write registers & memory
* Affecting control flow
* Source Level Debugging
* The [`qemu-system-arm -M virt`](http://phab.lowrisc.org/T7) machine type
* [9p filesystem passthrough](http://www.linux-kvm.org/page/9p_virtio)
* TAP networking without running the simulator as `root`
* Getting to a fast edit-compile-debug cycle in Linux userspace
* Assembling the necessary software packages to start tracing a dynamically linked `hello, world` program.
* [Using the `gdbserver` Program](https://sourceware.org/gdb/onlinedocs/gdb/Server.html)