Compare commits

...

11 Commits

Author SHA1 Message Date
marcosfad 019e806500
Merge pull request #40 from Redecorating/patch-1
readme: update instructions for dkms after kernel upgrade
2021-07-23 21:13:46 +02:00
marcosfad d2fea1ac6a
Merge pull request #39 from Redecorating/feature/linux5.10
update to linux5.10
2021-07-23 21:01:41 +02:00
Redecorating 6205d025f4
readme: update instructions for dkms after kernel upgrade
I've changed it to a link to the t2linux wiki's dkms page, which tells people
to install the newer versions of the modules. This should help with #25.

I've also reworded the warning about 5.8-9 kernels causing issues, so
that it no longer warns against 5.10
2021-07-21 09:39:27 +10:00
Redecorating 1e245d20d3
revert zip part size to 1.5GB 2021-07-10 21:09:18 +10:00
Redecorating e438ad4b52
Update CI.yml 2021-07-10 21:08:31 +10:00
Redecorating be42bfb034
fix unzip instructions 2021-07-10 19:48:02 +10:00
Redecorating 07e804afd0 split iso into 500mb parts, may fix artifact download 2021-07-10 19:14:24 +10:00
Redecorating ad56eff73d
add CI
There may be issues if it can't upload a 1.6GB artifact. May have to use the split zip version if it fails.
2021-07-10 18:04:18 +10:00
Redecorating 2f56be3ef0 linux5.10, update apple-bce and apple-ibridge
The updated kernel is retrieved manually from mbp-ubuntu-kernel's github
releases, which is a temporary solution and should be changed back once
it's on the apt repo.

I've tested building this, and it boots and installs correctly, but when
booting into the installation it gets stuck after complaining about no
firmware for brcmfmac, and there's a red/green line on my display. This
is on a MacBookPro16,1.
2021-07-10 17:46:51 +10:00
Redecorating 67d89e79aa Merge remote-tracking branch 'origin/feature/useIwd' into feature/linux5.10 2021-07-10 17:46:11 +10:00
marcosfad 2ee13b8682 Network: Add iwd and use it as backend 2020-10-18 14:26:37 +02:00
4 changed files with 106 additions and 30 deletions

69
.github/workflows/CI.yml vendored Normal file
View File

@ -0,0 +1,69 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
[push]
# Allows you to run this workflow manually from the Actions tab
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Build
run: sudo ./build.sh
# Runs a set of commands using the runners shell
- name: print sha256sum
run: cat output/sha256
- name: Generate Tag
id: tag
run: |
VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2)
echo Version is $VER
echo "::set-output name=tag::${VER}"
- name: Upload iso artifact part 1
uses: actions/upload-artifact@v2
with:
name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z01
path: ${{ github.workspace }}/output/livecd-${{ steps.tag.outputs.tag }}-mbp.z01
- name: Upload iso artifact part 2
uses: actions/upload-artifact@v2
with:
name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z02
path: ${{ github.workspace }}/output/livecd-${{ steps.tag.outputs.tag }}-mbp.z02
- name: Upload iso artifact part 3
uses: actions/upload-artifact@v2
with:
name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z03
path: ${{ github.workspace }}/output/livecd-${{ steps.tag.outputs.tag }}-mbp.z03
- name: Upload iso artifact final part
if: always()
uses: actions/upload-artifact@v2
with:
name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.zip
path: ${{ github.workspace }}/output/livecd-${{ steps.tag.outputs.tag }}-mbp.zip
- name: Instructions for putting it back together
run: |
echo Download all the artifacts, and put them in a folder without other files. Then run:
echo 'unzip "*.z??.zip"'
echo 'cat livecd-${{ steps.tag.outputs.tag }}-mbp.z?? > cd.zip'
echo unzip cd.zip

View File

