Skip to content

Commit

Permalink
Force EDID data
Browse files Browse the repository at this point in the history
- Use edid.bin
- Fix regex
  • Loading branch information
rmens committed Sep 12, 2024
1 parent 00f2cdc commit 82dffe9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Binary file added edid.bin
Binary file not shown.
17 changes: 12 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/usr/bin/env bash

# Variables (Update these if needed)
FALLBACKIMG_URL="https://raw.githubusercontent.com/oszuidwest/windows10-baseline/main/assets/ZWTV-wallpaper.png"
# Media URLs
CHROME_URL="https://teksttv.zuidwesttv.nl/"
VLC_URL="https://icecast.zuidwestfm.nl/zuidwest.stl"

# Files to download
FALLBACKIMG_URL="https://raw.githubusercontent.com/oszuidwest/windows10-baseline/main/assets/ZWTV-wallpaper.png"
FUNCTIONS_LIB_URL="https://raw.githubusercontent.com/oszuidwest/bash-functions/main/common-functions.sh"
EDID_DATA_URL="https://raw.githubusercontent.com/oszuidwest/rpi-texttv/main/edid.bin"

# Constants
FUNCTIONS_LIB_PATH="/tmp/functions.sh"
CMDLINE_FILE="/boot/firmware/cmdline.txt"

# System configuration options
VIDEO_OPTIONS="video=HDMI-A-1:1920x1080@50D video=HDMI-A-1:D"
BOOT_OPTIONS="consoleblank=1 logo.nologo"
VIDEO_OPTIONS="video=HDMI-A-1:1920x1080@50D"
BOOT_OPTIONS="drm.edid_firmware=edid/edid.bin vc4.force_hotplug=0x01 consoleblank=1 logo.nologo"

# Remove old functions library and download the latest version
rm -f "$FUNCTIONS_LIB_PATH"
Expand Down Expand Up @@ -67,7 +70,7 @@ echo -e "${BLUE}►► Applying video and boot options...${NC}"
CMDLINE_OPTIONS="$VIDEO_OPTIONS $BOOT_OPTIONS"
for OPTION in $CMDLINE_OPTIONS; do
if ! grep -q "$OPTION" "$CMDLINE_FILE"; then
sudo sed -i "$ s/$/ $OPTION/" "$CMDLINE_FILE"
sudo sed -i "\$ s|$| $OPTION|" "$CMDLINE_FILE"
echo "Applied option: $OPTION"
else
echo "Option $OPTION already present in $CMDLINE_FILE, no changes made."
Expand All @@ -88,6 +91,10 @@ install_packages silent xserver-xorg x11-xserver-utils x11-utils xinit openbox u
sudo mkdir -p /var/fallback
sudo wget -q "$FALLBACKIMG_URL" -O /var/fallback/fallback.png

# Download EDID data
sudo mkdir -p /usr/lib/firmware/edid/
sudo wget -q "$EDID_DATA_URL" -O /lib/firmware/edid/edid.bin

# Configure Openbox
echo -e "${BLUE}►► Configuring Openbox...${NC}"
mkdir -p ~/.config/openbox
Expand Down

0 comments on commit 82dffe9

Please sign in to comment.