From c6ba80fe1f8994a431d7c7a2a021864e66e4e59b Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Tue, 5 Apr 2022 16:57:13 -0700 Subject: Error if no disk is specified This way, disks won't be unmounted errenously --- Common.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Common.mk') diff --git a/Common.mk b/Common.mk index 44dd68c..160aef9 100644 --- a/Common.mk +++ b/Common.mk @@ -26,7 +26,6 @@ BSP ?= 2 GDEBUG ?= 0 DEBUG ?= 0 SILENT ?= 0 -DISK ?= /dev/sdc1 CROSS = arm-none-eabi CC = ${CROSS}-gcc @@ -149,7 +148,12 @@ test: clean build/kernel.elf @tput setaf 6 2> /dev/null || true; echo Running Tests; tput sgr0 2> /dev/null || true @./tests/run.sh +ifndef $(DISK) +copy: + @tput setaf 1 2> /dev/null || true; echo ERROR: No disk specified!; tput sgr0 2> /dev/null || true +else copy: clean build/kernel7.img sudo mount $(DISK) /mnt/sd0 sudo cp build/kernel7.img /mnt/sd0 sudo umount /mnt/sd0 +endif \ No newline at end of file -- cgit v1.2.1