@ -15,8 +15,8 @@ This repo is a rework of the great work done by [@mikeeq](https://github.com/mik
I'm using the Kernel from - <https://github.com/marcosfad/mbp-ubuntu-kernel>
Using additional drivers:
- [Apple T2 (apple-bce) (audio, keyboard, touchpad)](https://github.com/MCMrARM/mbp2018-bridge-drv)
- [Touchbar (apple-ibridge, apple-ib-tb, apple-ib-als)](https://github.com/roadrunner2/macbook12-spi-driver/tree/mbp15)
- [Apple T2 (apple-bce) (audio, keyboard, touchpad)](https://github.com/t2linux/apple-bce-drv)
- [Touchbar (apple-ibridge, apple-ib-tb, apple-ib-als)](https://github.com/t2linux/apple-ib-drv)
Bootloader is configure correctly out of the box. No workaround needed.
@ -37,7 +37,7 @@ If you don't know what version, start with the mbp and if it doesn't work ([Blan
## Installation
*!! Warning: Versions newer than [5.7.19](https://github.com/marcosfad/mbp-ubuntu/releases/tag/v20.04-5.7.19-1) are considered in-development builds and **should not** be used due to issues from within the kernel and the init system.*
*!! Warning: Versions between 5.8 and 5.9 can be very unstable and **should not** be used due to issues from within the kernel and the init system. Please use [5.7.19](https://github.com/marcosfad/mbp-ubuntu/releases/tag/v20.04-5.7.19-1).*
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)
@ -95,19 +95,7 @@ and then:
The live cd includes dkms and will automatically run when a new kernel is installed. You can use `dkms status` to see it.
The step to install it from scratch would be:
```bash
sudo apt install dkms
sudo apt install linux-headers-<mbp-kernel-release>-mbp linux-image-<mbp-kernel-release>-mbp
sudo git clone --branch mbp15 https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/apple-ibridge-0.1
sudo dkms install -m apple-ibridge -v 0.1 -k <mbp-kernel-release>-mbp
modprobe apple-ib-tb
modprobe apple-ib-als
sudo git clone --branch aur https://github.com/marcosfad/mbp2018-bridge-drv.git /usr/src/apple-bce-0.1
sudo dkms install -m apple-bce -v 0.1 -k <mbp-kernel-release>-mbp
modprobe apple-bce
```
If you upgrade 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:

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.9.6
KERNEL_VERSION=5.10.47
if [ -d "$WORKING_PATH" ]; then
rm -rf "$WORKING_PATH"
@ -33,7 +33,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
syslinux
echo >&2 "===]> Info: Start loop... "
for ALTERNATIVE in mbp mbp-alt
for ALTERNATIVE in mbp
do
echo >&2 "===]> Info: Start building ${ALTERNATIVE}... "

View File

@ -63,11 +63,16 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
linux-generic \
linux-headers-generic \
grub-efi-amd64-signed \
"linux-image-${KERNEL_VERSION}" \
"linux-headers-${KERNEL_VERSION}" \
intel-microcode \
thermald
# This is not ideal, but it should work until the apt repo gets updated.
curl -L https://github.com/marcosfad/mbp-ubuntu-kernel/releases/download/v5.10.47/linux-headers-5.10.47-mbp_5.10.47-1_amd64.deb > /tmp/headers.deb
curl -L https://github.com/marcosfad/mbp-ubuntu-kernel/releases/download/v5.10.47/linux-image-5.10.47-mbp_5.10.47-1_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" \
@ -93,24 +98,25 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
nano \
make \
gcc \
dkms
dkms \
iwd
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/marcosfad/mbp2018-bridge-drv.git
APPLE_BCE_DRIVER_GIT_URL=https://github.com/t2linux/apple-bce-drv.git
APPLE_BCE_DRIVER_BRANCH_NAME=aur
APPLE_BCE_DRIVER_COMMIT_HASH=85347e71dd79e0be486a79af36862c96027c0836
APPLE_BCE_DRIVER_COMMIT_HASH=f93c6566f98b3c95677de8010f7445fa19f75091
APPLE_BCE_DRIVER_MODULE_NAME=apple-bce
APPLE_BCE_DRIVER_MODULE_VERSION=0.1
APPLE_BCE_DRIVER_MODULE_VERSION=0.2
APPLE_IB_DRIVER_GIT_URL=https://github.com/roadrunner2/macbook12-spi-driver.git
APPLE_IB_DRIVER_GIT_URL=https://github.com/t2linux/apple-ib-drv
APPLE_IB_DRIVER_BRANCH_NAME=mbp15
APPLE_IB_DRIVER_COMMIT_HASH=90cea3e8e32db60147df8d39836bd1d2a5161871
APPLE_IB_DRIVER_COMMIT_HASH=fc9aefa5a564e6f2f2bb0326bffb0cef0446dc05
APPLE_IB_DRIVER_MODULE_NAME=apple-ibridge
APPLE_IB_DRIVER_MODULE_VERSION=0.1
APPLE_IB_DRIVER_MODULE_VERSION=0.2
# thunderbolt is working for me.
#printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf
@ -118,6 +124,18 @@ APPLE_IB_DRIVER_MODULE_VERSION=0.1
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
@ -178,9 +196,10 @@ dns=dnsmasq
managed=false
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' > /etc/NetworkManager/conf.d/wifi_backend.conf
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
#systemctl enable iwd.service
echo >&2 "===]> Info: Cleanup the chroot environment... "