Get hyperpixel to show bootloader

Can someone help me , trying to get hyperpixel 4.0 to show the bootloader on the display instead of HDMI , I have three OS on my sd card and would like to select on startup which one to use without having to plug HDMI into a tv , currently using the PINN bootloader willing to switch to noobs if that will work and ideas 💡

The display wont show anything until it’s initialised, which requires running the hyperpixel4-init binary. This binary is statically linked to make it easier to bake into minimal distributions.

pinn added an endpoint for running init scripts in this commit: Run pinn_init.sh from init (e.g. for Hyperpixel) ¡ procount/pinn@d3124a9 ¡ GitHub

Which they document:

If a script called /pinn_init.sh exists in PINN’s recovery partition, it will be executed before PINN is started. This script will be mounted as /tmp/media/pinn_init.sh and must complete before PINN starts. It can be useful to initialise third party display drivers before the main PINN splash screen is shown.

So you would need to copy over hyperpixel4-init and write a pinn_init.sh that runs it.

Great thank you for the help , I’m not great with coding , I will see what if I can figure it out , that’s why I bought the PI to start to learn coding , and such

hi guys so still a bit unsure on getting the hyperpixel 4.0 to run in the pinn bootloader and could use a little help , so i need to go to the pinn recovery directory and create a script /mount that will run the hyperpixel4-init code

like

sudo nano /tmp/media/pinn_init.sh (file name pinn wants in recovery partition)

add the hyperpixel4-init code

#!/bin/bash

SERVICE_NAME=“hyperpixel4-init.service”
SERVICE_PATH="/etc/systemd/system"
BINARY_NAME=“hyperpixel4-init”
BINARY_PATH="/usr/bin"
OVERLAY_PATH="/boot/overlays"
OVERLAY_NAME=“hyperpixel4.dtbo”

CONFIG="/boot/config.txt"

CONFIG_LINES=(
“dtoverlay=hyperpixel4”
“overscan_left=0”
“overscan_right=0”
“overscan_top=0”
“overscan_bottom=0”
“framebuffer_width=800”
“framebuffer_height=480”
“enable_dpi_lcd=1”
“display_default_lcd=1”
“dpi_group=2”
“dpi_mode=87”
“dpi_output_format=0x7f216”
“display_rotate=3”
“hdmi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6”
)

if [ $(id -u) -ne 0 ]; then
printf “Script must be run as root. Try ‘sudo ./install.sh’\n”
exit 1
fi

if [ -d “$SERVICE_PATH” ]; then
cp dist/$BINARY_NAME $BINARY_PATH
cp dist/$SERVICE_NAME $SERVICE_PATH
systemctl daemon-reload
systemctl enable $SERVICE_NAME
systemctl start $SERVICE_NAME
printf “Installed: $BINARY_PATH/$BINARY_NAME\n”
printf “Installed: $SERVICE_PATH/$SERVICE_NAME\n”
else
printf “Warning: cannot find $SERVICE_PATH for $SERVICE_NAME\n”
fi

if [ -d “$OVERLAY_PATH” ]; then
cp dist/$OVERLAY_NAME $OVERLAY_PATH
printf “Installed: $OVERLAY_PATH/$OVERLAY_NAME\n”
else
printf “Warning: unable to copy $OVERLAY_NAME to $OVERLAY_PATH\n”
fi

if [ -f “CONFIG" ]; then for ((i = 0; i < {#CONFIG_LINES[@]}; i++)); do
CONFIG_LINE=”${CONFIG_LINES[$i]}"
grep -e “^#$CONFIG_LINE” CONFIG > /dev/null STATUS=?
if [ $STATUS -eq 1 ]; then
grep -e “^$CONFIG_LINE” CONFIG > /dev/null STATUS=?
if [ $STATUS -eq 1 ]; then
# Line is missing from config file
echo “$CONFIG_LINE” >> $CONFIG
printf “Config: Added $CONFIG_LINE to $CONFIG\n”
else
printf “Skipped: $CONFIG_LINE already exists in $CONFIG\n”
fi
else
sed $CONFIG -i e “s/^#$CONFIG_LINE/$CONFIG_LINE/”
printf “Config: Uncommented $CONFIG_LINE in $CONFIG\n”
fi
done
else
printf “Warning: unable to find $CONFIG, is /boot not mounted?\n”
printf “Please add $OVERLAY_CONFIG to your config.txt\n”
fi

cntrl + X to save

how do i mount this in the pinn recovery directory , love the screen trying to make more portable :)

after not having much luck,
I found a painless way to get this working in this post

download https://sourceforge.net/projects/pinn/files/hyperpixel4-display.zip,
and extract it to the root of your PINN SD card, you’re done!