diff options
author | Christian Cunningham <cc@localhost> | 2022-04-05 16:57:13 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-04-05 16:57:13 -0700 |
commit | c6ba80fe1f8994a431d7c7a2a021864e66e4e59b (patch) | |
tree | 2b2fe502f34be5b50becc88ba551c3b6a98fd0c8 | |
parent | 42628c4ffa5ed8a3d298f62562e790094211143f (diff) |
Error if no disk is specified
This way, disks won't be unmounted errenously
-rw-r--r-- | Common.mk | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |