Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mounts for non mmcblk devices #2

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,23 @@ format: $(OUTPUT_PATH)/$(RASPBIAN_IMAGE_VERSION).img unmount ## Format the SD ca

.PHONY: mount
mount: ## Mount the current SD device
ifeq (,$(findstring mmcblk,$(MNT_DEVICE)))
sudo mount $(MNT_DEVICE)1 $(MNT_BOOT)
sudo mount $(MNT_DEVICE)2 $(MNT_ROOT)
else
sudo mount $(MNT_DEVICE)p1 $(MNT_BOOT)
sudo mount $(MNT_DEVICE)p2 $(MNT_ROOT)
endif

.PHONY: unmount
unmount: ## Unmount the current SD device
ifeq (,$(findstring mmcblk,$(MNT_DEVICE)))
sudo umount $(MNT_DEVICE)1 || true
sudo umount $(MNT_DEVICE)2 || true
else
sudo umount $(MNT_DEVICE)p1 || true
sudo umount $(MNT_DEVICE)p2 || true
endif

.PHONY: wlan0
wlan0: ## Install wpa_supplicant for auto network join
Expand Down Expand Up @@ -144,7 +154,12 @@ prepare: ## Create all necessary directories to be used in build

.PHONY: clean
clean: ## Unmount and delete all temporary mount directories
ifeq (,$(findstring mmcblk,$(MNT_DEVICE)))
sudo umount $(MNT_DEVICE)1 || true
sudo umount $(MNT_DEVICE)2 || true
else
sudo umount $(MNT_DEVICE)p1 || true
sudo umount $(MNT_DEVICE)p2 || true
endif
sudo rm -rf $(MNT_BOOT)
sudo rm -rf $(MNT_ROOT)