6 Star 2 Fork 1

DY Young/Astral

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
DY Young 提交于 2024-06-12 23:06 . add lan9118 for qemu
ARCH ?= arm
BOARD ?= vexpress-a9
VER ?= $(shell git describe --tags)
WHO ?= "$(VER) ($(shell whoami)@$(shell hostname))\n$(shell date)"
all: image
sign:
@echo $(WHO)
image: staticdef defconfig config
@make config
@cmake -G "Unix Makefiles" -B output -DARCH=$(ARCH) -DSIGNOFF=$(WHO)
@cmake --build output
@make checkdep
ifeq ($(ARCH), arm)
@arm-none-eabi-objcopy -I elf32-littlearm -O binary output/AstralOS AstralOS.bin
endif
@gzip -c AstralOS.bin > AstralOS.bin.gz
output:
@mkdir -p output
checkdep: output staticdef defconfig config
@cmake -G "Unix Makefiles" -B output -DARCH=$(ARCH) --graphviz=output/dep.dot
@dot -Tpng -o helps/pics/dependency.png output/dep.dot
# --sd
qemu:
ifeq ($(ARCH), arm)
qemu-system-arm -M vexpress-a9 --kernel output/AstralOS --sd output/fs.fat --serial mon:stdio $(DBG) -net nic,macaddr=00:16:3e:00:00:01,model=lan9118
else ifeq ($(ARCH), riscv)
qemu-system-riscv64 -nographic -machine virt -m 128M -bios none -kernel output/AstralOS $(DBG)
else
@echo "please set correct qemu"
endif
staticdef: output
python3 tchain/script/static_task.py --define=kservice/task.def > output/static_task.c
config: output
python3 tchain/script/parseconfig.py --cfg=.config > output/config.cmake
python3 tchain/script/dvcompiler.py --board=$(BOARD) > output/devinfox.c
defconfig:
cp processor/$(ARCH)/defconfig .config
ramfs:
sudo dd if=/dev/zero of=fs.fat bs=512 count=4096
sudo mkfs.fat fs.fat
sudo chmod 777 fs.fat
mkdir -p fs
sudo mount fs.fat fs
sudo cp -r helps/* fs
sudo cp output/AstralOS fs
sudo umount fs
rm -rf fs
mkdir -p output
mv -f fs.fat output
clean:
rm -rf output
rm -rf *.bin *.gz
INPATH := include/innerapi
MOD ?=
extendmacro:
@gcc -E -o output/real$(MOD).h $(INPATH)/$(MOD).h -I$(INPATH) \
-I /home/sddy/astral/comn/Type \
-I /home/sddy/astral/comn/Queue \
-I /home/sddy/astral/include/kernel
@echo please check output/real$(MOD).h
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/DY-Young/astral.git
git@gitee.com:DY-Young/astral.git
DY-Young
astral
Astral
master

搜索帮助