Change refresh to 400MHz

This commit is contained in:
Andrew D'Angelo 2023-08-19 16:56:49 -05:00
parent 1d9025debd
commit ec8b1613fe
2 changed files with 9 additions and 3 deletions

View File

@ -4,7 +4,7 @@ ccflags-y := -g -std=gnu99 -Wno-declaration-after-statement
dtb-y += sharp-drm.dtbo dtb-y += sharp-drm.dtbo
targets += $(dtbo-y) targets += $(dtbo-y)
always := $(dtbo-y) always := $(dtbo-y)
.PHONY: all clean install uninstall .PHONY: all clean install uninstall
@ -20,6 +20,7 @@ BUILD_DIR := .
endif endif
BOOT_CONFIG_LINE := dtoverlay=sharp-drm BOOT_CONFIG_LINE := dtoverlay=sharp-drm
BOOT_CMDLINE_ADD := console=tty2 fbcon=font:VGA8x8 fbcon=map:10
all: all:
$(MAKE) -C '$(LINUX_DIR)' M='$(shell pwd)' $(MAKE) -C '$(LINUX_DIR)' M='$(shell pwd)'
@ -37,14 +38,19 @@ install_aux:
install -D -m 0644 $(BUILD_DIR)/sharp-drm.dtbo /boot/overlays/ install -D -m 0644 $(BUILD_DIR)/sharp-drm.dtbo /boot/overlays/
# Add configuration line if it wasn't already there # Add configuration line if it wasn't already there
grep -qxF '$(BOOT_CONFIG_LINE)' /boot/config.txt \ grep -qxF '$(BOOT_CONFIG_LINE)' /boot/config.txt \
|| echo '[all]\ndtparam=spi=on\n$(BOOT_CONFIG_LINE)' >> /boot/config.txt || printf '[all]\ndtparam=spi=on\n$(BOOT_CONFIG_LINE)\n' >> /boot/config.txt
# Add auto-load module line if it wasn't already there # Add auto-load module line if it wasn't already there
grep -qxF 'sharp-drm' /etc/modules \ grep -qxF 'sharp-drm' /etc/modules \
|| echo 'sharp-drm' >> /etc/modules || echo 'sharp-drm' >> /etc/modules
# Configure fbcon for display
grep -qxF '$(BOOT_CMDLINE_ADD)' /boot/cmdline.txt \
|| sed -i.save 's/$$/ $(BOOT_CMDLINE_ADD)/' /boot/cmdline.txt
# Rebuild dependencies # Rebuild dependencies
depmod -A depmod -A
uninstall: uninstall:
# Remove fbcon configuration and create a backup file
sed -i.save 's/ $(BOOT_CMDLINE_ADD)//' /boot/cmdline.txt
# Remove auto-load module line and create a backup file # Remove auto-load module line and create a backup file
sed -i.save '/sharp-drm/d' /etc/modules sed -i.save '/sharp-drm/d' /etc/modules
# Remove configuration line and create a backup file # Remove configuration line and create a backup file

View File

@ -53,7 +53,7 @@
disp-gpios = <&gpio 22 0>; disp-gpios = <&gpio 22 0>;
spi-cs-high = <1>; spi-cs-high = <1>;
spi-max-frequency = <8000000>; spi-max-frequency = <4000000>;
buswidth = <8>; buswidth = <8>;
debug = <0>; debug = <0>;
}; };