add roadrunner2/macbook12-spi-driver
This commit is contained in:
parent
87c107fec0
commit
cd32e018f8
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ WireGuard-*.tar.xz
|
|||||||
WireGuard-*.tar.asc
|
WireGuard-*.tar.asc
|
||||||
kernel-*/
|
kernel-*/
|
||||||
config-base-*
|
config-base-*
|
||||||
|
macbook12-spi-driver-*.tar.gz
|
||||||
|
15
Makefile
15
Makefile
@ -58,6 +58,12 @@ WG_SRC_URL := $(WG_BASE_URL)/$(WG_SRC_FILE)
|
|||||||
WG_SIG_FILE := $(WG_SRC_FILE:%.xz=%.asc)
|
WG_SIG_FILE := $(WG_SRC_FILE:%.xz=%.asc)
|
||||||
WG_SIG_URL := $(WG_BASE_URL)/$(WG_SIG_FILE)
|
WG_SIG_URL := $(WG_BASE_URL)/$(WG_SIG_FILE)
|
||||||
|
|
||||||
|
SPI_BASE_URL := https://github.com/roadrunner2/macbook12-spi-driver/archive
|
||||||
|
SPI_REVISION := 31cc060adcb431efdf9cf547d600bb45bb00a7f4
|
||||||
|
SPI_SRC_URL := $(SPI_BASE_URL)/$(SPI_REVISION).tar.gz
|
||||||
|
SPI_SRC_FILE := macbook12-spi-driver-$(SPI_REVISION).tar.gz
|
||||||
|
SPI_HASH_SHA256 := 46da514227bb2694e571ec4fff746d1302f41cdea5fe7cb2e522349f96ac83c1
|
||||||
|
|
||||||
URL := $(SRC_BASEURL)/$(SRC_FILE)
|
URL := $(SRC_BASEURL)/$(SRC_FILE)
|
||||||
URL_SIGN := $(SRC_BASEURL)/$(SIGN_FILE)
|
URL_SIGN := $(SRC_BASEURL)/$(SIGN_FILE)
|
||||||
|
|
||||||
@ -65,7 +71,7 @@ ifeq ($(DOWNLOAD_FROM_GIT),1)
|
|||||||
URL := https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-$(VERSION).tar.gz
|
URL := https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/linux-$(VERSION).tar.gz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
get-sources: $(SRC_FILE) $(SIGN_FILE) $(WG_SRC_FILE) $(WG_SIG_FILE)
|
get-sources: $(SRC_FILE) $(SIGN_FILE) $(WG_SRC_FILE) $(WG_SIG_FILE) $(SPI_SRC_FILE)
|
||||||
|
|
||||||
$(SRC_FILE):
|
$(SRC_FILE):
|
||||||
@wget -q -N $(URL)
|
@wget -q -N $(URL)
|
||||||
@ -79,6 +85,9 @@ $(WG_SRC_FILE):
|
|||||||
$(WG_SIG_FILE):
|
$(WG_SIG_FILE):
|
||||||
@wget -q -N $(WG_SIG_URL)
|
@wget -q -N $(WG_SIG_URL)
|
||||||
|
|
||||||
|
$(SPI_SRC_FILE):
|
||||||
|
@wget -q -N -O $(SPI_SRC_FILE) $(SPI_SRC_URL)
|
||||||
|
|
||||||
import-keys:
|
import-keys:
|
||||||
@if [ -n "$$GNUPGHOME" ]; then rm -f "$$GNUPGHOME/linux-kernel-trustedkeys.gpg"; fi
|
@if [ -n "$$GNUPGHOME" ]; then rm -f "$$GNUPGHOME/linux-kernel-trustedkeys.gpg"; fi
|
||||||
@gpg --no-auto-check-trustdb --no-default-keyring --keyring linux-kernel-trustedkeys.gpg -q --import kernel*-key.asc
|
@gpg --no-auto-check-trustdb --no-default-keyring --keyring linux-kernel-trustedkeys.gpg -q --import kernel*-key.asc
|
||||||
@ -94,6 +103,7 @@ else
|
|||||||
# verify locally based on a signed git tag and commit hash file
|
# verify locally based on a signed git tag and commit hash file
|
||||||
sha512sum --quiet -c $(HASH_FILE)
|
sha512sum --quiet -c $(HASH_FILE)
|
||||||
endif
|
endif
|
||||||
|
@gunzip -c $(SPI_SRC_FILE) | sha256sum | head -c64 | grep -q "^$(SPI_HASH_SHA256)$$"
|
||||||
|
|
||||||
.PHONY: clean-sources
|
.PHONY: clean-sources
|
||||||
clean-sources:
|
clean-sources:
|
||||||
@ -103,6 +113,9 @@ endif
|
|||||||
ifneq ($(WG_SRC_FILE), None)
|
ifneq ($(WG_SRC_FILE), None)
|
||||||
-rm $(WG_SRC_FILE) $(WG_SIG_FILE)
|
-rm $(WG_SRC_FILE) $(WG_SIG_FILE)
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(SPI_SRC_FILE), None)
|
||||||
|
-rm $(SPI_SRC_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
#RPM := rpmbuild --buildroot=/dev/shm/buildroot/
|
#RPM := rpmbuild --buildroot=/dev/shm/buildroot/
|
||||||
|
@ -114,6 +114,7 @@ Source0: linux-%{upstream_version}.tar.xz
|
|||||||
Source0: linux-%{upstream_version}.tar.gz
|
Source0: linux-%{upstream_version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
Source5: wireguard-linux-compat-0.0.20200121.tar.xz
|
Source5: wireguard-linux-compat-0.0.20200121.tar.xz
|
||||||
|
Source6: macbook12-spi-driver-31cc060adcb431efdf9cf547d600bb45bb00a7f4.tar.gz
|
||||||
Source16: guards
|
Source16: guards
|
||||||
Source17: apply-patches
|
Source17: apply-patches
|
||||||
Source18: mod-sign.sh
|
Source18: mod-sign.sh
|
||||||
@ -212,6 +213,9 @@ rm -rf %_builddir/wireguard
|
|||||||
tar x -C %_builddir -Jpf %{SOURCE5}
|
tar x -C %_builddir -Jpf %{SOURCE5}
|
||||||
mv %_builddir/$(basename %{SOURCE5} .tar.xz) %_builddir/wireguard
|
mv %_builddir/$(basename %{SOURCE5} .tar.xz) %_builddir/wireguard
|
||||||
|
|
||||||
|
rm -rf %_builddir/macbook12-spi-driver
|
||||||
|
tar -x -C %_builddir -zf %{SOURCE6}
|
||||||
|
mv %_builddir/$(basename %{SOURCE6} .tar.gz) %_builddir/macbook12-spi-driver
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -228,6 +232,10 @@ if [ -d "%_builddir/wireguard" ]; then
|
|||||||
make -C %kernel_build_dir M=%_builddir/wireguard/src modules
|
make -C %kernel_build_dir M=%_builddir/wireguard/src modules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Build applespi, apple-ibridge, apple-ib-tb, apple-ib-als modules
|
||||||
|
if [ -d "%_builddir/macbook12-spi-driver" ]; then
|
||||||
|
make -C %kernel_build_dir M=%_builddir/macbook12-spi-driver modules
|
||||||
|
fi
|
||||||
|
|
||||||
%define __modsign_install_post \
|
%define __modsign_install_post \
|
||||||
if [ "%{signmodules}" -eq "1" ]; then \
|
if [ "%{signmodules}" -eq "1" ]; then \
|
||||||
@ -288,6 +296,9 @@ fi
|
|||||||
if [ -d "%_builddir/wireguard" ]; then
|
if [ -d "%_builddir/wireguard" ]; then
|
||||||
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/wireguard/src
|
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/wireguard/src
|
||||||
fi
|
fi
|
||||||
|
if [ -d "%_builddir/macbook12-spi-driver" ]; then
|
||||||
|
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/macbook12-spi-driver
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p %buildroot/%src_install_dir
|
mkdir -p %buildroot/%src_install_dir
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user