Add wifi driver

This commit is contained in:
marcosfad 2022-03-29 20:25:58 +02:00
parent 5e5e12c256
commit 6596b9cf71
6 changed files with 21 additions and 26 deletions

View File

@ -19,14 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: debug
env:
TEST: ${{ github.event.inputs.KERNEL_VERSION }}
run:
echo "inputs.KERNEL_VERSION ${{ github.event.inputs.KERNEL_VERSION}}"
echo "env.KERNEL_VERSION ${{env.KERNEL_VERSION}}"
echo "env.TEST ${{env.TEST}}"
- name: Configure variables
id: variables
env:

View File

@ -23,9 +23,19 @@ umount "${CHROOT_PATH}/dev"
### Add update_kernel_mbp script
echo >&2 "===]> Info: Add update_kernel_mbp script... "
curl -L https://raw.githubusercontent.com/marcosfad/mbp-ubuntu/master/update_kernel_mbp.sh -o /usr/bin/update_kernel_mbp
cp -r "${ROOT_PATH}/files/update_kernel_mbp.sh" /usr/bin/update_kernel_mbp
chmod +x /usr/bin/update_kernel_mbp
### Add wifi firmware script
echo >&2 "===]> Info: Add wifi firmware... "
cp -r "${ROOT_PATH}/files/wifi/iso-firmware.deb" "${CHROOT_PATH}"/usr/src/iso-firmware.deb
### Add example to fix amdgpu power manager
echo >&2 "===]> Configure amdgpu"
cat << EOF > "${CHROOT_PATH}"/usr/src/udev_rules_d_30-amdgpu-pm.rules
KERNEL=="card0", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="high"
EOF
### Copy grub config without finding macos partition
echo >&2 "===]> Info: Patch Grub... "
cp -rfv "${ROOT_PATH}"/files/grub/30_os-prober "${CHROOT_PATH}"/etc/grub.d/30_os-prober

View File

@ -34,26 +34,14 @@ submenu "Ubuntu, with Linux $file" {
linux /casper/vmlinuz-$file file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat ---
initrd /casper/initrd-$file
}
menuentry "Try Ubuntu FS without installing (blacklist=thunderbolt)" {
linux /casper/vmlinuz-$file file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt
initrd /casper/initrd-$file
}
menuentry "Install Ubuntu FS" {
linux /casper/vmlinuz-$file preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat ---
initrd /casper/initrd-$file
}
menuentry "Install Ubuntu FS (blacklist=thunderbolt)" {
linux /casper/vmlinuz-$file preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt
initrd /casper/initrd-$file
}
menuentry "Check disc for defects" {
linux /casper/vmlinuz-$file boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat ---
initrd /casper/initrd-$file
}
menuentry "Check disc for defects (blacklist=thunderbolt)" {
linux /casper/vmlinuz-$file boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt
initrd /casper/initrd-$file
}
}
EOF
done

View File

@ -1,4 +1,4 @@
# mbp-ubunt.
# mbp-ubuntu
UBUNTU 20.04 ISO with Apple T2 patches built-in. 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.
@ -73,7 +73,8 @@ See <https://wiki.t2linux.org/distributions/ubuntu/installation/> for more detai
## Configuration
- See <https://wiki.t2linux.org/guides/wifi/>
- If wifi do not work out of the box, you can try to install the firmware using `sudo dpkg -i /usr/src/iso-firmware.deb`
More details you can find on <https://wiki.t2linux.org/guides/wifi/>
- To install additional languages, install appropriate langpack via apt `sudo apt-get install language-pack-[cod] language-pack-gnome-[cod] language-pack-[cod]-base language-pack-gnome-[cod]-base `
- see <https://askubuntu.com/questions/149876/how-can-i-install-one-language-by-command-line>
- You can change mappings of ctrl, fn, option keys (PC keyboard mappings) by creating `/etc/modprobe.d/hid_apple.conf` file and recreating grub config. All available modifications could be found here: <https://github.com/free5lot/hid-apple-patched>
@ -84,6 +85,7 @@ 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`
- If you have problems with shutdown and your mac has an AMD video Card, try deactivating the dpm on kernel (by adding `amdgpu.dpm=0` to the kernel options) or use copy the udev rule (`sudo cp /usr/src/udev_rules_d_30-amdgpu-pm.rules /etc/udev/rules.d/30-amdgpu-pm.rules`)
## MISC

View File

@ -29,7 +29,8 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
dosfstools \
zip \
isolinux \
syslinux
syslinux \
curl
echo >&2 "===]> Info: Start building... "

View File

@ -106,8 +106,10 @@ sed -i "s/COMPRESS=lz4/COMPRESS=gzip/g" "/etc/initramfs-tools/initramfs.conf"
printf '\n### applespi start ###\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
echo >&2 "===]> Info: Install wifi firmware... "
dpkg -i /tmp/setup_files/wifi/iso-firmware.deb
#if [ -d /tmp/setup_files/wifi/iso-firmware.deb ]; then
# echo >&2 "===]> Info: Install wifi firmware... "
# dpkg -i /tmp/setup_files/wifi/iso-firmware.deb
#fi
#echo >&2 "===]> Info: install mpbfan ... "
#git clone https://github.com/networkException/mbpfan /tmp/mbpfan