Skip to content

Instantly share code, notes, and snippets.

@sstallion
Last active May 20, 2024 00:44
Show Gist options
  • Save sstallion/19852bad286709a1c301fccdd8234681 to your computer and use it in GitHub Desktop.
Save sstallion/19852bad286709a1c301fccdd8234681 to your computer and use it in GitHub Desktop.
Convert UEFI BGRT image
#!/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
@Grief
Copy link

Grief commented May 9, 2023

Thanks!
foo

@sstallion
Copy link
Author

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment