- uses: actions/checkout@v2
- name: Install requires packages
- run: sudo apt install build-essential uuid-dev iasl git nasm python3-distutils gcc-aarch64-linux-gnu abootimg
+ run: sudo apt install build-essential uuid-dev iasl git nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git
- name: Build all devices
run: ./build.sh -a
\r
```bash\r
sudo apt update\r
-sudo apt install build-essential uuid-dev iasl git nasm python3-distutils gcc-aarch64-linux-gnu abootimg\r
+sudo apt install build-essential uuid-dev iasl git nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git\r
```\r
Ubuntu 20.04 is also proved to be fine.\r
\r
import time
ohmydate = str(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
-import sys
+import sys
pwd = sys.path[0]
import PIL
from PIL import Image
from PIL import ImageDraw
from git import Repo
-
+
imageFile = pwd + "/Logo.bmp"
file_save_dir = pwd + "/../sdm845Pkg/Drivers/LogoDxe/"
outputName = "Logo"
print(ohmydate)
-
+
repoPath = pwd + "/.."
repo = Repo(repoPath)
gitHead = str(repo.head.commit)
print(gitHead)
strs = "head:" + gitHead + "\n Build:" + ohmydate
-
+
x = 1
y = 1
word_size = 11
word_css = pwd + "/NotoSerif-Italic.ttf"
-
+
#Set font
font = ImageFont.truetype(word_css,word_size)
-
im1=Image.open(imageFile)
draw = ImageDraw.Draw(im1)
print(font.getsize(strs))
draw.text((x, y),strs,(255,255,0),font=font)
-
new_filename = file_save_dir +outputName.replace(",","-").replace("\n","-")+".bmp"
-im1.save(new_filename)
+im1.save(new_filename)
del draw
im1.close()
make -C "${_EDK2}/BaseTools" -j "$(nproc)"||exit "$?"
# based on the instructions from edk2-platform
rm -f "boot_${DEVICE}.img" uefi_img "uefi-${DEVICE}.img.gz" "uefi-${DEVICE}.img.gz-dtb"
- python3 assets/generate-logo.py
build -s -n 0 -a AARCH64 -t GCC5 -p "sdm845Pkg/${DEVICE}.dsc"||return "$?"
gzip -c < workspace/Build/sdm845Pkg/DEBUG_GCC5/FV/SDM845PKG_UEFI.fd > "uefi-${DEVICE}.img.gz"||return "$?"
cat "uefi-${DEVICE}.img.gz" "device_specific/${DEVICE}.dtb" > "uefi-${DEVICE}.img.gz-dtb"||return "$?"
*)_help 1;;
esac
done
-if ! [ -d ../edk2 ]
-then echo "Updating submodules"
+if ! [ -f edk2/edksetup.sh ] || ! [ -f ../edk2/edksetup.sh ]
+then set -e
+ echo "Updating submodules"
git submodule init&&git submodule update
pushd edk2&&git submodule init&&git submodule update&&popd
pushd edk2-platforms&&git submodule init&&git submodule update&&popd
+ set +e
fi
for i in "${EDK2}" ./edk2 ../edk2
do if [ -n "${i}" ]&&[ -f "${i}/edksetup.sh" ]
export WORKSPACE="${PWD}/workspace"
echo > ramdisk
set -e
+python3 assets/generate-logo.py
if [ -z "${DEVICE}" ]
then _help 1
elif [ "${DEVICE}" == "all" ]