Merge pull request #73 from AdityaGarg8/jammy

Update to new kernels
This commit is contained in:
marcosfad 2023-02-07 19:22:56 -03:00 committed by GitHub
commit 8a078f1bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 173 additions and 154 deletions

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

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

View File

@ -5,10 +5,76 @@ on:
[push]
jobs:
build:
runs-on: ubuntu-latest
Kinetic:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- 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 kinetic Repo'
uses: actions/checkout@v3
with:
ref: kinetic
persist-credentials: false
- name: 'Push new version to kinetic'
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: kinetic
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:
- uses: actions/checkout@v3
- name: Build
run: sudo ./build.sh
@ -20,8 +86,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 "isotag=${VER}-${REL}" >> $GITHUB_ENV
- name: Upload iso artifact
uses: actions/upload-artifact@v2
@ -35,15 +102,18 @@ jobs:
Download all the artifacts, and put them in a folder
without other files. Then run:"
unzip "*.z??.zip"
cat livecd-${{ steps.tag.outputs.tag }}-mbp.z?? > cd.zip
cat livecd-${{ env.isotag }}-t2.z?? > cd.zip
echo unzip cd.zip
EOF
- name: Release
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/jammy'
uses: softprops/action-gh-release@v1
with:
data: ${{ github.workspace }}/output/*
tag_name: v20.04-${{ steps.tag.outputs.tag }}
draft: true
files: ${{ github.workspace }}/*.iso
tag_name: v${{ env.isotag }}
body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

7
.github/workflows/instructions.txt vendored Normal file
View File

@ -0,0 +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 \
focal \
jammy \
"${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 20.04 LTS "Focal Fossa" - Beta amd64
#define DISKNAME Ubuntu MBP 22.04 LTS "Jammy Jellyfish" - 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-20.04-${KERNEL_VERSION}.iso" \
-output "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}.iso" \
-graft-points \
"." \
/boot/grub/bios.img=isolinux/bios.img \

View File

@ -1,18 +1,18 @@
# mbp-ubuntu
# T2-Ubuntu
The ISO in from this repo should allow you to install ubuntu without using an external keyboard or mouse on a MacBook Pro. It work in my MacBook with T2.
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/marcosfad/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)
**If this repo helped you in any way, consider inviting a coffee to the people in the [credits](https://github.com/marcosfad/mbp-ubuntu#credits) or [me](https://paypal.me/marcosfad).**
**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 20.04 ISO with Apple T2 patches built-in.
UBUNTU 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)
This repo is a rework of the great work done by [@mikeeq](https://github.com/mikeeq/mbp-fedora) and [@marcosfad](https://github.com/marcosfad/mbp-ubuntu)
I'm using the Kernel from - <https://github.com/marcosfad/mbp-ubuntu-kernel>
I'm using the Kernel from - <https://github.com/t2linux/T2-Ubuntu-Kernel>
Using additional drivers:
- [Apple T2 (apple-bce) (audio, keyboard, touchpad)](https://github.com/t2linux/apple-bce-drv)
@ -20,16 +20,10 @@ Using additional drivers:
Bootloader is configure correctly out of the box. No workaround needed.
## Before I begin, what version should I use? "mbp" or "mbp-16x-wifi"?
The difference between the two is that the mbp-16x-wifi version includes a different version of the brcmfmac wifi driver, made by corellium for M1 macs. This version of the wifi driver works on some models that the brcmfmac driver included with the mbp version doesn't support. Refer to the table on [this page](https://wiki.t2linux.org/guides/wifi/) to figure out which versions will work (Look at the "Firmware Options" column, Mojave means you can use the "mbp" version, and Big Sur means you can use the "mbp-16x-wifi" version).
**!! Please note that as of the v20.04-5.10.52 release, the mbp-16x-wifi iso does not support wifi on models with the BCM4377 chipset. For now, you can install a kernel from [here](https://github.com/AdityaGarg8/mbp-16.x-ubuntu-kernel/releases/tag/v5.13.12-1) after installing ubuntu if you have the BCM4377 chipset.**
## Installation
1. Reduce the size of the mac partition in MacOS
2. Download ISO file from releases. (Use the command line to unzip (`unzip /path/to/file.zip`) or "The Unarchiver" app)
2. Download ISO file from releases.
3. Copy it to a USB using dd (or gdd if installed over brew):
```bash
diskutil list # found which number has the USB
@ -42,12 +36,11 @@ sudo gdd bs=4M if=ubuntu-20.04-5.6.10-mbp.iso of=/dev/diskX conv=fdatasync statu
7. Launch Ubuntu 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. Your Mac will keep on working with out problems.
* Add a ext4 partition and mounted as `/boot` (1024MB).
* Add a ext4 partition and monted as `/` (rest).
* Select the `/boot` partition as a target for GRUB installation, otherwise the system won't boot.
10. Run the installer (In my case it had some problem removing some packages at the end, but this is no real problem)
11. Shutdown and remove the USB Drive
* 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).
* Add a ext4 partition and monted as `/`.
* Swap and other partitions are optional.
10. Run the installer.
11. Shutdown and remove the USB Drive.
12. Start again using the option key. Select the new efi boot.
13. Enjoy.
@ -62,8 +55,6 @@ sudo gdd bs=4M if=ubuntu-20.04-5.6.10-mbp.iso of=/dev/diskX conv=fdatasync statu
options hid_apple swap_fn_leftctrl=1
options hid_apple swap_opt_cmd=1
```
- I switch the touchbar to show f* by default. If you like another configuration, change /etc/modprobe.d/apple-tb.conf or remove it.
- To update grub, run: `grub-mkconfig -o /boot/grub/grub.cfg`
## MISC
@ -79,46 +70,26 @@ and then:
## Update to newer kernels
**IF YOU UPDATE THE KERNEL, REMEMBER TO ADD THE REQUIRED DRIVERS AGAIN.**
### The easy way:
The live cd includes dkms and will automatically run when a new kernel is installed. You can use `dkms status` to see it.
If you are upgrading from 5.7.19 to a newer kernel version (5.10+), you will need updated versions of these kernel modules. Instructions for installing updated ones are [here](https://wiki.t2linux.org/guides/dkms/).
### Another way:
Check <https://github.com/marcosfad/mbp-ubuntu/blob/master/files/chroot_build.sh> to see how it is done.
Follow [this guide](https://github.com/t2linux/T2-Ubuntu-Kernel#pre-installation-steps).
## Know issues
- Sound is not working after the install. Follow the instructions detailed by @kevineinarsson: <https://gist.github.com/kevineinarsson/8e5e92664f97508277fefef1b8015fba>
On MBP 16,1, you might also need to disable realtime scheduling if the above gist doesn't work, because the pulseaudio server might get killed if the realtime budget is exceeded (<https://bugs.freedesktop.org/show_bug.cgi?id=94629>). Just add `realtime-scheduling = no` to `/etc/pulse/daemon.conf`.
- Checksum is failing for 2 files: md5sum.txt and /boot/grub/bios.img
- I'm having troubles shutting down ubuntu. Screen is black but fan keeps on working. I have to force shutdown.
- Checksum is failing for 2 files: md5sum.txt and /boot/grub/bios.img
## Not working (Following the mikeeq/mbp-fedora)
- Dynamic audio input/output change (on connecting/disconnecting headphones jack)
- TouchID - (@MCMrARM is working on it - https://github.com/Dunedan/mbp-2016-linux/issues/71#issuecomment-528545490)
- TouchID
- Thunderbolt (is disabled, because driver was causing kernel panics (not tested with 5.5 kernel))
- Microphone (it's recognised with new apple t2 sound driver, but there is a low mic volume amp)
## TODO
## Known issues
- ISO is using gzip initramfs. It would be great to change it lz4
- Optimize the software installed.
## Known issues (Following the mikeeq/mbp-fedora)
- Kernel/Mac related issues are mentioned in kernel repo
- `ctrl+x` is not working in GRUB, so if you are trying to change kernel parameters - start your OS by clicking `ctrl+shift+f10` on external keyboard
- `ctrl+x` is not working in GRUB, so if you are trying to change kernel parameters - start your OS by pressing `F10` on external keyboard
## Docs
- Discord: <https://discord.gg/Uw56rqW> Shout out to the great community support. If you are not there yet, you must definitely join us.
- WiFi firmware: <https://packages.aunali1.com/apple/wifi-fw/18G2022>
- Linux on a MBP Late 2016: <https://gist.github.com/gbrow004/096f845c8fe8d03ef9009fbb87b781a4>
- Repack Bootable ISO: <https://wiki.debian.org/RepackBootableISO>
- <https://github.com/syzdek/efibootiso>
@ -148,6 +119,7 @@ On MBP 16,1, you might also need to disable realtime scheduling if the above gis
## Credits
- @mikeeq - thanks for the amazing work in mbp-fedora
- @marcosfad - thanks for the original work in mbp-ubuntu
- @MCMrARM - thanks for all RE work
- @ozbenh - thanks for submitting NVME patch
- @roadrunner2 - thanks for SPI (touchbar) driver

View File

@ -5,7 +5,10 @@ ROOT_PATH=$(pwd)
WORKING_PATH=/root/work
CHROOT_PATH="${WORKING_PATH}/chroot"
IMAGE_PATH="${WORKING_PATH}/image"
KERNEL_VERSION=5.10.52
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
if [ -d "$WORKING_PATH" ]; then
rm -rf "$WORKING_PATH"
@ -33,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 mbp mbp-16x-wifi
for ALTERNATIVE in t2-jammy
do
echo >&2 "===]> Info: Start building ${ALTERNATIVE}... "
echo >&2 "===]> Info: Build Ubuntu FS... "
echo >&2 "===]> Info: Build Ubuntu Jammy... "
/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 FS... "
echo >&2 "===]> Info: Build Image Jammy... "
/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
"
@ -70,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=$?
@ -77,11 +83,11 @@ do
echo "Error building ${KERNEL_VERSION}-${ALTERNATIVE}"
exit "${livecd_exitcode}"
fi
### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that
## 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-20.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso"
zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso"
done
### Calculate sha256 sums of built ISO
## Calculate sha256 sums of built ISO
sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256"
find ./ | grep ".iso"

View File

@ -11,17 +11,17 @@ mount none -t devpts /dev/pts
export HOME=/root
export LC_ALL=C
echo "ubuntu-fs-live" >/etc/hostname
echo "ubuntu-jammy-live" >/etc/hostname
echo >&2 "===]> Info: Configure and update apt... "
cat <<EOF >/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
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
EOF
apt-get update
@ -30,8 +30,8 @@ echo >&2 "===]> Info: Install systemd and Ubuntu MBP Repo... "
apt-get install -y systemd-sysv gnupg curl wget
mkdir -p /etc/apt/sources.list.d
echo "deb https://mbp-ubuntu-kernel.herokuapp.com/ /" >/etc/apt/sources.list.d/mbp-ubuntu-kernel.list
curl -L https://mbp-ubuntu-kernel.herokuapp.com/KEY.gpg | apt-key add -
curl -s --compressed "https://adityagarg8.github.io/t2-ubuntu-repo/KEY.gpg" | gpg --dearmor | tee /etc/apt/trusted.gpg.d/t2-ubuntu-repo.gpg >/dev/null
curl -s --compressed -o /etc/apt/sources.list.d/t2.list "https://adityagarg8.github.io/t2-ubuntu-repo/t2.list"
apt-get update
echo >&2 "===]> Info: Configure machine-id and divert... "
@ -48,7 +48,6 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
ubuntu-standard \
sudo \
casper \
lupin-casper \
discover \
laptop-detect \
os-prober \
@ -56,17 +55,21 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
resolvconf \
net-tools \
wireless-tools \
wpagui \
locales \
initramfs-tools \
binutils \
linux-generic \
linux-headers-generic \
grub-efi-amd64-signed \
"linux-image-${KERNEL_VERSION}" \
"linux-headers-${KERNEL_VERSION}" \
intel-microcode \
thermald
thermald \
grub2 \
nautilus-admin
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... "
@ -85,7 +88,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
ubiquity-slideshow-ubuntu \
ubiquity-ubuntu-artwork
echo >&2 "===]> Info: Install useful applications... "
echo >&2 "===]> Info: Install useful applications and sound configuration... "
apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
git \
@ -94,54 +97,21 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
make \
gcc \
dkms \
iwd
iwd \
apple-t2-audio-config
echo >&2 "===]> Info: Change initramfs format (for grub)... "
sed -i "s/COMPRESS=lz4/COMPRESS=gzip/g" "/etc/initramfs-tools/initramfs.conf"
echo >&2 "===]> Info: Add drivers... "
APPLE_BCE_DRIVER_GIT_URL=https://github.com/t2linux/apple-bce-drv.git
APPLE_BCE_DRIVER_BRANCH_NAME=aur
APPLE_BCE_DRIVER_COMMIT_HASH=f93c6566f98b3c95677de8010f7445fa19f75091
APPLE_BCE_DRIVER_MODULE_NAME=apple-bce
APPLE_BCE_DRIVER_MODULE_VERSION=0.2
APPLE_IB_DRIVER_GIT_URL=https://github.com/t2linux/apple-ib-drv
APPLE_IB_DRIVER_BRANCH_NAME=mbp15
APPLE_IB_DRIVER_COMMIT_HASH=fc9aefa5a564e6f2f2bb0326bffb0cef0446dc05
APPLE_IB_DRIVER_MODULE_NAME=apple-ibridge
APPLE_IB_DRIVER_MODULE_VERSION=0.2
echo >&2 "===]> Info: Configure drivers... "
# thunderbolt is working for me.
#printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf
git clone --single-branch --branch ${APPLE_BCE_DRIVER_BRANCH_NAME} ${APPLE_BCE_DRIVER_GIT_URL} \
/usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}"
git -C /usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}" checkout "${APPLE_BCE_DRIVER_COMMIT_HASH}"
cat << EOF > /usr/src/${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}/dkms.conf
PACKAGE_NAME=apple-bce
PACKAGE_VERSION=0.1
CLEAN="make clean"
MAKE="make"
BUILT_MODULE_NAME[0]="apple-bce"
DEST_MODULE_LOCATION[0]="/updates"
AUTOINSTALL="yes"
REMAKE_INITRD="yes"
EOF
dkms install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}"
printf '\n### apple-bce start ###\nhid-apple\nbcm5974\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/modules-load.d/apple-bce.conf
printf '\n### apple-bce start ###\nhid-apple\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules
git clone --single-branch --branch ${APPLE_IB_DRIVER_BRANCH_NAME} ${APPLE_IB_DRIVER_GIT_URL} \
/usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}"
git -C /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" checkout "${APPLE_IB_DRIVER_COMMIT_HASH}"
dkms install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}"
printf '\n### applespi start ###\napple_ibridge\napple_ib_tb\napple_ib_als\n### applespi end ###' >>/etc/modules-load.d/applespi.conf
printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=2\n' >> /etc/modprobe.d/apple-touchbar.conf
printf 'apple-bce' >>/etc/modules-load.d/t2.conf
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 >&2 "===]> Info: Update initramfs... "
@ -165,13 +135,13 @@ apt-get purge -y -qq \
vim \
binutils \
linux-generic \
linux-headers-5.4.0-28 \
linux-headers-5.4.0-28-generic \
linux-headers-5.15.0-30 \
linux-headers-5.15.0-30-generic \
linux-headers-generic \
linux-image-5.4.0-28-generic \
linux-image-5.15.0-30-generic \
linux-image-generic \
linux-modules-5.4.0-28-generic \
linux-modules-extra-5.4.0-28-generic
linux-modules-5.15.0-30-generic \
linux-modules-extra-5.15.0-30-generic
apt-get autoremove -y
@ -184,17 +154,19 @@ dpkg-reconfigure -f readline resolvconf
cat <<EOF >/etc/NetworkManager/NetworkManager.conf
[main]
rc-manager=resolvconf
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no
EOF
dpkg-reconfigure network-manager
echo >&2 "===]> Info: Configure Network Manager to use iwd... "
mkdir -p /etc/NetworkManager/conf.d
printf '[device]\nwifi.backend=iwd\n' > /etc/NetworkManager/conf.d/wifi_backend.conf
printf '#[device]\n#wifi.backend=iwd\n' > /etc/NetworkManager/conf.d/wifi_backend.conf
#systemctl enable iwd.service
echo >&2 "===]> Info: Cleanup the chroot environment... "

View File

@ -6,27 +6,27 @@ insmod all_video
set default="0"
set timeout=30
menuentry "Try Ubuntu FS without installing" {
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat acpi=force ---
menuentry "Try Ubuntu Jammy Jellyfish 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 FS without installing (blacklist=thunderbolt)" {
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat acpi=force --- modprobe.blacklist=thunderbolt
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 ---
initrd /casper/initrd
}
menuentry "Install Ubuntu FS" {
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat acpi=force ---
menuentry "Try Ubuntu Jammy Jellyfish without installing (NVMe blacklisted)" {
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro pcie_ports=compat intel_iommu=on iommu=pt modprobe.blacklist=nvme ---
initrd /casper/initrd
}
menuentry "Install Ubuntu FS (blacklist=thunderbolt)" {
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat acpi=force --- modprobe.blacklist=thunderbolt
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 (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
}
menuentry "Check disc for defects" {
linux /casper/vmlinuz boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat acpi=force ---
initrd /casper/initrd
}
menuentry "Check disc for defects (blacklist=thunderbolt)" {
linux /casper/vmlinuz boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt
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 efi=noruntime pcie_ports=compat acpi=force
d-i debian-installer/add-kernel-opts string 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