Merge pull request #74 from AdityaGarg8/kinetic-16,4

Kinetic 16,4
This commit is contained in:
marcosfad 2023-02-07 19:33:45 -03:00 committed by GitHub
commit 06a7ef4d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 56 additions and 72 deletions

3
.github/workflows/.ymllint vendored Normal file
View File

@ -0,0 +1,3 @@
rules:
line-length: disable

View File

@ -8,10 +8,10 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build
run: sudo ./build.sh
run: sudo ./build_in_docker.sh
- name: print sha256sum
run: cat output/sha256
@ -20,8 +20,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 "tag=${VER}-${REL}" >> $GITHUB_OUTPUT
- name: Upload iso artifact
uses: actions/upload-artifact@v2
@ -40,11 +41,11 @@ jobs:
EOF
- name: Release
if: github.ref == 'refs/heads/jammy'
if: github.ref == 'refs/heads/kinetic-16,4'
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/*.iso
tag_name: v22.04-${{ steps.tag.outputs.tag }}
tag_name: v${{ steps.tag.outputs.tag }}
body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
draft: false
prerelease: false

View File

@ -1,3 +1,7 @@
If you are facing blank screen after installation, try [booting using refind](https://wiki.t2linux.org/guides/refind/).
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.
**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.

View File

@ -5,7 +5,7 @@ echo >&2 "===]> Info: Checkout bootstrap... "
debootstrap \
--arch=amd64 \
--variant=minbase \
jammy \
kinetic \
"${CHROOT_PATH}" \
http://archive.ubuntu.com/ubuntu/
@ -35,8 +35,3 @@ umount "${CHROOT_PATH}/dev"
echo >&2 "===]> Info: Patch Grub... "
cp -rfv "${ROOT_PATH}"/files/grub/30_os-prober "${CHROOT_PATH}"/etc/grub.d/30_os-prober
chmod 755 "${CHROOT_PATH}"/etc/grub.d/30_os-prober
### Copy suspend fix
echo >&2 "===]> Info: Fix suspend... "
cp -rfv "${ROOT_PATH}"/files/suspend/rmmod_tb.sh "${CHROOT_PATH}"/lib/systemd/system-sleep/rmmod_tb.sh
chmod +x "${CHROOT_PATH}"/lib/systemd/system-sleep/rmmod_tb.sh

View File

@ -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 Ubuntu MBP 22.10 "Kinetic Kudu" - Beta amd64
#define TYPE binary
#define TYPEbinary 1
#define ARCH amd64

View File

@ -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}/ubuntu-22.10-${KERNEL_VERSION}-safe-graphics.iso" \
-graft-points \
"." \
/boot/grub/bios.img=isolinux/bios.img \

View File

@ -2,7 +2,7 @@
The ISOs from this repo should allow you to install Ubuntu without using an external keyboard or mouse on a T2 Mac. It works in my MacBook Pro 16 inch, 2019.
[![CI](https://github.com/AdityaGarg8/mbp-ubuntu/actions/workflows/CI.yml/badge.svg)](https://github.com/marcosfad/mbp-ubuntu/actions/workflows/CI.yml)
![CI](https://github.com/AdityaGarg8/T2-Ubuntu/actions/workflows/CI.yml/badge.svg?branch=jammy-16,4)
**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/).**

View File

@ -5,7 +5,7 @@ ROOT_PATH=$(pwd)
WORKING_PATH=/root/work
CHROOT_PATH="${WORKING_PATH}/chroot"
IMAGE_PATH="${WORKING_PATH}/image"
KERNEL_VERSION=5.19.12
KERNEL_VERSION=6.1.9
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
@ -36,27 +36,29 @@ 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-kinetic
do
echo >&2 "===]> Info: Start building ${ALTERNATIVE}... "
echo >&2 "===]> Info: Build Ubuntu Jammy... "
echo >&2 "===]> Info: Build Ubuntu Kinetic... "
/bin/bash -c "
ROOT_PATH=${ROOT_PATH} \\
WORKING_PATH=${WORKING_PATH} \\
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
IMAGE_PATH=${IMAGE_PATH} \\
KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\
ALTERNATIVE=${ALTERNATIVE} \\
${ROOT_PATH}/01_build_file_system.sh
"
echo >&2 "===]> Info: Build Image Jammy... "
echo >&2 "===]> Info: Build Image Kinetic... "
/bin/bash -c "
ROOT_PATH=${ROOT_PATH} \\
WORKING_PATH=${WORKING_PATH} \\
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
IMAGE_PATH=${IMAGE_PATH} \\
KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\
ALTERNATIVE=${ALTERNATIVE} \\
${ROOT_PATH}/02_build_image.sh
"
@ -73,6 +75,7 @@ do
IMAGE_PATH=${IMAGE_PATH} \\
CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\
KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\
ALTERNATIVE=${ALTERNATIVE} \\
${ROOT_PATH}/04_create_iso.sh
"
livecd_exitcode=$?
@ -82,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/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.10-${KERNEL_VERSION}-${ALTERNATIVE}-safe-graphics.iso"
done
## Calculate sha256 sums of built ISO
sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256"

View File

@ -2,7 +2,7 @@
set -eu -o pipefail
DOCKER_IMAGE=ubuntu:20.04
DOCKER_IMAGE=ubuntu:22.10
docker pull ${DOCKER_IMAGE}
docker run \

View File

@ -11,17 +11,17 @@ mount none -t devpts /dev/pts
export HOME=/root
export LC_ALL=C
echo "ubuntu-jammy-live" >/etc/hostname
echo "ubuntu-kinetic-live" >/etc/hostname
echo >&2 "===]> Info: Configure and update apt... "
cat <<EOF >/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ kinetic main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ kinetic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ kinetic-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ kinetic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ kinetic-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ kinetic-updates main restricted universe multiverse
EOF
apt-get update
@ -55,7 +55,6 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
resolvconf \
net-tools \
wireless-tools \
wpagui \
locales \
initramfs-tools \
binutils \
@ -69,15 +68,16 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
# This is not ideal, but it should work until the apt repo gets updated.
curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/vKVER-PREL/linux-headers-KVER-t2_KVER-PREL_amd64.deb > /tmp/headers.deb
curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/vKVER-PREL/linux-image-KVER-t2_KVER-PREL_amd64.deb > /tmp/image.deb
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
file /tmp/*
apt install /tmp/headers.deb /tmp/image.deb
echo >&2 "===]> Info: Install window manager... "
apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
plymouth-theme-ubuntu-logo \
plymouth-theme-spinner \
plymouth-theme-ubuntu-text \
ubuntu-desktop-minimal \
ubuntu-gnome-wallpapers \
snapd
@ -101,7 +101,8 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
gcc \
dkms \
iwd \
apple-t2-audio-config
apple-t2-audio-config \
nvme-cli
echo >&2 "===]> Info: Change initramfs format (for grub)... "
sed -i "s/COMPRESS=lz4/COMPRESS=gzip/g" "/etc/initramfs-tools/initramfs.conf"
@ -112,30 +113,10 @@ echo >&2 "===]> Info: Configure drivers... "
#printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf
printf 'apple-bce' >>/etc/modules-load.d/t2.conf
printf '\n### apple-bce start ###\nhid-apple\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules
printf '\n### apple-bce start ###\nsnd\nsnd_pcm\napple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules
printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=1\n' >> /etc/modprobe.d/apple-tb.conf
#printf '\n# delay loading of the touchbar driver\ninstall apple-ib-tb /bin/sleep 7; /sbin/modprobe --ignore-install apple-ib-tb' >> /etc/modprobe.d/delay-tb.conf
echo '
#!/usr/bin/env bash
echo "Select Touch Bar mode"
echo
echo "0: Only show F1-F12"
echo "1: Show media and brightness controls, use the fn key to switch to F1-12"
echo "2: Show F1-F12, use the fn key to switch to media and brightness controls"
echo "3: Only show media and brightness controls"
echo "4: Only show the escape key"
read tb
echo "Changing default mode ..."
echo "# display f* key in touchbar" > /etc/modprobe.d/apple-tb.conf
echo "options apple-ib-tb fnmode=$tb" >> /etc/modprobe.d/apple-tb.conf
bash -c "echo $tb > /sys/class/input/*/device/fnmode"
echo "Done!"' | tee /usr/local/bin/touchbar >/dev/null
chmod a+x /usr/local/bin/touchbar
chown root:root /usr/local/bin/touchbar
echo >&2 "===]> Info: Update initramfs... "
## Add custom drivers to be loaded at boot
@ -158,13 +139,14 @@ 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.19.0-21 \
linux-headers-5.19.0-21-generic \
linux-headers-generic \
linux-image-5.15.0-30-generic \
linux-image-5.19.0-21-generic \
linux-image-generic \
linux-modules-5.15.0-30-generic \
linux-modules-extra-5.15.0-30-generic
linux-modules-5.19.0-21-generic \
linux-modules-extra-5.19.0-21-generic \
gedit
apt-get autoremove -y
@ -173,8 +155,6 @@ echo >&2 "===]> Info: Reconfigure environment ... "
locale-gen --purge en_US.UTF-8 en_US
printf 'LANG="C.UTF-8"\nLANGUAGE="C.UTF-8"\n' >/etc/default/locale
dpkg-reconfigure -f readline resolvconf
cat <<EOF >/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

