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