Last active
May 20, 2024 00:44
-
-
Save sstallion/19852bad286709a1c301fccdd8234681 to your computer and use it in GitHub Desktop.
Convert UEFI BGRT image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# convert-bgrt.sh - convert UEFI BGRT image | |
BGRT_DIR=/sys/firmware/acpi/bgrt | |
if [ ! -d $BGRT_DIR ]; then | |
echo "BGRT not found" >&2 | |
exit 1 | |
fi | |
if [ $# -lt 2 ]; then | |
echo "usage: `basename $0` size file" >&2 | |
exit 1 | |
fi | |
X=`cat $BGRT_DIR/xoffset` | |
Y=`cat $BGRT_DIR/yoffset` | |
convert -background black -extent $1-$X-$Y $BGRT_DIR/image $2 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome!