|
|
@@ -266,15 +266,103 @@ jobs:
|
|
|
# Create gzip of the Image file
|
|
|
gzip -n -k -f -9 ./Image > ./Image.gz
|
|
|
|
|
|
- - name: Run Boot Image Build Script
|
|
|
+ - name: Create ZIP Files for Different Formats
|
|
|
run: |
|
|
|
- chmod +x .github/scripts/bootimg.sh
|
|
|
- .github/scripts/bootimg.sh
|
|
|
+ echo "Creating zip files for all formats..."
|
|
|
+ cd ./AnyKernel3
|
|
|
+
|
|
|
+ # Create and upload zip for each format
|
|
|
+ ZIP_NAME="${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-AnyKernel3.zip"
|
|
|
+ echo "Creating zip file: $ZIP_NAME..."
|
|
|
+ mv ../Image ./Image
|
|
|
+ zip -r "../$ZIP_NAME" ./*
|
|
|
+ rm ./Image
|
|
|
+
|
|
|
+ ZIP_NAME="${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-AnyKernel3-lz4.zip"
|
|
|
+ echo "Creating zip file: $ZIP_NAME..."
|
|
|
+ mv ../Image.lz4 ./Image.lz4
|
|
|
+ zip -r "../$ZIP_NAME" ./*
|
|
|
+ rm ./Image.lz4
|
|
|
|
|
|
- - name: Run AnyKernel3 ZIP Packaging Script
|
|
|
+ ZIP_NAME="${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-AnyKernel3-gz.zip"
|
|
|
+ echo "Creating zip file: $ZIP_NAME..."
|
|
|
+ mv ../Image.gz ./Image.gz
|
|
|
+ zip -r "../$ZIP_NAME" ./*
|
|
|
+ rm ./Image.gz
|
|
|
+
|
|
|
+ - name: Run Boot Image ${{ inputs.android_version }} Build Script
|
|
|
+ if: ${{ inputs.android_version == 'android12' }}
|
|
|
run: |
|
|
|
- chmod +x .github/scripts/anykernel3.sh
|
|
|
- .github/scripts/anykernel3.sh
|
|
|
+ echo "Changing to configuration directory: $CONFIG..."
|
|
|
+ cd bootimgs
|
|
|
+
|
|
|
+ GKI_URL=https://dl.google.com/android/gki/gki-certified-boot-android12-5.10-"${{ inputs.os_patch_level }}"_r1.zip
|
|
|
+ FALLBACK_URL=https://dl.google.com/android/gki/gki-certified-boot-android12-5.10-2023-01_r1.zip
|
|
|
+
|
|
|
+ # Check if the GKI URL is available
|
|
|
+ echo "Checking if GKI kernel URL is reachable: $GKI_URL"
|
|
|
+ status=$(curl -sL -w "%{http_code}" "$GKI_URL" -o /dev/null)
|
|
|
+
|
|
|
+ if [ "$status" = "200" ]; then
|
|
|
+ echo "[+] Downloading from GKI_URL"
|
|
|
+ curl -Lo gki-kernel.zip "$GKI_URL"
|
|
|
+ else
|
|
|
+ echo "[+] $GKI_URL not found, using $FALLBACK_URL"
|
|
|
+ curl -Lo gki-kernel.zip "$FALLBACK_URL"
|
|
|
+ fi
|
|
|
+
|
|
|
+ # Unzip the downloaded kernel and remove the zip
|
|
|
+ echo "Unzipping the downloaded kernel..."
|
|
|
+ unzip gki-kernel.zip && rm gki-kernel.zip
|
|
|
+
|
|
|
+ echo "Unpacking boot.img..."
|
|
|
+ FULL_PATH=$(pwd)/boot-5.10.img
|
|
|
+ echo "Unpacking using: $FULL_PATH"
|
|
|
+
|
|
|
+ echo "Running unpack_bootimg.py..."
|
|
|
+ $UNPACK_BOOTIMG --boot_img="$FULL_PATH"
|
|
|
+
|
|
|
+ echo "Building Image.gz"
|
|
|
+ gzip -n -k -f -9 ./Image > ./Image.gz
|
|
|
+
|
|
|
+ echo "Building boot.img"
|
|
|
+ $MKBOOTIMG --header_version 4 --kernel Image --output boot.img --ramdisk out/ramdisk --os_version 12.0.0 --os_patch_level "${{ inputs.os_patch_level }}"
|
|
|
+ $AVBTOOL add_hash_footer --partition_name boot --partition_size $((64 * 1024 * 1024)) --image boot.img --algorithm SHA256_RSA2048 --key $BOOT_SIGN_KEY_PATH
|
|
|
+ cp ./boot.img ../${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-boot.img
|
|
|
+
|
|
|
+ echo "Building boot-gz.img"
|
|
|
+ $MKBOOTIMG --header_version 4 --kernel Image.gz --output boot-gz.img --ramdisk out/ramdisk --os_version 12.0.0 --os_patch_level "${{ inputs.os_patch_level }}"
|
|
|
+ $AVBTOOL add_hash_footer --partition_name boot --partition_size $((64 * 1024 * 1024)) --image boot-gz.img --algorithm SHA256_RSA2048 --key $BOOT_SIGN_KEY_PATH
|
|
|
+ cp ./boot-gz.img ../${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-boot-gz.img
|
|
|
+
|
|
|
+ echo "Building boot-lz4.img"
|
|
|
+ $MKBOOTIMG --header_version 4 --kernel Image.lz4 --output boot-lz4.img --ramdisk out/ramdisk --os_version 12.0.0 --os_patch_level "${{ inputs.os_patch_level }}"
|
|
|
+ $AVBTOOL add_hash_footer --partition_name boot --partition_size $((64 * 1024 * 1024)) --image boot-lz4.img --algorithm SHA256_RSA2048 --key $BOOT_SIGN_KEY_PATH
|
|
|
+ cp ./boot-lz4.img ../${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-boot-lz4.img
|
|
|
+
|
|
|
+ - name: Run Boot Image ${{ inputs.android_version }} Build Script
|
|
|
+ if: ${{ inputs.android_version == 'android13' || inputs.android_version == 'android14' || inputs.android_version == 'android15' }}
|
|
|
+ run: |
|
|
|
+ cd bootimgs
|
|
|
+
|
|
|
+ echo "Building Image.gz"
|
|
|
+ gzip -n -k -f -9 ./Image > ./Image.gz
|
|
|
+
|
|
|
+ echo "Building boot.img"
|
|
|
+ $MKBOOTIMG --header_version 4 --kernel Image --output boot.img
|
|
|
+ $AVBTOOL add_hash_footer --partition_name boot --partition_size $((64 * 1024 * 1024)) --image boot.img --algorithm SHA256_RSA2048 --key $BOOT_SIGN_KEY_PATH
|
|
|
+ cp ./boot.img ../${{ matrix.kernel_version }}.${{ matrix.sub_level }}-${{ matrix.android_version }}-${{ matrix.os_patch_level }}-boot.img
|
|
|
+
|
|
|
+ echo "Building boot-gz.img"
|
|
|
+ $MKBOOTIMG --header_version 4 --kernel Image.gz --output boot-gz.img
|
|
|
+ $AVBTOOL add_hash_footer --partition_name boot --partition_size $((64 * 1024 * 1024)) --image boot-gz.img --algorithm SHA256_RSA2048 --key $BOOT_SIGN_KEY_PATH
|
|
|
+ cp ./boot-gz.img ../${{ matrix.kernel_version }}.${{ matrix.sub_level }}-${{ matrix.android_version }}-${{ matrix.os_patch_level }}-boot-gz.img
|
|
|
+
|
|
|
+ echo "Building boot-lz4.img"
|
|
|
+ $MKBOOTIMG --header_version 4 --kernel Image.lz4 --output boot-lz4.img
|
|
|
+ $AVBTOOL add_hash_footer --partition_name boot --partition_size $((64 * 1024 * 1024)) --image boot-lz4.img --algorithm SHA256_RSA2048 --key $BOOT_SIGN_KEY_PATH
|
|
|
+ cp ./boot-lz4.img ../${{ matrix.kernel_version }}.${{ matrix.sub_level }}-${{ matrix.android_version }}-${{ matrix.os_patch_level }}-boot-lz4.img
|
|
|
+
|
|
|
|
|
|
- name: Upload Build Artifacts
|
|
|
uses: actions/upload-artifact@v4
|