Skip to content

Commit

Permalink
tg3040: updated Bootlogo.pak for 20241101 ofw
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Inman committed Nov 2, 2024
1 parent 659b1ca commit 68a428d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 25 deletions.
Binary file modified skeleton/EXTRAS/Tools/tg3040/Bootlogo.pak/bootlogo.bmp
Binary file not shown.
32 changes: 8 additions & 24 deletions skeleton/EXTRAS/Tools/tg3040/Bootlogo.pak/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,27 @@ set -ex
DIR=$(dirname "$0")
cd $DIR

# 396x66 (or fewer pixels)
# 396x66 (default), 1024x768 should fit
# Save as BMP
# Windows
# 32-bit
# 32-bit (might be 24 on the Brick)
# DO NOT flip row order

{

LOGO_PATH=$DIR/bootlogo.bmp
OFFSET=2147840
SIZE=78462

if [ ! -f $LOGO_PATH ]; then
echo "No logo.bmp available. Aborted."
exit 1
fi

COUNT=$(du -k ./bootlogo.bmp | cut -f1)
if [ $COUNT -gt $SIZE ]; then
echo "logo.bmp too large ($COUNT). Aborted."
exit 1
fi

dd if=/dev/mmcblk0p1 of=/tmp/bootlogo.sig bs=1 skip=$OFFSET count=2
SIGNATURE=`cat /tmp/bootlogo.sig`
if [ "$SIGNATURE" = "BM" ]; then
echo "Found bitmap at offset $OFFSET"
else
echo "Bad offset. Aborted."
exit 1
fi

# inject new
echo "injecting $LOGO_PATH"
dd conv=notrunc if=$LOGO_PATH of=/dev/mmcblk0p1 bs=1 seek=$OFFSET

BOOT_PATH=/mnt/boot/
mkdir -p $BOOT_PATH
mount -t vfat /dev/mmcblk0p1 $BOOT_PATH
cp $LOGO_PATH $BOOT_PATH
sync
umount $BOOT_PATH

echo "Done."

} &> ./log.txt
Expand Down
7 changes: 6 additions & 1 deletion todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BASE

EXTRAS

-
- tg3040: updated Bootlogo.pak for 20241101 ofw

---

Expand All @@ -20,6 +20,11 @@ rgcubexx
and unzip

tg3040
redo Bootlogo.pak
done
can similar tactics be employed on other devices?
eg. smart pro?

mute switch is polled at 1fps in trimui_inputd
you can feel that latency
should keymon poll /sys/class/gpio/gpio243/value directly?
Expand Down

0 comments on commit 68a428d

Please sign in to comment.