From 81a88ae47362e67ff57a7b8dd53b1b99fbf6743b Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Feb 24 2020 04:04:19 +0000 Subject: Allow building in CentOS --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..83498ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +BUILD/ +BUILDROOT/ +RPMS/ +SRPMS/ +SOURCES/*.xz +SOURCES/*.gz +SOURCES/*.bz2 +SOURCES/*.rpm +SOURCES/*.orig +SOURCES/*.sign diff --git a/.kernel.metadata b/.kernel.metadata new file mode 100644 index 0000000..ebb210c --- /dev/null +++ b/.kernel.metadata @@ -0,0 +1,2 @@ +98ae49ad49397d5a4dcb3ff9a082223edf7c5bbd SOURCES/linux-5.4.tar.xz +7e01baaaab76667552960100d8a0cc2376057e73 SOURCES/patch-5.4.20.xz diff --git a/SOURCES/0001-Fix-mt7615.patch b/SOURCES/0001-Fix-mt7615.patch new file mode 100644 index 0000000..1d650e8 --- /dev/null +++ b/SOURCES/0001-Fix-mt7615.patch @@ -0,0 +1,28 @@ +From 596f13e776e5dee3e1e5b751b0000049c47ff08f Mon Sep 17 00:00:00 2001 +From: Fedora Kernel Team +Date: Fri, 29 Nov 2019 14:49:00 +0000 +Subject: [PATCH] Fix mt7615 + +--- + drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +index e07ce2c..6b39184 100644 +--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +@@ -13,10 +13,7 @@ + #include "../dma.h" + #include "mac.h" + +-static inline s8 to_rssi(u32 field, u32 rxv) +-{ +- return (FIELD_GET(field, rxv) - 220) / 2; +-} ++#define to_rssi(field, rxv) ((FIELD_GET(field, rxv) - 220) / 2) + + static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev, + u8 idx, bool unicast) +-- +1.8.3.1 + diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec index f4ed592..2a53ecb 100644 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -55,7 +55,7 @@ Summary: The Linux kernel # define buildid .local -%if 0%{?fedora} +%if 0%{?fedora}%{?centos} %define primary_target fedora %else %define primary_target rhel @@ -459,13 +459,16 @@ Summary: The Linux kernel %define with_up 0 %define with_debug 0 %define with_debuginfo 0 +%define with_perf 0 +%define with_tools 0 +%define with_bpftool 0 %define with_selftests 0 %define with_pae 0 %define _enable_debug_packages 0 %endif # Architectures we build tools/cpupower on -%if 0%{?fedora} +%if 0%{?fedora}%{?centos} %define cpupowerarchs %{ix86} x86_64 ppc64le %{arm} aarch64 %else %define cpupowerarchs i686 x86_64 ppc64le aarch64 @@ -817,6 +820,8 @@ Patch601: alsa-5.6.patch # This is already in 5.5 rhbz 1794369 Patch603: 0001-e1000e-Add-support-for-Comet-Lake.patch +#CentOS +Patch9999: 0001-Fix-mt7615.patch # END OF PATCH DEFINITIONS %endif