This commit is contained in:
2026-10-02 21:40:40 +02:00
parent 468674c4ea
commit 71b5ea79be
7 changed files with 85 additions and 84 deletions
+23 -16
View File
@@ -39,7 +39,8 @@ remove-passwd:
.PHONY: apt-install
apt-install:
sudo apt install -y weston seatd kitty libglfw3-dev libgl-dev libasound2-dev libv4l-dev
sudo apt update
sudo apt install -y weston seatd kitty git libglfw3-dev libgl-dev libasound2-dev libv4l-dev
.PHONY: setup-weston
setup-weston:
@@ -47,9 +48,15 @@ setup-weston:
.PHONY: setup-rasp-config
setup-rasp-config:
sudo $(PROJECT_DIR)/line_in_file.sh "include forge-invar.txt" "/boot/firmware/config.txt"
sudo $(PROJECT_DIR)/line_in_file.sh "vc4.tv_norm=PAL" "/boot/firmware/cmdline.txt" "vc4.tv_norm"
sudo cp -f $(PROJECT_DIR)/system/config.ini /boot/firmware/forge-invar.txt
sudo $(PROJECT_DIR)/line_in_file.sh "include custom.txt" "/boot/firmware/config.txt"
sudo $(PROJECT_DIR)/append_to_file.sh " vc4.tv_norm=PAL" "/boot/firmware/cmdline.txt" "vc4.tv_norm="
sudo $(PROJECT_DIR)/append_to_file.sh " video=Composite-1:720x576ie,tv_mode=PAL" "/boot/firmware/cmdline.txt" "video="
sudo $(PROJECT_DIR)/append_to_file.sh " quiet loglevel=0 consoleblank=1" "/boot/firmware/cmdline.txt" "quiet"
sudo cp -f $(PROJECT_DIR)/system/config.ini /boot/firmware/custom.txt
.PHONY: remove-motd
remove-motd:
sudo rm -rf /etc/motd
.PHONY: setup-services
setup-services:
@@ -57,19 +64,12 @@ setup-services:
sudo systemctl daemon-reload
sudo systemctl enable getty@tty1.service seatd.service
.PHONY: setup-user-services
setup-user-services:
sudo ln -fs $(PROJECT_DIR)/system/weston.service /etc/systemd/user/weston.service
sudo ln -fs $(PROJECT_DIR)/system/weston.socket /etc/systemd/user/weston.socket
systemctl --user daemon-reload
systemctl --user enable weston
.PHONY: setup-bashrc
setup-bashrc:
$(PROJECT_DIR)/line_in_file.sh "make -C $(PROJECT_DIR) start-weston" "$(HOME)/.bashrc"
$(PROJECT_DIR)/line_in_file.sh "make -C $(PROJECT_DIR) --no-print-directory start-weston" "$(HOME)/.bashrc"
.PHONY: install
install: remove-passwd apt-install setup-weston setup-rasp-config setup-services setup-bashrc
install: remove-passwd apt-install setup-weston setup-rasp-config setup-services setup-bashrc remove-motd
.PHONY: clean
clean:
@@ -80,8 +80,7 @@ build: $(BUILD_DIR)/$(TARGET)
.PHONY: run
run: $(BUILD_DIR)/$(TARGET)
# $(BUILD_DIR)/$(TARGET) $(RUN_ARGS)
$(PROJECT_DIR)/delay.sh
$(BUILD_DIR)/$(TARGET) $(RUN_ARGS)
.PHONY: submodule-init
submodule-init:
@@ -89,4 +88,12 @@ submodule-init:
.PHONY: start-weston
start-weston:
/usr/bin/weston --shell=kiosk-shell.so --xwayland -- kitty --hold make -C $(PROJECT_DIR) run
@echo "on" | sudo tee /sys/class/drm/card1-Composite-1/status || true
@/usr/bin/weston --shell=kiosk-shell.so --xwayland --log=$(PROJECT_DIR)/weston.log -- kitty --hold make --no-print-directory -C $(PROJECT_DIR) run
.PHONY: host-install
host-install:
sudo chmod a+rwx /run/media/$(shell whoami)/rootfs/opt/
cp -r . /run/media/$(shell whoami)/rootfs/opt/
sudo umount -R /run/media/$(shell whoami)/rootfs
sudo umount -R /run/media/$(shell whoami)/bootfs