代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。