mirror of https://github.com/marcosfad/mbp-ubuntu
Add extra params to kernel and stop blacklisting thunderbolt
This commit is contained in:
parent
12bcf266ea
commit
68f147ff84
|
@ -22,8 +22,8 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
docker run --rm -v $(pwd):/repo -it alpine:latest /bin/sh -c '
|
docker run --rm -v $(pwd):/repo -it alpine:latest /bin/sh -c '
|
||||||
cd /repo
|
cd /repo
|
||||||
apk add --no-cache python3
|
apk add --no-cache python3 py-pip
|
||||||
pip3 install yamllint
|
pip install yamllint
|
||||||
yamllint .
|
yamllint .
|
||||||
'
|
'
|
||||||
- stage: test
|
- stage: test
|
||||||
|
|
|
@ -38,5 +38,5 @@ chmod 755 "${CHROOT_PATH}"/etc/grub.d/30_os-prober
|
||||||
|
|
||||||
### Copy suspend fix
|
### Copy suspend fix
|
||||||
echo >&2 "===]> Info: Fix suspend... "
|
echo >&2 "===]> Info: Fix suspend... "
|
||||||
cp -rfv "${ROOT_PATH}"/files/suspend/rmmod_tb.sh ${CHROOT_PATH}/lib/systemd/system-sleep/rmmod_tb.sh
|
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
|
chmod +x "${CHROOT_PATH}"/lib/systemd/system-sleep/rmmod_tb.sh
|
||||||
|
|
|
@ -61,6 +61,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
|
||||||
initramfs-tools \
|
initramfs-tools \
|
||||||
binutils \
|
binutils \
|
||||||
linux-generic \
|
linux-generic \
|
||||||
|
linux-headers-generic \
|
||||||
grub-efi-amd64-signed \
|
grub-efi-amd64-signed \
|
||||||
"linux-image-${KERNEL_VERSION}" \
|
"linux-image-${KERNEL_VERSION}" \
|
||||||
"linux-headers-${KERNEL_VERSION}" \
|
"linux-headers-${KERNEL_VERSION}" \
|
||||||
|
@ -91,44 +92,43 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="
|
||||||
curl \
|
curl \
|
||||||
nano \
|
nano \
|
||||||
make \
|
make \
|
||||||
gcc
|
gcc \
|
||||||
|
dkms
|
||||||
|
|
||||||
echo >&2 "===]> Info: Change initramfs format (for grub)... "
|
echo >&2 "===]> Info: Change initramfs format (for grub)... "
|
||||||
sed -i "s/COMPRESS=lz4/COMPRESS=gzip/g" "/etc/initramfs-tools/initramfs.conf"
|
sed -i "s/COMPRESS=lz4/COMPRESS=gzip/g" "/etc/initramfs-tools/initramfs.conf"
|
||||||
|
|
||||||
echo >&2 "===]> Info: Add drivers... "
|
echo >&2 "===]> Info: Add drivers... "
|
||||||
|
|
||||||
APPLE_BCE_DRIVER_GIT_URL=https://github.com/aunali1/mbp2018-bridge-drv.git
|
APPLE_BCE_DRIVER_GIT_URL=https://github.com/marcosfad/mbp2018-bridge-drv.git
|
||||||
APPLE_BCE_DRIVER_BRANCH_NAME=aur
|
APPLE_BCE_DRIVER_BRANCH_NAME=aur
|
||||||
APPLE_BCE_DRIVER_COMMIT_HASH=c884d9ca731f2118a58c28bb78202a0007935998
|
APPLE_BCE_DRIVER_COMMIT_HASH=85347e71dd79e0be486a79af36862c96027c0836
|
||||||
|
APPLE_BCE_DRIVER_MODULE_NAME=apple-bce
|
||||||
|
APPLE_BCE_DRIVER_MODULE_VERSION=0.1
|
||||||
|
|
||||||
APPLE_IB_DRIVER_GIT_URL=https://github.com/roadrunner2/macbook12-spi-driver.git
|
APPLE_IB_DRIVER_GIT_URL=https://github.com/roadrunner2/macbook12-spi-driver.git
|
||||||
APPLE_IB_DRIVER_BRANCH_NAME=mbp15
|
APPLE_IB_DRIVER_BRANCH_NAME=mbp15
|
||||||
APPLE_IB_DRIVER_COMMIT_HASH=90cea3e8e32db60147df8d39836bd1d2a5161871
|
APPLE_IB_DRIVER_COMMIT_HASH=90cea3e8e32db60147df8d39836bd1d2a5161871
|
||||||
|
APPLE_IB_DRIVER_MODULE_NAME=apple-ibridge
|
||||||
|
APPLE_IB_DRIVER_MODULE_VERSION=0.1
|
||||||
|
|
||||||
mkdir -p /opt/drivers
|
# thunderbolt is working for me.
|
||||||
mkdir -p "/lib/modules/${KERNEL_VERSION}/kernel/drivers"
|
#printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf
|
||||||
|
|
||||||
printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf
|
|
||||||
|
|
||||||
git clone --single-branch --branch ${APPLE_BCE_DRIVER_BRANCH_NAME} ${APPLE_BCE_DRIVER_GIT_URL} \
|
git clone --single-branch --branch ${APPLE_BCE_DRIVER_BRANCH_NAME} ${APPLE_BCE_DRIVER_GIT_URL} \
|
||||||
/opt/drivers/apple-bce
|
/usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}"
|
||||||
git -C /opt/drivers/apple-bce/ checkout "${APPLE_BCE_DRIVER_COMMIT_HASH}"
|
git -C /usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}" checkout "${APPLE_BCE_DRIVER_COMMIT_HASH}"
|
||||||
PATH=/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin \
|
dkms install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}"
|
||||||
make -C /lib/modules/"${KERNEL_VERSION}"/build/ M=/opt/drivers/apple-bce modules
|
printf '\n### apple-bce start ###\nhid-apple\nbcm5974\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/modules-load.d/apple-bce.conf
|
||||||
cp -rf /opt/drivers/apple-bce/*.ko /lib/modules/"${KERNEL_VERSION}"/kernel/drivers/
|
printf '\n### apple-bce start ###\nhid-apple\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules
|
||||||
printf '\n# apple-bce\nhid-apple\nbcm5974\nsnd-seq\napple-bce' >>/etc/modules-load.d/apple-bce.conf
|
|
||||||
printf '\n# apple-bce\nhid-apple\nsnd-seq\napple-bce' >>/etc/initramfs-tools/modules
|
|
||||||
|
|
||||||
git clone --single-branch --branch ${APPLE_IB_DRIVER_BRANCH_NAME} ${APPLE_IB_DRIVER_GIT_URL} \
|
git clone --single-branch --branch ${APPLE_IB_DRIVER_BRANCH_NAME} ${APPLE_IB_DRIVER_GIT_URL} \
|
||||||
/opt/drivers/applespi
|
/usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}"
|
||||||
git -C /opt/drivers/applespi/ checkout "${APPLE_IB_DRIVER_COMMIT_HASH}"
|
git -C /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" checkout "${APPLE_IB_DRIVER_COMMIT_HASH}"
|
||||||
PATH=/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin \
|
dkms install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}"
|
||||||
make -C /lib/modules/"${KERNEL_VERSION}"/build/ M=/opt/drivers/applespi modules
|
printf '\n### applespi start ###\napple_ibridge\napple_ib_tb\napple_ib_als\n### applespi end ###' >>/etc/modules-load.d/applespi.conf
|
||||||
printf '\n# applespi\napple_ibridge\napple_ib_tb\napple_ib_als' >>/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 '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=2\n' >> /etc/modprobe.d/apple-tb.conf
|
|
||||||
cp -rf /opt/drivers/applespi/*.ko /lib/modules/"${KERNEL_VERSION}"/kernel/drivers/
|
|
||||||
|
|
||||||
rm -rf /opt/drivers
|
|
||||||
|
|
||||||
echo >&2 "===]> Info: Update initramfs... "
|
echo >&2 "===]> Info: Update initramfs... "
|
||||||
|
|
||||||
|
@ -178,6 +178,10 @@ dns=dnsmasq
|
||||||
managed=false
|
managed=false
|
||||||
EOF
|
EOF
|
||||||
dpkg-reconfigure network-manager
|
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
|
||||||
|
#systemctl enable iwd.service
|
||||||
|
|
||||||
echo >&2 "===]> Info: Cleanup the chroot environment... "
|
echo >&2 "===]> Info: Cleanup the chroot environment... "
|
||||||
|
|
||||||
|
|
|
@ -7,23 +7,23 @@ set default="0"
|
||||||
set timeout=30
|
set timeout=30
|
||||||
|
|
||||||
menuentry "Try Ubuntu FS without installing" {
|
menuentry "Try Ubuntu FS without installing" {
|
||||||
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat ---
|
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat acpi=force ---
|
||||||
initrd /casper/initrd
|
initrd /casper/initrd
|
||||||
}
|
}
|
||||||
menuentry "Try Ubuntu FS without installing (blacklist=thunderbolt)" {
|
menuentry "Try Ubuntu FS without installing (blacklist=thunderbolt)" {
|
||||||
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt
|
linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat acpi=force --- modprobe.blacklist=thunderbolt
|
||||||
initrd /casper/initrd
|
initrd /casper/initrd
|
||||||
}
|
}
|
||||||
menuentry "Install Ubuntu FS" {
|
menuentry "Install Ubuntu FS" {
|
||||||
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat ---
|
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat acpi=force ---
|
||||||
initrd /casper/initrd
|
initrd /casper/initrd
|
||||||
}
|
}
|
||||||
menuentry "Install Ubuntu FS (blacklist=thunderbolt)" {
|
menuentry "Install Ubuntu FS (blacklist=thunderbolt)" {
|
||||||
linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat --- modprobe.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
|
||||||
initrd /casper/initrd
|
initrd /casper/initrd
|
||||||
}
|
}
|
||||||
menuentry "Check disc for defects" {
|
menuentry "Check disc for defects" {
|
||||||
linux /casper/vmlinuz boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat ---
|
linux /casper/vmlinuz boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat acpi=force ---
|
||||||
initrd /casper/initrd
|
initrd /casper/initrd
|
||||||
}
|
}
|
||||||
menuentry "Check disc for defects (blacklist=thunderbolt)" {
|
menuentry "Check disc for defects (blacklist=thunderbolt)" {
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
# well keep them installed.
|
# well keep them installed.
|
||||||
#ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org
|
#ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org
|
||||||
|
|
||||||
d-i debian-installer/add-kernel-opts string efi=noruntime pcie_ports=compat
|
d-i debian-installer/add-kernel-opts string efi=noruntime pcie_ports=compat acpi=force
|
||||||
|
|
Loading…
Reference in New Issue