Create resulting SD image in place instead of moving it later

This commit is contained in:
Sateallia 2023-10-23 04:18:29 +03:00
parent 8d37815914
commit 31b772c296

View File

@ -52,11 +52,10 @@ $(IMAGE_NAME).img: asagiri
$(OBJCOPY) -O binary build/bin/yukari build/yukari.bin
./u-boot/tools/mkimage -A arm64 -C none -O linux -T kernel -d build/yukari.bin -a 0x1000000 -e 0x1000000 build/yukari.uimg
./u-boot/tools/mkimage -A arm64 -C none -T script -n "Boot script" -d "arch/aarch64/res/boot.cmd" build/boot.scr
qemu-img create $(IMAGE_NAME).img 4M
mformat -i $(IMAGE_NAME).img ::
mcopy -i $(IMAGE_NAME).img build/yukari.uimg ::
mcopy -i $(IMAGE_NAME).img build/boot.scr ::
mv $(IMAGE_NAME).img build/$(IMAGE_NAME).img
qemu-img create build/$(IMAGE_NAME).img 4M
mformat -i build/$(IMAGE_NAME).img ::
mcopy -i build/$(IMAGE_NAME).img build/yukari.uimg ::
mcopy -i build/$(IMAGE_NAME).img build/boot.scr ::
.PHONY: clean
clean: