Skip to content

Commit

Permalink
set framebuffer to 8 bits per pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jan 6, 2024
1 parent df7c1f9 commit 52f333a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion stage2/04-toxblinkenwall/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,17 @@ echo 'start_x=1' >> "${ROOTFS_DIR}/boot/config.txt"
echo 'gpu_mem=384' >> "${ROOTFS_DIR}/boot/config.txt"
echo '' >> "${ROOTFS_DIR}/boot/config.txt"

#disable some stuff so that fbset (and framebuffer) works correctly
# disable some stuff so that fbset (and framebuffer) works correctly
sed -i -e 's_dtoverlay=vc4-fkms-v3d_#dtoverlay=vc4-fkms-v3d_' "${ROOTFS_DIR}/boot/config.txt"
sed -i -e 's/max_framebuffers=.*/#max_framebuffers=2/' "${ROOTFS_DIR}/boot/config.txt"

# set kernel commandline to get "proper" 32bit color depth framebuffer again
# see: https://github.com/raspberrypi/linux/issues/5049#issuecomment-1873982920
# https://www.kernel.org/doc/html/latest/fb/modedb.html
cp -av "${ROOTFS_DIR}/boot/firmware/cmdline.txt" "${ROOTFS_DIR}/boot/firmware/cmdline.txt_"
cat "${ROOTFS_DIR}/boot/firmware/cmdline.txt" | awk '{ print $0 " video=HDMI-A-1:-32" }' > "${ROOTFS_DIR}/boot/firmware/cmdline.txt_"
mv -v "${ROOTFS_DIR}/boot/firmware/cmdline.txt_" "${ROOTFS_DIR}/boot/firmware/cmdline.txt"

echo "contents of /boot/config.txt:"
echo "---------------------------------------"
cat "${ROOTFS_DIR}/boot/config.txt"
Expand Down

0 comments on commit 52f333a

Please sign in to comment.