-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconvert_embed_splash.sh
executable file
·40 lines (28 loc) · 1.05 KB
/
convert_embed_splash.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# I found this method of adding a bootsplash to be the most reliable.
# For this to work you must build coreboot with all of the bootsplash
# options disabled.
usage() {
echo "$0 <path_to_coreboot_root> <path_to_bootsplash_img>"
exit 1
}
set -e
CBFPATH="$1/util/cbfstool/cbfstool"
ROMPATH="$1/build/coreboot.rom"
BOOTSPLASH="bootsplash_$(date +%s).bmp"
if [[ $# -ne 2 ]]
then
usage "$0"
fi
echo "[!!] Check the following:"
echo -e "[!!]\t- $2 has exactly 1366:768 dimensions"
echo -e "[!!]\t- $ROMPATH is built with bootsplash options disabled"
echo -e "[!!]\t- If you need to split the ROM to flash it, make sure to run"
echo -e "[!!]\t this script before you split it"
echo "[!!] [Enter] to continue, [Ctrl+C] to quit"
read a
echo "[*] Converting the bootsplash image... "
convert "$2" -alpha set -verbose -depth 32 "$BOOTSPLASH"
echo "[*] Adding the bootsplash to the rom... "
"$CBFPATH" "$ROMPATH" add -f "$BOOTSPLASH" -c lzma -n bootsplash.bmp.lzma -t raw
echo "[*] Bootsplash added to $ROMPATH. Converted bootsplash backup saved to $BOOTSPLASH"