-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build_kernel: Alignment with previous commits
- Loading branch information
Showing
4 changed files
with
135 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Build release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_squeak: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [A546E, A546B] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: rokibhasansagar/slimhub_actions@main | ||
|
||
- name: Set up build environment | ||
run: | | ||
sudo apt update && sudo apt upgrade | ||
sudo apt autoremove -y | ||
sudo apt install -yq tar \ | ||
attr libelf-dev dwarves rsync libbrotli-dev \ | ||
libgtest-dev libprotobuf-dev libunwind-dev libusb-1.0-0-dev libzstd-dev libc6-dev \ | ||
linux-modules-extra-$(uname -r) build-essential p7zip-full libarchive-tools | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: Fetch ToolChain | ||
run: | | ||
mkdir -p ~/Prebuilts | ||
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86 ~/Prebuilts/gl-clang | ||
rm -rf ~/Prebuilts/gl-clang/clang-3* ~/Prebuilts/gl-clang/clang-r4* ~/Prebuilts/gl-clang/clang-r51* ~/Prebuilts/gl-clang/.git | ||
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gas/linux-x86 ~/Prebuilts/gas/linux-x86 | ||
rm -rf ~/Prebuilts/gas/linux-x86/.git | ||
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/build-tools ~/Prebuilts/build-tools | ||
rm -rf ~/Prebuilts/build-tools/.git | ||
- name: Fetch AnyKernel3 | ||
run: | | ||
git clone --branch a54x https://github.com/Vaz15k/AnyKernel3.git ~/AnyKernel3 | ||
mkdir -p ~/files | ||
- name: Set date variable | ||
id: date | ||
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Fetch Magiskboot and KSUD tools | ||
run: | | ||
mkdir -p ~/bin | ||
curl -o ~/bin/magiskboot https://raw.githubusercontent.com/Vaz15k/literate-potato/master/Tools/magiskboot | ||
chmod a+x ~/bin/magiskboot | ||
sudo ln -sf ~/bin/magiskboot /usr/bin/magiskboot | ||
curl -o ~/bin/ksud https://raw.githubusercontent.com/Vaz15k/literate-potato/master/Tools/ksud | ||
chmod a+x ~/bin/ksud | ||
sudo ln -sf ~/bin/ksud /usr/bin/ksud | ||
- name: Download Images | ||
run: | | ||
mkdir -p ~/mkboot | ||
if [[ "${{ matrix.target }}" == "A546B" ]]; then | ||
wget -t 3 --timeout=30 https://vaz15k.github.io/literate-potato/Imagens/A546B/boot.img -O ~/mkboot/boot_A546B.img || curl -o ~/mkboot/boot_A546B.img https://raw.githubusercontent.com/Vaz15k/literate-potato/master/Imagens/A546B/boot.img | ||
wget -t 3 --timeout=30 https://vaz15k.github.io/literate-potato/Imagens/A546B/init_boot.img -O ~/mkboot/init_boot_A546B.img || curl -o ~/mkboot/init_boot_A546B.img https://raw.githubusercontent.com/Vaz15k/literate-potato/master/Imagens/A546B/init_boot.img | ||
elif [[ "${{ matrix.target }}" == "A546E" ]]; then | ||
wget -t 3 --timeout=30 https://vaz15k.github.io/literate-potato/Imagens/A546E/boot.img -O ~/mkboot/boot_A546E.img || curl -o ~/mkboot/boot_A546E.img https://raw.githubusercontent.com/Vaz15k/literate-potato/master/Imagens/A546E/boot.img | ||
wget -t 3 --timeout=30 https://vaz15k.github.io/literate-potato/Imagens/A546E/init_boot.img -O ~/mkboot/init_boot_A546E.img || curl -o ~/mkboot/init_boot_A546E.img https://raw.githubusercontent.com/Vaz15k/literate-potato/master/Imagens/A546E/init_boot.img | ||
fi | ||
- name: Build Kernel Clean | ||
run: | | ||
./build_kernel.sh ${{ matrix.target }} | ||
cp ~/AnyKernel3/Squeak* ~/files | ||
- name: Create LKM Kernel | ||
run: | | ||
cp ~/AnyKernel3/Image ~/mkboot/kernel | ||
cd ~/mkboot | ||
echo "Repacking boot image..." | ||
magiskboot repack boot_${{ matrix.target }}.img boot.img | ||
ksud boot-patch -b init_boot_${{ matrix.target }}.img --kmi android13-5.15 --magiskboot ~/bin/magiskboot | ||
mv kernelsu* init_boot.img | ||
echo "Checking existence of images..." | ||
if [[ -f "boot.img" && -f "init_boot.img" ]]; then | ||
echo "Creating tar archive..." | ||
tar -cvf Squeak_KSU-LKM_${{ matrix.target }}_${{ env.DATE }}.tar boot.img init_boot.img | ||
else | ||
echo "Error: One or both images not found!" | ||
exit 1 | ||
fi | ||
mv Squeak* ~/files | ||
echo "Completed successfully." | ||
- name: Build Kernel With KSU | ||
run: | | ||
rm -rf ~/mkboot | ||
./build_kernel.sh ${{ matrix.target }} --ksu | ||
cp ~/AnyKernel3/Squeak* ~/files | ||
- name: Publish to GitHub | ||
id: release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: /home/runner/files/Squeak* | ||
name: Squeak Kernel - ${{ env.DATE }} | ||
tag_name: "${{ env.DATE }}" | ||
body: | | ||
- **Kernel Version:** 5.15.123 | ||
- **Clang Version:** Clang-r522817 | ||
:rocket: *Built with love by GitHub Actions.* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters