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!