From dd358f875fb7e950945154ef9d4298a80c70016a Mon Sep 17 00:00:00 2001 From: sharpenedblade Date: Thu, 28 Jul 2022 13:05:27 -0700 Subject: [PATCH] Fix broken updates. --- build.sh | 3 +++ t2linux-config.spec | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 t2linux-config.spec diff --git a/build.sh b/build.sh index ff3a5e1..1bdfd3a 100755 --- a/build.sh +++ b/build.sh @@ -55,7 +55,10 @@ done; # Build non-debug rpms cd "/root/rpmbuild"/SPECS +cp /repo/*.spec . rpmbuild -bb --with baseonly --without debug --without debuginfo --target=x86_64 kernel.spec +rpmbuild -bb --with baseonly --without debug --without debuginfo --target=x86_64 t2linux-config.spec + # Copy artifacts to shared volume cd "/repo" diff --git a/t2linux-config.spec b/t2linux-config.spec new file mode 100644 index 0000000..a58d02c --- /dev/null +++ b/t2linux-config.spec @@ -0,0 +1,39 @@ +Name: linux-t2 +Version: 5.18.9 +Release: 1%{?dist} +Summary: System configuration for linux on t2 macs. + +License: MIT +URL: https://t2linux.org +Source0: https://wiki.t2linux.org/tools/rmmod_tb.sh + +%description +Configuration files for linux on t2 macs. The linux-t2 kernel is necessary for this to work, and this must be installed to boot. Everything works except for TouchId, eGPU, and audio switching. + +%prep +cp %{_sourcedir}/* %{_builddir} + +%build +echo -e 'hid-apple\nbcm5974\nsnd-seq\napple_bce' > apple_bce.conf + +echo -e 'add_drivers+=" hid_apple snd-seq apple_bce "\nforce_drivers+=" hid_apple snd-seq apple_bce "' > apple_bce_install.conf + +%install +mkdir -p %{buildroot}/etc/dracut.conf.d/ +mv apple_bce_install.conf %{buildroot}/etc/dracut.conf.d/apple_bce_install.conf + +mkdir -p %{buildroot}/etc/modules-load.d/ +mv apple_bce.conf %{buildroot}/etc/modules-load.d/apple_bce.conf + +mkdir -p %{buildroot}/lib/systemd/system-sleep +mv %{_builddir}/rmmod_tb.sh %{buildroot}/lib/systemd/system-sleep/rmmod_tb.sh +chmod +x %{buildroot}/lib/systemd/system-sleep/rmmod_tb.sh + +%post +grubby --remove-args="efi=noruntime pcie_ports=compat" --update-kernel=ALL +grubby --args="efi=noruntime pcie_ports=compat" --update-kernel=ALL + +%files +/etc/modules-load.d/apple_bce.conf +/lib/systemd/system-sleep/rmmod_tb.sh +/etc/dracut.conf.d/apple_bce_install.conf