Skip to content

Commit

Permalink
Fix broken updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpenedblade committed Jul 28, 2022
1 parent e4895f9 commit dd358f8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
39 changes: 39 additions & 0 deletions t2linux-config.spec
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit dd358f8

Please sign in to comment.