From 94bc7591d81731e0fa5208b25c4c30de55ed061d Mon Sep 17 00:00:00 2001 From: Godones <1925466036@qq.com> Date: Tue, 27 Feb 2024 18:55:38 +0800 Subject: [PATCH] update doc --- Makefile | 15 ++++++++------- README.md | 52 +++++++++------------------------------------------- 2 files changed, 17 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index ccb36fdc..cd7716a9 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ BOOTLOADER := default KERNEL_BIN := $(KERNEL_FILE).bin IMG := tools/sdcard.img FSMOUNT := ./diskfs -TFTPBOOT := /home/godones/projects/tftpboot +TFTPBOOT := /home/godones/projects/tftpboot/ SMP ?= 1 GUI ?=n NET ?=y @@ -135,24 +135,24 @@ fake_run: board:install compile @rust-objcopy --strip-all $(KERNEL_FILE) -O binary $(OUTPUT)/testos.bin - @cp $(OUTPUT)/testos.bin /home/godones/projects/tftpboot/ + @cp $(OUTPUT)/testos.bin $(TFTPBOOT) @cp $(OUTPUT)/testos.bin ./alien.bin qemu: @rust-objcopy --strip-all $(OUTPUT)/boot -O binary $(OUTPUT)/testos.bin - @cp $(OUTPUT)/testos.bin /home/godones/projects/tftpboot/ + @cp $(OUTPUT)/testos.bin $(TFTPBOOT) @cp $(OUTPUT)/testos.bin ./alien.bin vf2:board @mkimage -f ./tools/vf2.its ./alien-vf2.itb @rm ./kernel-qemu - @cp ./alien-vf2.itb /home/godones/projects/tftpboot/ + @cp ./alien-vf2.itb $(TFTPBOOT) unmatched:board @mkimage -f ./tools/fu740.its ./alien-unmatched.itb @rm ./kernel-qemu - @cp ./alien-unmatched.itb /home/godones/projects/tftpboot/ + @cp ./alien-unmatched.itb $(TFTPBOOT) f_test: qemu-system-riscv64 \ @@ -252,11 +252,12 @@ help: @echo " LOG: enable log, default n, options: TRACE, DEBUG, INFO, WARN, ERROR" @echo " build [SMP=?] [LOG=?]: build kernel" @echo " sdcard [GUI=?] [FS=?]: build sdcard" - @echo " fake_run [SMP=?] [GUI=?]: run kernel without building" + @echo " GUI: enable gui, it's available only when running qemu" + @echo " FS: file system, for vf2 or unmatched, only fat is available" + @echo " fake_run [SMP=?] [GUI=?]: run kernel without building, the SMP should same as build" @echo " vf2 [SMP=?] [LOG=?] [VF2=y]: build starfive2 board image" @echo " SMP: number of cores, must >= 2" @echo " VF2: must be y" - @echo " unmatched [SMP=?] [LOG=?] [UNMATCHED=y]: build unmatched board image" @echo " SMP: number of cores, must >= 2" @echo " UNMATCHED: must be y" diff --git a/README.md b/README.md index a2b96bff..1e859168 100644 --- a/README.md +++ b/README.md @@ -48,62 +48,28 @@ make help ``` ``` -# 一键运行 -# 可以指定LOG=ERROR/WARN/INFO/DEBUG/TRACE开启调式 -make run [LOG=] [SMP=] -``` - -构建测试程序镜像: - -``` -make sdcard [GUI=n/y] -``` - -如果只想重新构建`kernel`而不改变测试程序,可以使用: - -``` -make build LOG= [LOG=] [SMP=] -``` - -使用已经编译好的程序运行而不是再次编译可以使用: - -``` -# 确保和make build的SMP一致 -make fake_run [SMP=] -``` - -运行测试(in bash) - -``` +# 一键运行qemu +make run +# run test > cd tests -> ls -> final_test +> ./final_test ``` ### Run with GUI (QEMU) ``` make run GUI=y -cd bin +cd tests slint or guitest or todo or printdemo or memorygame or ... ``` -### Run VisionFive2 - -``` -make sdcard -// 制作fat32 -make vf2 LOG=WARN VF2=y SMP=2 -// 生成testos.bin -// 这里smp=2 表示的是单核启动,对于u74-mc处理器,0号核不会被启动,从1号开始。 -``` +### [Run VisionFive2](./docs/doc/boot.md) -## Run Unmatched +Update the `TFTPBOOT` variable in Makefile. ``` make sdcard -// 制作fat32 -make unmatched LOG= UNMATCHED=y SMP=2 +make vf2 VF2=y SMP=2 // 生成testos.bin // 这里smp=2 表示的是单核启动,对于u74-mc处理器,0号核不会被启动,从1号开始。 ``` @@ -113,7 +79,7 @@ make unmatched LOG= UNMATCHED=y SMP=2 1. `make gdb-server` 2. `make gdb-client` -## [Doc](docs/doc/doc.md) +## [Doc](https://godones.github.io/Alien/)