From afa639411f793072fc128d2860985b3b0f8f9406 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Wed, 3 May 2023 12:37:49 +0530 Subject: [PATCH 01/10] Use uncompressed iso --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f3eb3e7..bfd4c65 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -120,7 +120,8 @@ jobs: if: github.ref == 'refs/heads/jammy' uses: softprops/action-gh-release@v1 with: - files: ${{ github.workspace }}/ISO/*.tar.gz + #files: ${{ github.workspace }}/ISO/*.tar.gz + files: ${{ github.workspace }}/ISO/*.iso tag_name: v${{ env.isotag }} body_path: ${{ github.workspace }}/.github/workflows/instructions.txt draft: false From 7dc814cab39b515504534d1da84e9c5be36d7841 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Sat, 6 May 2023 21:30:10 +0530 Subject: [PATCH 02/10] Notify users about kubuntu --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 846235e..0ac4eef 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The ISOs from this repo should allow you to install Ubuntu without using an exte **If this repo helped you in any way, consider inviting a coffee to the people in the [credits](https://github.com/AdityaGarg8/T2-Ubuntu#credits), [link](https://wiki.t2linux.org/contribute/).** -UBUNTU ISO with Apple T2 patches built-in. +Ubuntu ISO with Apple T2 patches built-in. Now we also support kubuntu thanks to [@lemmyg](https://github.com/lemmyg)! Apple T2 drivers are integrated with this iso. From d733ae1fab7bfc676d84fde57cd37ad8dc06ba34 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Mon, 22 May 2023 18:32:18 +0530 Subject: [PATCH 03/10] Use common ISO for all models --- .github/workflows/CI.yml | 36 ++---------------------------- .github/workflows/instructions.txt | 4 +++- build.sh | 2 +- files/grub/grub.cfg | 6 ++++- files/preseed/mbp164.seed | 11 +++++++++ 5 files changed, 22 insertions(+), 37 deletions(-) create mode 100644 files/preseed/mbp164.seed diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bfd4c65..b1ec1c2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,39 +38,6 @@ jobs: github_token: ${{ secrets.PAT }} branch: mainline - Safe-graphics: - runs-on: ubuntu-22.04 - steps: - - name: 'Checkout Jammy Repo' - uses: actions/checkout@v3 - - - name: Get version - run: | - VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2) - REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) - echo "ver=${VERSION}" >> $GITHUB_ENV - echo "release=${REL}" >> $GITHUB_ENV - - - name: 'Checkout jammy-16,4 Repo' - uses: actions/checkout@v3 - with: - ref: jammy-16,4 - persist-credentials: false - - - name: 'Push new version to jammy-16,4' - id: publish - run: | - sed -i "s/KERNEL_VERSION=6.*/KERNEL_VERSION=${{ env.ver }}/g" build.sh - sed -i "s/PKGREL=.*/PKGREL=${{ env.release }}/g" build.sh - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git commit -m "${{ env.ver }}-${{ env.release }}" -a - - name: Push changes to the repo - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.PAT }} - branch: jammy-16,4 - ISO: runs-on: ubuntu-22.04 steps: @@ -121,7 +88,8 @@ jobs: uses: softprops/action-gh-release@v1 with: #files: ${{ github.workspace }}/ISO/*.tar.gz - files: ${{ github.workspace }}/ISO/*.iso + #files: ${{ github.workspace }}/ISO/*.iso + files: ${{ github.workspace }}/output/* tag_name: v${{ env.isotag }} body_path: ${{ github.workspace }}/.github/workflows/instructions.txt draft: false diff --git a/.github/workflows/instructions.txt b/.github/workflows/instructions.txt index 7362f42..e4a22b0 100644 --- a/.github/workflows/instructions.txt +++ b/.github/workflows/instructions.txt @@ -2,6 +2,8 @@ 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. After installing, follow [this guide](https://wiki.t2linux.org/guides/hybrid-graphics/#macbookpro164) to enable Intel GPU for graphics acceleration. +Users of **MacBookPro16,4** are recommended to choose the **Safe Graphics** option from the grub menu while booting the ISO as the kernel doesn't have the driver for their AMD Graphics Card. Rest users can use the other options. After installing, follow [this guide](https://wiki.t2linux.org/guides/hybrid-graphics/#macbookpro164) to enable Intel GPU for graphics acceleration. **Getting kernel updates :-** Post installation, users are recommended to set up the [kernel update script](https://github.com/t2linux/T2-Ubuntu-Kernel#installation) to receive kernel updates. + +To make downloading the ISO easier, you can simply run the `iso.sh` script from the Assets below in macOS or Linux. \ No newline at end of file diff --git a/build.sh b/build.sh index f250776..ddfb7a9 100755 --- a/build.sh +++ b/build.sh @@ -85,7 +85,7 @@ do fi ## Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that cd "${ROOT_PATH}" - zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso" + zip -s 1500m "${ROOT_PATH}/output/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso" done ## Calculate sha256 sums of built ISO sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256" diff --git a/files/grub/grub.cfg b/files/grub/grub.cfg index e9c439e..fcfe3d9 100644 --- a/files/grub/grub.cfg +++ b/files/grub/grub.cfg @@ -11,7 +11,7 @@ menuentry "Try Ubuntu Jammy Jellyfish without installing" { initrd /casper/initrd } menuentry "Try Ubuntu Jammy Jellyfish without installing (Safe Graphics)" { - linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro nomodeset pcie_ports=compat intel_iommu=on iommu=pt --- + linux /casper/vmlinuz file=/cdrom/preseed/mbp164.seed boot=casper ro nomodeset pcie_ports=compat intel_iommu=on iommu=pt --- initrd /casper/initrd } menuentry "Try Ubuntu Jammy Jellyfish without installing (NVMe blacklisted)" { @@ -22,6 +22,10 @@ menuentry "Install Ubuntu Jammy Jellyfish" { linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity pcie_ports=compat intel_iommu=on iommu=pt --- initrd /casper/initrd } +menuentry "Install Ubuntu Jammy Jellyfish (Safe Graphics)" { + linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp164.seed boot=casper only-ubiquity nomodeset pcie_ports=compat intel_iommu=on iommu=pt --- + initrd /casper/initrd +} menuentry "Install Ubuntu Jammy Jellyfish (NVMe blacklisted)" { linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity pcie_ports=compat intel_iommu=on iommu=pt modprobe.blacklist=nvme --- initrd /casper/initrd diff --git a/files/preseed/mbp164.seed b/files/preseed/mbp164.seed new file mode 100644 index 0000000..49d0adb --- /dev/null +++ b/files/preseed/mbp164.seed @@ -0,0 +1,11 @@ +# Enable extras.ubuntu.com. +# d-i apt-setup/extra boolean true +# Install the Ubuntu desktop. +# tasksel tasksel/first multiselect ubuntu-desktop +# On live DVDs, don't spend huge amounts of time removing substantial +# application packages pulled in by language packs. Given that we clearly +# have the space to include them on the DVD, they're useful and we might as +# well keep them installed. +#ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org + +d-i debian-installer/add-kernel-opts string pcie_ports=compat intel_iommu=on iommu=pt nomodeset From cca4c15fe993de8ecea039536deabe60a3d6ee04 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Mon, 22 May 2023 18:40:09 +0530 Subject: [PATCH 04/10] 6.3.3 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ddfb7a9..37db0a7 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ ROOT_PATH=$(pwd) WORKING_PATH=/root/work CHROOT_PATH="${WORKING_PATH}/chroot" IMAGE_PATH="${WORKING_PATH}/image" -KERNEL_VERSION=6.3.1 +KERNEL_VERSION=6.3.3 PKGREL=1 sed -i "s/KVER/${KERNEL_VERSION}/g" $(pwd)/files/chroot_build.sh sed -i "s/PREL/${PKGREL}/g" $(pwd)/files/chroot_build.sh From 8caf25a01cc998fd303a00855076fe5456d405aa Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Mon, 22 May 2023 19:07:03 +0530 Subject: [PATCH 05/10] Fix build --- files/chroot_build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 59f4dc0..7264218 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -135,13 +135,13 @@ apt-get purge -y -qq \ vim \ binutils \ linux-generic \ - linux-headers-5.15.0-30 \ - linux-headers-5.15.0-30-generic \ + linux-headers-5.15.0-72 \ + linux-headers-5.15.0-72-generic \ linux-headers-generic \ - linux-image-5.15.0-30-generic \ + linux-image-5.15.0-72-generic \ linux-image-generic \ - linux-modules-5.15.0-30-generic \ - linux-modules-extra-5.15.0-30-generic + linux-modules-5.15.0-72-generic \ + linux-modules-extra-5.15.0-72-generic apt-get autoremove -y From dd4c5e610ea293f5d98a6d8e12efe5bc2a3ffeeb Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Mon, 22 May 2023 19:55:19 +0530 Subject: [PATCH 06/10] Release sha256sum --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 37db0a7..69de4aa 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ do zip -s 1500m "${ROOT_PATH}/output/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso" done ## Calculate sha256 sums of built ISO -sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256" +sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256-ubuntu-22.04" find ./ | grep ".iso" find ./ | grep ".zip" From 481487681037a1a74bd5d7f916a13c1b17707fd1 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Mon, 22 May 2023 20:24:19 +0530 Subject: [PATCH 07/10] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b1ec1c2..f71fccb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -47,7 +47,7 @@ jobs: run: sudo ./build_in_docker.sh - name: print sha256sum - run: cat output/sha256 + run: cat output/sha256* - name: Generate Tag id: tag From 6c74455c702f520e7f0f3b59f4faebcb9e1c9b5d Mon Sep 17 00:00:00 2001 From: Aditya Garg Date: Sat, 3 Jun 2023 14:05:25 +0530 Subject: [PATCH 08/10] 6.3.5 --- .github/workflows/CI.yml | 4 ++ .github/workflows/iso.sh | 131 +++++++++++++++++++++++++++++++++++++++ build.sh | 2 +- 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/iso.sh diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f71fccb..32dfd46 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -83,6 +83,10 @@ jobs: tar -czvf ${ISONAME}.tar.gz ${ISONAME}.iso ls -l + - name: Get the ISO script + run: | + cp ${{ github.workspace }}/.github/workflows/iso.sh ${{ github.workspace }}/output/iso.sh + - name: Release if: github.ref == 'refs/heads/jammy' uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/iso.sh b/.github/workflows/iso.sh new file mode 100644 index 0000000..67ba200 --- /dev/null +++ b/.github/workflows/iso.sh @@ -0,0 +1,131 @@ +#!/bin/bash + +os=$(uname -s) +case "$os" in + (Darwin) + true + ;; + (Linux) + true + ;; + (*) + echo "This script is meant to be run only on Linux or macOS" + exit 1 + ;; +esac + +echo -e "GET http://github.com HTTP/1.0\n\n" | nc github.com 80 > /dev/null 2>&1 + +if [ $? -eq 0 ]; then + true +else + echo "Please connect to the internet" + exit 1 +fi + +set -e + +cd $HOME/Downloads + +latest=$(curl -sL https://github.com/t2linux/T2-Ubuntu/releases/latest/ | grep "Release" | awk -F " " '{print $2}' ) +latestkver=$(echo $latest | cut -d "v" -f 2 | cut -d "-" -f 1) + +cat <<EOF + +Choose the flavour of Ubuntu you wish to install: + +1. Ubuntu +2. Kubuntu + +Type your choice (1 or 2) from the above list and press return. +EOF + +read flavinput + +case "$flavinput" in + (1) + flavour=ubuntu + ;; + (2) + flavour=kubuntu + ;; + (*) + echo "Invalid input. Aborting!" + exit 1 + ;; +esac + +cat <<EOF + +Choose the version of Ubuntu you wish to install: + +1. 22.04 LTS - Jammy Jellyfish +2. 23.04 - Lunar Lobstar + +Type your choice (1 or 2) from the above list and press return. +EOF + +read verinput + +case "$verinput" in + (1) + iso="${flavour}-22.04-${latestkver}-t2-jammy" + ver="22.04 LTS - Jammy Jellyfish" + ;; + (2) + iso="${flavour}-23.04-${latestkver}-t2-lunar" + ver="23.04 - Lunar Lobstar" + ;; + (*) + echo "Invalid input. Aborting!" + exit 1 + ;; +esac + +flavourcap=`echo ${flavour:0:1} | tr '[a-z]' '[A-Z]'`${flavour:1} + +echo -e "\nDownloading ${flavourcap} ${ver}" +echo -e "\nPart 1" +curl -#L https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/${iso}.z01 > ${iso}.z01 +echo -e "\nPart 2" +curl -#L https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/${iso}.zip > ${iso}.zip +echo -e "\nCreating ISO" + +isofinal=$RANDOM +zip -F ${iso}.zip --out ${isofinal}.zip > /dev/null +unzip ${isofinal}.zip > /dev/null +mv $HOME/Downloads/repo/${iso}.iso $HOME/Downloads + +echo -e "\nVerifying sha256 checksums" + +actual_iso_chksum=$(curl -sL https://github.com/t2linux/T2-Ubuntu/releases/download/${latest}/sha256-${flavour}-$(echo ${ver} | cut -d " " -f 1) | cut -d " " -f 1) + +case "$os" in + (Darwin) + downloaded_iso_chksum=$(shasum -a 256 $HOME/Downloads/${iso}.iso | cut -d " " -f 1) + ;; + (Linux) + downloaded_iso_chksum=$(sha256sum $HOME/Downloads/${iso}.iso | cut -d " " -f 1) + ;; + (*) + echo "This script is meant to be run only on Linux or macOS" + exit 1 + ;; +esac + +if [[ ${actual_iso_chksum} != ${downloaded_iso_chksum} ]] +then +echo -e "\nError: Failed to verify sha256 checksums of the ISO" +rm $HOME/Downloads/${iso}.iso +fi + +rm -r $HOME/Downloads/repo +rm $HOME/Downloads/${isofinal}.zip +rm $HOME/Downloads/${iso}.z?? + +if [[ ${actual_iso_chksum} != ${downloaded_iso_chksum} ]] +then +exit 1 +fi + +echo -e "\nISO saved to Downloads" diff --git a/build.sh b/build.sh index 69de4aa..6ed9a0c 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ ROOT_PATH=$(pwd) WORKING_PATH=/root/work CHROOT_PATH="${WORKING_PATH}/chroot" IMAGE_PATH="${WORKING_PATH}/image" -KERNEL_VERSION=6.3.3 +KERNEL_VERSION=6.3.5 PKGREL=1 sed -i "s/KVER/${KERNEL_VERSION}/g" $(pwd)/files/chroot_build.sh sed -i "s/PREL/${PKGREL}/g" $(pwd)/files/chroot_build.sh From 9696f0e962a4b141745cdf0fd7413b56e6ffb6f2 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Sat, 3 Jun 2023 14:32:47 +0530 Subject: [PATCH 09/10] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 32dfd46..b9047c3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -85,7 +85,7 @@ jobs: - name: Get the ISO script run: | - cp ${{ github.workspace }}/.github/workflows/iso.sh ${{ github.workspace }}/output/iso.sh + sudo cp ${{ github.workspace }}/.github/workflows/iso.sh ${{ github.workspace }}/output/iso.sh - name: Release if: github.ref == 'refs/heads/jammy' From c054ccdd1a7ad6a1d8b377244876f2ab8c6ac6bb Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Sun, 18 Jun 2023 10:14:07 +0530 Subject: [PATCH 10/10] 6.3.8 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 6ed9a0c..913e57a 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ ROOT_PATH=$(pwd) WORKING_PATH=/root/work CHROOT_PATH="${WORKING_PATH}/chroot" IMAGE_PATH="${WORKING_PATH}/image" -KERNEL_VERSION=6.3.5 +KERNEL_VERSION=6.3.8 PKGREL=1 sed -i "s/KVER/${KERNEL_VERSION}/g" $(pwd)/files/chroot_build.sh sed -i "s/PREL/${PKGREL}/g" $(pwd)/files/chroot_build.sh