fix: better rasp reset
This commit is contained in:
+7
-10
@@ -11,6 +11,8 @@ UV ?= uv
|
||||
RUFF ?= $(UV) run --active ruff
|
||||
TY ?= $(UV) run --active ty
|
||||
|
||||
MAKE := $(MAKE) --no-print-directory
|
||||
|
||||
RASP_USER ?= forge
|
||||
RASP_BOOTFS ?= /run/media/$(shell whoami)/bootfs
|
||||
RASP_ROOTFS ?= /run/media/$(shell whoami)/rootfs
|
||||
@@ -60,10 +62,10 @@ rasp-install: rasp-install-pal ## setup raspberry
|
||||
|
||||
.PHONY: rasp-install-%
|
||||
rasp-install-%: ## setup raspberry (PAL/NTSC/HDMI)
|
||||
make git-submodule-update rasp-rsync rasp-setup-config-$* rasp-setup-cmdline-$* rasp-setup-start-$* rasp-unmount
|
||||
$(MAKE) git-submodule-update rasp-rsync rasp-setup-config-$* rasp-setup-cmdline-$* rasp-setup-start-$* rasp-unmount
|
||||
|
||||
.PHONY: rasp-reset
|
||||
rasp-reset: rasp-reset-config rasp-reset-cmdline rasp-reset-start rasp-unmount ## reset raspberry to console mode
|
||||
rasp-reset: rasp-rsync rasp-setup-config-hdmi rasp-reset-cmdline rasp-reset-start rasp-unmount ## reset raspberry to console mode
|
||||
|
||||
# TOOLS
|
||||
|
||||
@@ -123,7 +125,7 @@ rasp-reset-config: ## remove include in remote config.txt
|
||||
|
||||
.PHONY: rasp-setup-config-%
|
||||
rasp-setup-config-%: ## setup include in remote config.txt
|
||||
make rasp-setup-custom-$* rasp-reset-config
|
||||
$(MAKE) rasp-setup-custom-$* rasp-reset-config
|
||||
echo "include custom.txt" >> $(RASP_BOOTFS)/config.txt
|
||||
|
||||
.PHONY: rasp-reset-cmdline
|
||||
@@ -140,13 +142,8 @@ rasp-setup-cmdline-%: rasp-reset-cmdline ## add custom line to remove cmdline.tx
|
||||
rasp-reset-start: ## remove custom .bashrc start
|
||||
rm -f $(RASP_ROOTFS)/home/$(RASP_USER)/.bash_aliases
|
||||
|
||||
.PHONY: rasp-setup-start
|
||||
rasp-setup-start: rasp-reset-start ## install custom .bashrc start
|
||||
echo "touch $(RELATIVE_PROJECT_PATH)/*" >> $(RASP_ROOTFS)/home/$(RASP_USER)/.bash_aliases
|
||||
echo "make -C $(RELATIVE_PROJECT_PATH) --silent --no-print-directory start" >> $(RASP_ROOTFS)/home/$(RASP_USER)/.bash_aliases
|
||||
|
||||
.PHONY: rasp-setup-start-hmdi
|
||||
rasp-setup-start-%: rasp-reset-start ## install custom .bashrc start
|
||||
.PHONY: rasp-setup-start-%
|
||||
rasp-setup-start-%: ## install custom .bashrc start
|
||||
cp -f $(PROJECT_DIR)/system/$*/start.sh $(RASP_ROOTFS)/home/$(RASP_USER)/.bash_aliases
|
||||
|
||||
.PHONY: rasp-unmount
|
||||
|
||||
Reference in New Issue
Block a user