run LK in Qemu

  • 安装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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值