- 安装arm gcc
sudo apt-get install gcc-arm-none-eabi
- 安装qemu
sudo apt-get install qemu
qemu-system-arm --version
#lk 官方推荐2.4版本以上
qemu-system-arm --machine help
#查看支持板子的型号
- 下载lk
git clone https://github.com/littlekernel/lk.git
- Run Qemu
from the lk directory
. ./scripts/do-qemuarm
. ./scripts/do-qemuarm -6 //运行aarch64,前提需要安装gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux
- help查看command list:
] help
command list:
page_alloc : page allocator debug commands
heap : heap debug commands
gfx : gfx commands
help : this list
test : test the command processor
history : command history
repeat : repeats command multiple times
bio : block io debug commands
vmm : virtual memory manager
vm : vm commands
pmm : physical memory manager
reboot : soft reset
poweroff : powerdown
version : print version
tcp : tcp commands
arp : arp commands
mi : minip commands
spifs : commands related to the spifs implementation.
ls : dir listing
cd : change dir
pwd : print working dir
mkdir : make dir
mkfile : make file
rm : remove file
stat : stat file
cat : cat file
fs : fs debug commands
dw : display memory in words
dh : display memory in halfwords
db : display memory in bytes
mw : modify word of memory
mh : modify halfword of memory
mb : modify byte of memory
fw : fill range of memory by word
fh : fill range of memory by halfword
fb : fill range of memory by byte
mc : copy a range of memory
crash : intentionally crash
stackstomp : intentionally overrun the stack
mtest : simple memory test
chain : chain load another binary
sleep : sleep number of seconds
sleepm : sleep number of milliseconds
crc16 : crc16
crc32 : crc32
adler32 : adler32
bench_cksum : benchmark the checksum routines
aes_test : test AES encryption
aes_bench : bench AES encryption
threads : list kernel threads
threadstats : thread level statistics
threadload : toggle thread load display
printf_tests : test printf
printf_tests_float: test printf with floating point
thread_tests : test the scheduler
port_tests : test the ports
clock_tests : test clocks
bench : miscellaneous benchmarks
fibo : threaded fibonacci
spinner : create a spinning thread
cbuf_tests : test lib/cbuf
mem_test : test memory
float_tests : floating point test
cache_tests : test/bench the cpu cache
string : memcpy tests
dcc : dcc stuff