View File

@ -6,22 +6,26 @@ insmod all_video
set default="0"
set timeout=30
menuentry "Try Ubuntu Jammy without installing" {
menuentry "Try Ubuntu Kinetic Kudu without installing" {
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro pcie_ports=compat intel_iommu=on iommu=pt ---
initrd /casper/initrd
}
menuentry "Try Ubuntu Jammy without installing (Safe Graphics)" {
menuentry "Try Ubuntu Kinetic Kudu without installing (Safe Graphics)" {
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro nomodeset pcie_ports=compat intel_iommu=on iommu=pt ---
initrd /casper/initrd
}
menuentry "Install Ubuntu Jammy" {
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity pcie_ports=compat intel_iommu=on iommu=pt ---
menuentry "Try Ubuntu Kinetic Kudu without installing (Safe graphics and NVMe blacklisted)" {
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro nomodeset pcie_ports=compat intel_iommu=on iommu=pt modprobe.blacklist=nvme ---
initrd /casper/initrd
}
menuentry "Install Ubuntu Jammy (Safe Graphics)" {
menuentry "Install Ubuntu Kinetic Kudu (Safe Graphics)" {
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity nomodeset pcie_ports=compat intel_iommu=on iommu=pt ---
initrd /casper/initrd
}
menuentry "Install Ubuntu Kinetic Kudu (Safe Graphics and NVMe blacklisted)" {
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity nomodeset pcie_ports=compat intel_iommu=on iommu=pt modprobe.blacklist=nvme ---
initrd /casper/initrd
}
menuentry "Check disc for defects" {
linux /casper/vmlinuz boot=casper integrity-check enforcing=0 efi=noruntime pcie_ports=compat ---
initrd /casper/initrd

View File

@ -8,4 +8,4 @@
# 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
d-i debian-installer/add-kernel-opts string nomodeset pcie_ports=compat intel_iommu=on iommu=pt

View File

@ -1,6 +0,0 @@
#!/bin/sh
if [ "${1}" = "pre" ]; then
modprobe -r apple_ib_tb
elif [ "${1}" = "post" ]; then
modprobe apple_ib_tb
fi