Protect signing key from regeneration for kernel build.

This commit is contained in:
Captain ALM 2024-08-17 14:49:52 +01:00
parent efa978da0b
commit b196609b9d
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -49,11 +49,11 @@ function kernel-build() {
fakeroot debian/rules clean;
mkdir -p debian/build/build-generic/certs;
sudo cp /cert/mok/signing_key.pem debian/build/build-generic/certs/;
sudo chmod u=rw,g=rw,o=rw debian/build/build-generic/certs/signing_key.pem;
sudo chmod u=rw,g=r,o=r debian/build/build-generic/certs/signing_key.pem;
echo "[*] Building kernel...";
fakeroot debian/rules binary;
echo "[*] Build Complete!";
rm -f debian/build/build-generic/certs/signing_key.pem;
sudo rm -f debian/build/build-generic/certs/signing_key.pem;
echo "[+] Extracting kernel package...";
cd ~/kernel;
mkdir -p deb-contents;