feat: I2c hello world

This commit is contained in:
2026-10-27 23:26:45 +01:00
parent b16ad95d97
commit 0fd6774800
6 changed files with 303 additions and 8 deletions
+12 -8
View File
@@ -25,7 +25,11 @@ remove-passwd:
.PHONY: apt-install
apt-install:
sudo apt update
sudo apt install -y weston seatd kitty git libglfw3-dev libgl-dev libasound2-dev libv4l-dev
sudo apt install -y weston seatd kitty git libglfw3-dev libgl-dev libasound2-dev libv4l-dev python3-pip python3-smbus i2c-tools
.PHONY: pip-install
pip-install:
pip3 install luma.oled --break-system-packages
.PHONY: setup-weston
setup-weston:
@@ -49,10 +53,10 @@ setup-services:
.PHONY: setup-bashrc
setup-bashrc:
$(PROJECT_DIR)/line_in_file.sh "make -C $(PROJECT_DIR) --no-print-directory start-weston" "$(HOME)/.bashrc"
$(PROJECT_DIR)/line_in_file.sh "make -C $(PROJECT_DIR) --no-print-directory start" "$(HOME)/.bashrc"
.PHONY: install
install: remove-passwd apt-install setup-weston remove-motd disable-cloud-init setup-services setup-bashrc
install: remove-passwd apt-install pip-install setup-weston remove-motd disable-cloud-init setup-services setup-bashrc
.PHONY: clean
clean:
@@ -65,12 +69,12 @@ build: $(BUILD_DIR)/$(TARGET)
run: $(BUILD_DIR)/$(TARGET)
$(BUILD_DIR)/$(TARGET) $(RUN_ARGS)
.PHONY: submodule-init
submodule-init:
git submodule update --init --recursive
.PHONY: start-bg
start-bg:
@python3 $(PROJECT_DIR)/i2c.py&
.PHONY: start-weston
start-weston:
.PHONY: start-fg
start-fg:
@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