Chain kernel build commands together

This commit is contained in:
Waldemar Tomme 2024-12-28 17:08:24 +01:00
parent 93c8745a2e
commit 6c3165e432

View File

@ -83,19 +83,18 @@
[[ -d "$rootDir/.repos/mainline-kernel" ]] || git clone git@github.com:WiiPlayer2/linux-sm7150.git "$rootDir/.repos/mainline-kernel"
'')
(writeScriptBin "build-and-flash-kernel" ''
#!/usr/bin/env -S bash -e
#!/usr/bin/env bash
rootDir="${rootDir}"
pmbootstrap --version
pushd $rootDir/.repos/mainline-kernel
trap "popd" EXIT
source $(pmbootstrap-envkernel)
if [[ ! -e ".output/.config" ]]; then
make defconfig sm7150.config
fi
make -j$(nproc)
pmbootstrap build --envkernel linux-postmarketos-qcom-sm7150
pmbootstrap flasher --method fastboot flash_kernel
fastboot reboot
source $(pmbootstrap-envkernel) && \
( [[ ! -e ".output/.config" ]] || make defconfig sm7150.config ) && \
make -j$(nproc) && \
pmbootstrap build --envkernel linux-postmarketos-qcom-sm7150 && \
pmbootstrap flasher --method fastboot flash_kernel && \
fastboot reboot
popd
'')
];
};