diff --git a/.github/workflows/.ymllint b/.github/workflows/.ymllint new file mode 100644 index 0000000..b96cefb --- /dev/null +++ b/.github/workflows/.ymllint @@ -0,0 +1,3 @@ +rules: + + line-length: disable diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4691f92..e109f76 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,13 +5,55 @@ on: [push] jobs: - build: + Kernel: runs-on: ubuntu-22.04 steps: + - name: Free up disk space for the CI + uses: AdityaGarg8/remove-unwanted-software@v1 + with: + remove-android: 'true' + remove-dotnet: 'true' + remove-haskell: 'false' + - uses: actions/checkout@v2 + - name: Build kernel with internal SSD removed + run: | + VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2) + REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) + echo "::set-output name=tag::${VERSION}-${REL}" + sudo apt install git + mkdir /tmp/artifacts + git clone https://github.com/t2linux/T2-Ubuntu-Kernel.git + sed -i "s/LOCALVERSION=-t2/LOCALVERSION=-t2-external/g" ${{ github.workspace }}/T2-Ubuntu-Kernel/build.sh + cd ${{ github.workspace }}/T2-Ubuntu-Kernel/patches + wget https://github.com/AdityaGarg8/T2-Ubuntu/raw/ssd/ssd.patch + cd ${{ github.workspace }}/T2-Ubuntu-Kernel + sudo ./build.sh + sudo rm -r /root/work + sudo rm /tmp/artifacts/*dbg* + sudo rm /tmp/artifacts/*libc-dev* + - name: Release + if: github.ref == 'refs/heads/jammy' + uses: softprops/action-gh-release@v1 + with: + files: | + /tmp/artifacts/*.deb + tag_name: v${{ steps.build.outputs.tag }}-kernel + draft: false + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + ISO: + needs: [Kernel] + runs-on: ubuntu-22.04 + steps: - name: Build - run: sudo ./build.sh + run: | + cd ${{ github.workspace }} + sudo rm -r ${{ github.workspace }}/T2-Ubuntu-Kernel + sudo ./build.sh - name: print sha256sum run: cat output/sha256 @@ -20,8 +62,9 @@ jobs: id: tag run: | VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2) + REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) echo Version is $VER - echo "::set-output name=tag::${VER}" + echo "::set-output name=tag::${VER}-${REL}" - name: Upload iso artifact uses: actions/upload-artifact@v2 @@ -50,3 +93,12 @@ jobs: prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete kernel from releases + if: github.ref == 'refs/heads/jammy' + uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true + tag_name: v${{ steps.build.outputs.tag }}-kernel + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/instructions.txt b/.github/workflows/instructions.txt index b25c04d..09dfa5f 100644 --- a/.github/workflows/instructions.txt +++ b/.github/workflows/instructions.txt @@ -3,3 +3,5 @@ If you are facing blank screen after installation, try [booting using refind](ht Follow [this guide](https://wiki.t2linux.org/guides/wifi-bluetooth/) for Wi-Fi and Bluetooth to work. Users of **MacBookPro16,4** are recommended to use the safe graphics ISO as the kernel doesn't have the driver for their AMD Graphics Card. Rest users can use the normal ISO. + +The **t2-external** ISO has the internal SSD support removed in the kernel. This can be useful if you wish to install in an external SSD. After installation, you can update your kernel by running `update_t2_kernel` to a **t2** kernel which shall bring back external SSD support. diff --git a/build.sh b/build.sh index 3622ce5..f1ff7d0 100755 --- a/build.sh +++ b/build.sh @@ -36,7 +36,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" syslinux echo >&2 "===]> Info: Start loop... " -for ALTERNATIVE in t2 +for ALTERNATIVE in t2 t2-external do echo >&2 "===]> Info: Start building ${ALTERNATIVE}... " diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 704c314..1648a6a 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -67,10 +67,14 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" grub2 \ nautilus-admin -# This is not ideal, but it should work until the apt repo gets updated. - +if [[ ${ALTERNATIVE} = t2-external ]] +then +curl -L https://github.com/t2linux/T2-Ubuntu/releases/download/vKVER-PREL-kernel/linux-headers-KVER-${ALTERNATIVE}_KVER-PREL_amd64.deb > /tmp/headers.deb +curl -L https://github.com/t2linux/T2-Ubuntu/releases/download/vKVER-PREL-kernel/linux-image-KVER-${ALTERNATIVE}_KVER-PREL_amd64.deb > /tmp/image.deb +else curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/vKVER-PREL/linux-headers-KVER-${ALTERNATIVE}_KVER-PREL_amd64.deb > /tmp/headers.deb curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/vKVER-PREL/linux-image-KVER-${ALTERNATIVE}_KVER-PREL_amd64.deb > /tmp/image.deb +fi file /tmp/* apt install /tmp/headers.deb /tmp/image.deb