Skip to content

Commit

Permalink
Linux Mint
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaGarg8 committed May 9, 2024
1 parent 2f8304a commit 45eb9b8
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 225 deletions.
15 changes: 0 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,3 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "mainline"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "kubuntuMainline"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "kubuntuLTS"
169 changes: 110 additions & 59 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,134 @@ on:
[push, workflow_dispatch]

jobs:
Mainline:

Cinnamon:
runs-on: ubuntu-22.04
steps:
- name: 'Checkout LTS Repo'
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Build
run: sudo ./build.sh cinnamon

- name: print sha256sum
run: cat output/sha256*

- name: Get version
- name: Generate Tag
id: tag
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 mainline Repo'
uses: actions/checkout@v4
VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo Version is $VER
echo "isotag=${VER}-${REL}" >> $GITHUB_ENV
- name: Upload iso artifact
uses: actions/upload-artifact@v4
with:
ref: mainline
persist-credentials: false
name: mbp-linuxmint-cinnamon-${{ steps.tag.outputs.tag }}.z01
path: ${{ github.workspace }}/output/*

- name: 'Push new version to mainline'
id: publish
- name: Instructions for putting it back together
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: mainline
cat << EOF
Download all the artifacts, and put them in a folder
without other files. Then run:"
unzip "*.z??.zip"
cat livecd-${{ env.isotag }}-t2.z?? > cd.zip
echo unzip cd.zip
EOF
Kubuntu:
- name: Compress ISO
run: |
cd ${{ github.workspace }}
mkdir ISO
mv ${{ github.workspace }}/*.iso ${{ github.workspace }}/ISO
cd ISO
ISONAME=$(ls ${{ github.workspace }}/ISO | grep .iso | rev | cut -c 5- | rev)
tar -czvf ${ISONAME}.tar.gz ${ISONAME}.iso
ls -l
- name: Get the ISO script
run: |
sudo cp ${{ github.workspace }}/.github/workflows/iso.sh ${{ github.workspace }}/output/iso.sh
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
#files: ${{ github.workspace }}/ISO/*.tar.gz
#files: ${{ github.workspace }}/ISO/*.iso
files: ${{ github.workspace }}/output/*
tag_name: v${{ env.isotag }}
body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Mate:
runs-on: ubuntu-22.04
steps:
- name: 'Checkout LTS Repo'
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Build
run: sudo ./build.sh mate

- name: Get version
- name: print sha256sum
run: cat output/sha256*

- name: Generate Tag
id: tag
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 kubuntuLTS Repo'
uses: actions/checkout@v4
VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo Version is $VER
echo "isotag=${VER}-${REL}" >> $GITHUB_ENV
- name: Upload iso artifact
uses: actions/upload-artifact@v4
with:
ref: kubuntuLTS
persist-credentials: false
name: mbp-linuxmint-mate-${{ steps.tag.outputs.tag }}.z01
path: ${{ github.workspace }}/output/*

- name: 'Push new version to kubuntuLTS'
id: publish
- name: Instructions for putting it back together
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: kubuntuLTS
cat << EOF
Download all the artifacts, and put them in a folder
without other files. Then run:"
unzip "*.z??.zip"
cat livecd-${{ env.isotag }}-t2.z?? > cd.zip
echo unzip cd.zip
EOF
- name: Compress ISO
run: |
cd ${{ github.workspace }}
mkdir ISO
mv ${{ github.workspace }}/*.iso ${{ github.workspace }}/ISO
cd ISO
ISONAME=$(ls ${{ github.workspace }}/ISO | grep .iso | rev | cut -c 5- | rev)
tar -czvf ${ISONAME}.tar.gz ${ISONAME}.iso
ls -l
ISO:
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
#files: ${{ github.workspace }}/ISO/*.tar.gz
#files: ${{ github.workspace }}/ISO/*.iso
files: ${{ github.workspace }}/output/*
tag_name: v${{ env.isotag }}
body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
XFCE:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Build
run: sudo ./build_in_docker.sh
run: sudo ./build.sh xfce

- name: print sha256sum
run: cat output/sha256*
Expand All @@ -93,7 +148,7 @@ jobs:
- name: Upload iso artifact
uses: actions/upload-artifact@v4
with:
name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z01
name: mbp-linuxmint-xfce-${{ steps.tag.outputs.tag }}.z01
path: ${{ github.workspace }}/output/*

- name: Instructions for putting it back together
Expand All @@ -116,12 +171,8 @@ jobs:
tar -czvf ${ISONAME}.tar.gz ${ISONAME}.iso
ls -l
- name: Get the ISO script
run: |
sudo cp ${{ github.workspace }}/.github/workflows/iso.sh ${{ github.workspace }}/output/iso.sh
- name: Release
if: github.ref == 'refs/heads/LTS'
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
#files: ${{ github.workspace }}/ISO/*.tar.gz
Expand All @@ -132,4 +183,4 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 9 additions & 8 deletions 01_build_file_system.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#!/bin/bash
set -eu -o pipefail

echo >&2 "===]> Info: Checkout bootstrap... "
debootstrap \
--arch=amd64 \
--variant=minbase \
jammy \
"${CHROOT_PATH}" \
http://archive.ubuntu.com/ubuntu/
echo >&2 "===]> Info: Download ISO and Unsquash FS"
cd "${ROOT_PATH}"
wget "https://mirrors.edge.kernel.org/linuxmint/stable/${MINT_VERSION}/linuxmint-${MINT_VERSION}-${FLAVOUR}-64bit.iso"
mount "linuxmint-${MINT_VERSION}-${FLAVOUR}-64bit.iso" /mnt
cp /mnt/casper/filesystem.squashfs "${ROOT_PATH}"
unsquashfs "${ROOT_PATH}/filesystem.squashfs"
mv squashfs-root "${CHROOT_PATH}"


echo >&2 "===]> Info: Creating chroot environment... "
mount --bind /dev "${CHROOT_PATH}/dev"
mount --bind /run "${CHROOT_PATH}/run"

cp -r "${ROOT_PATH}/files" "${CHROOT_PATH}/tmp/setup_files"
chroot "${CHROOT_PATH}" /bin/bash -c "KERNEL_VERSION=${KERNEL_VERSION} /tmp/setup_files/chroot_build.sh"
chroot "${CHROOT_PATH}" /bin/bash -c "KERNEL_VERSION=${KERNEL_VERSION} CODENAME=${CODENAME} /tmp/setup_files/chroot_build.sh"

echo >&2 "===]> Info: Cleanup the chroot environment... "
# In docker there is no run?
Expand Down
2 changes: 1 addition & 1 deletion 02_build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ done

echo >&2 "===]> Info: Create diskdefines... "
cat <<EOF >"${IMAGE_PATH}"/README.diskdefines
#define DISKNAME Ubuntu MBP 22.04 LTS "Jammy Jellyfish" - Beta amd64
#define DISKNAME Linux Mint MBP ${MINT_VERSION} "Virginia" - Beta amd64
#define TYPE binary
#define TYPEbinary 1
#define ARCH amd64
Expand Down
4 changes: 2 additions & 2 deletions 04_create_iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo >&2 "===]> Info: Create Isolinux... "
xorriso -as mkisofs \
-iso-level 3 \
-full-iso9660-filenames \
-volid "UBUNTU_MBP" \
-volid "LINUXMINT_MBP" \
-b boot/grub/bios.img \
-no-emul-boot \
-boot-load-size 4 \
Expand All @@ -23,7 +23,7 @@ xorriso -as mkisofs \
-no-emul-boot \
-isohybrid-mbr "${ROOT_PATH}/files/isohdpfx.bin" \
-isohybrid-gpt-basdat -isohybrid-apm-hfsplus \
-output "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}.iso" \
-output "${ROOT_PATH}/linuxmint-${MINT_VERSION}-${FLAVOUR}-${KERNEL_VERSION}.iso" \
-graft-points \
"." \
/boot/grub/bios.img=isolinux/bios.img \
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# T2-Ubuntu
# T2-Mint

The ISOs from this repo should allow you to install Ubuntu without using an external keyboard or mouse on a T2 Mac.
The ISOs from this repo should allow you to install Linux Mint without using an external keyboard or mouse on a T2 Mac.

![CI](https://github.com/t2linux/T2-Ubuntu/actions/workflows/CI.yml/badge.svg?branch=jammy)
![CI](https://github.com/t2linux/T2-Mint/actions/workflows/CI.yml/badge.svg?branch=main)

**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. Now we also support kubuntu thanks to [@lemmyg](https://github.com/lemmyg)!
Linux Mint ISO with Apple T2 patches built-in.

Apple T2 drivers are integrated with this iso.

This repo is a rework of the great work done by [@mikeeq](https://github.com/mikeeq/mbp-fedora). It originally was [@marcosfad's mbp-ubuntu repo](https://github.com/marcosfad/mbp-ubuntu) and has been transferred to [t2linux](https://github.com/t2linux).
This repo is a based on [T2-Ubuntu](https://github.com/t2linux/T2-Ubuntu.git).

Kernel is being used from - <https://github.com/t2linux/T2-Ubuntu-Kernel>

Expand All @@ -26,12 +26,12 @@ Bootloader is configure correctly out of the box. No workaround needed.
```bash
diskutil list # found which number has the USB
diskutil umountDisk /dev/diskX
sudo gdd bs=4M if=ubuntu-20.04-5.6.10-mbp.iso of=/dev/diskX conv=fdatasync status=progress
sudo gdd bs=4M if=linuxmint-21.3-cinnamon-6.8.9-t2-jammy.iso of=/dev/diskX conv=fdatasync status=progress
```
4. Boot in Recovery mode and allow booting unknown OS
5. Restart and immediately press the option key until the Logo come up
6. Select "EFI Boot" (the third option was the one that worked for me)
7. Launch Ubuntu Live
7. Launch Linux Mint Live
8. Use Ubiquity to install (just click on it)
9. Select the options that work for you and use for the partition the following setup:
* Leave the efi boot as preselected by the installer, unless you require a [separate efi partition](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions).
Expand Down
Loading

0 comments on commit 45eb9b8

Please sign in to comment.