update to 5.4.53
fix kernel headers by installing Kconfig files; reworked to only install needed files; strip modules [release 5.4.53-1mamba;Thu Jul 23 2020]
This commit is contained in:
parent
c100768b27
commit
e69bb0ae32
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
199
kernel-5.4.53-revert-to-fix-ath9k_htc.patch
Normal file
199
kernel-5.4.53-revert-to-fix-ath9k_htc.patch
Normal file
@ -0,0 +1,199 @@
|
||||
From 1a32e7b57b0b37cab6845093920b4d1ff94d3bf4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Viktor=20J=C3=A4gersk=C3=BCpper?=
|
||||
<viktor_jaegerskuepper@freenet.de>
|
||||
Date: Wed, 1 Jul 2020 23:32:28 +0200
|
||||
Subject: Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 2bbcaaee1fcb ("ath9k: Fix general protection fault
|
||||
in ath9k_hif_usb_rx_cb") because the driver gets stuck like this:
|
||||
|
||||
[ 5.778803] usb 1-5: Manufacturer: ATHEROS
|
||||
[ 21.697488] usb 1-5: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
|
||||
[ 21.701377] usbcore: registered new interface driver ath9k_htc
|
||||
[ 22.053705] usb 1-5: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
|
||||
[ 22.306182] ath9k_htc 1-5:1.0: ath9k_htc: HTC initialized with 33 credits
|
||||
[ 115.708513] ath9k_htc: Failed to initialize the device
|
||||
[ 115.708683] usb 1-5: ath9k_htc: USB layer deinitialized
|
||||
|
||||
Reported-by: Roman Mamedov <rm@romanrm.net>
|
||||
Ref: https://bugzilla.kernel.org/show_bug.cgi?id=208251
|
||||
Fixes: 2bbcaaee1fcb ("ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb")
|
||||
Tested-by: Viktor Jägersküpper <viktor_jaegerskuepper@freenet.de>
|
||||
Signed-off-by: Viktor Jägersküpper <viktor_jaegerskuepper@freenet.de>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/hif_usb.c | 48 ++++++++------------------------
|
||||
drivers/net/wireless/ath/ath9k/hif_usb.h | 5 ----
|
||||
2 files changed, 11 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
index 4ed21dad6a8e..6049d3766c64 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
@@ -643,9 +643,9 @@ err:
|
||||
|
||||
static void ath9k_hif_usb_rx_cb(struct urb *urb)
|
||||
{
|
||||
- struct rx_buf *rx_buf = (struct rx_buf *)urb->context;
|
||||
- struct hif_device_usb *hif_dev = rx_buf->hif_dev;
|
||||
- struct sk_buff *skb = rx_buf->skb;
|
||||
+ struct sk_buff *skb = (struct sk_buff *) urb->context;
|
||||
+ struct hif_device_usb *hif_dev =
|
||||
+ usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0));
|
||||
int ret;
|
||||
|
||||
if (!skb)
|
||||
@@ -685,15 +685,14 @@ resubmit:
|
||||
return;
|
||||
free:
|
||||
kfree_skb(skb);
|
||||
- kfree(rx_buf);
|
||||
}
|
||||
|
||||
static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
|
||||
{
|
||||
- struct rx_buf *rx_buf = (struct rx_buf *)urb->context;
|
||||
- struct hif_device_usb *hif_dev = rx_buf->hif_dev;
|
||||
- struct sk_buff *skb = rx_buf->skb;
|
||||
+ struct sk_buff *skb = (struct sk_buff *) urb->context;
|
||||
struct sk_buff *nskb;
|
||||
+ struct hif_device_usb *hif_dev =
|
||||
+ usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0));
|
||||
int ret;
|
||||
|
||||
if (!skb)
|
||||
@@ -751,7 +750,6 @@ resubmit:
|
||||
return;
|
||||
free:
|
||||
kfree_skb(skb);
|
||||
- kfree(rx_buf);
|
||||
urb->context = NULL;
|
||||
}
|
||||
|
||||
@@ -797,7 +795,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
|
||||
init_usb_anchor(&hif_dev->mgmt_submitted);
|
||||
|
||||
for (i = 0; i < MAX_TX_URB_NUM; i++) {
|
||||
- tx_buf = kzalloc(sizeof(*tx_buf), GFP_KERNEL);
|
||||
+ tx_buf = kzalloc(sizeof(struct tx_buf), GFP_KERNEL);
|
||||
if (!tx_buf)
|
||||
goto err;
|
||||
|
||||
@@ -834,9 +832,8 @@ static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev)
|
||||
|
||||
static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
||||
{
|
||||
- struct rx_buf *rx_buf = NULL;
|
||||
- struct sk_buff *skb = NULL;
|
||||
struct urb *urb = NULL;
|
||||
+ struct sk_buff *skb = NULL;
|
||||
int i, ret;
|
||||
|
||||
init_usb_anchor(&hif_dev->rx_submitted);
|
||||
@@ -844,12 +841,6 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
||||
|
||||
for (i = 0; i < MAX_RX_URB_NUM; i++) {
|
||||
|
||||
- rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL);
|
||||
- if (!rx_buf) {
|
||||
- ret = -ENOMEM;
|
||||
- goto err_rxb;
|
||||
- }
|
||||
-
|
||||
/* Allocate URB */
|
||||
urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (urb == NULL) {
|
||||
@@ -864,14 +855,11 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
|
||||
goto err_skb;
|
||||
}
|
||||
|
||||
- rx_buf->hif_dev = hif_dev;
|
||||
- rx_buf->skb = skb;
|
||||
-
|
||||
usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
usb_rcvbulkpipe(hif_dev->udev,
|
||||
USB_WLAN_RX_PIPE),
|
||||
skb->data, MAX_RX_BUF_SIZE,
|
||||
- ath9k_hif_usb_rx_cb, rx_buf);
|
||||
+ ath9k_hif_usb_rx_cb, skb);
|
||||
|
||||
/* Anchor URB */
|
||||
usb_anchor_urb(urb, &hif_dev->rx_submitted);
|
||||
@@ -897,8 +885,6 @@ err_submit:
|
||||
err_skb:
|
||||
usb_free_urb(urb);
|
||||
err_urb:
|
||||
- kfree(rx_buf);
|
||||
-err_rxb:
|
||||
ath9k_hif_usb_dealloc_rx_urbs(hif_dev);
|
||||
return ret;
|
||||
}
|
||||
@@ -910,21 +896,14 @@ static void ath9k_hif_usb_dealloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
||||
|
||||
static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
||||
{
|
||||
- struct rx_buf *rx_buf = NULL;
|
||||
- struct sk_buff *skb = NULL;
|
||||
struct urb *urb = NULL;
|
||||
+ struct sk_buff *skb = NULL;
|
||||
int i, ret;
|
||||
|
||||
init_usb_anchor(&hif_dev->reg_in_submitted);
|
||||
|
||||
for (i = 0; i < MAX_REG_IN_URB_NUM; i++) {
|
||||
|
||||
- rx_buf = kzalloc(sizeof(*rx_buf), GFP_KERNEL);
|
||||
- if (!rx_buf) {
|
||||
- ret = -ENOMEM;
|
||||
- goto err_rxb;
|
||||
- }
|
||||
-
|
||||
/* Allocate URB */
|
||||
urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (urb == NULL) {
|
||||
@@ -939,14 +918,11 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
||||
goto err_skb;
|
||||
}
|
||||
|
||||
- rx_buf->hif_dev = hif_dev;
|
||||
- rx_buf->skb = skb;
|
||||
-
|
||||
usb_fill_int_urb(urb, hif_dev->udev,
|
||||
usb_rcvintpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
skb->data, MAX_REG_IN_BUF_SIZE,
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
+ ath9k_hif_usb_reg_in_cb, skb, 1);
|
||||
|
||||
/* Anchor URB */
|
||||
usb_anchor_urb(urb, &hif_dev->reg_in_submitted);
|
||||
@@ -972,8 +948,6 @@ err_submit:
|
||||
err_skb:
|
||||
usb_free_urb(urb);
|
||||
err_urb:
|
||||
- kfree(rx_buf);
|
||||
-err_rxb:
|
||||
ath9k_hif_usb_dealloc_reg_in_urbs(hif_dev);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h
|
||||
index 5985aa15ca93..a94e7e1c86e9 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hif_usb.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.h
|
||||
@@ -86,11 +86,6 @@ struct tx_buf {
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
-struct rx_buf {
|
||||
- struct sk_buff *skb;
|
||||
- struct hif_device_usb *hif_dev;
|
||||
-};
|
||||
-
|
||||
#define HIF_USB_TX_STOP BIT(0)
|
||||
#define HIF_USB_TX_FLUSH BIT(1)
|
||||
|
||||
--
|
||||
cgit v1.2.3-1-gf6bb5
|
||||
|
349
kernel.spec
349
kernel.spec
@ -1,5 +1,5 @@
|
||||
# openmamba kernel specfile
|
||||
# Copyright (C) 2004-2018 by Silvan Calarco
|
||||
# Copyright (C) 2004-2020 by Silvan Calarco
|
||||
# Copyright (C) 2004-2006 by Davide Madrisan
|
||||
# released under the GPL version 3 license
|
||||
#
|
||||
@ -74,7 +74,7 @@
|
||||
%define _use_internal_dependency_generator 1
|
||||
|
||||
Name: kernel
|
||||
Version: 4.19.114
|
||||
Version: 5.4.53
|
||||
Release: 1mamba
|
||||
Summary: The Linux Kernel, the operating system core itself
|
||||
Group: System/Kernel and Hardware
|
||||
@ -91,10 +91,10 @@ Source0: https://cdn.kernel.org/pub/linux/kernel/v%{kernel_MAJver}.x/linux
|
||||
#%endif
|
||||
Source7: %{name}-rt-i586-config
|
||||
Source9: %{name}-custom-i586-config
|
||||
Source11: %{name}-%{kernel_majver}.88-mamba-config
|
||||
Source12: %{name}-%{kernel_majver}.88-mamba-x86_64-config
|
||||
Source13: %{name}-%{kernel_majver}.88-mamba-64GB-config
|
||||
Source15: %{name}-%{kernel_majver}.88-mamba-arm-config
|
||||
Source11: %{name}-%{kernel_majver}-mamba-config
|
||||
Source12: %{name}-%{kernel_majver}.31-mamba-x86_64-config
|
||||
Source13: %{name}-%{kernel_majver}-mamba-64GB-config
|
||||
Source15: %{name}-%{kernel_majver}-mamba-arm-config
|
||||
Source20: %{name}-%{kernel_majver}-mamba-arm-dove-config
|
||||
Patch0: kernel-2.6.35-430-scsi_header_fix.patch
|
||||
# Ingo Molnar's RT patch
|
||||
@ -115,9 +115,17 @@ Patch78: kernel-4.14.1-x86-uaccess-static-inline-set_fs.patch
|
||||
Patch79: kernel-4.14.7-Cherrytrail_ACPI_Drop_nnecessary_ACPI_GPIO_to_Linux_GPIO_translation.patch
|
||||
# https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.12/100-overlayfs.patch?order=name
|
||||
Patch100: kernel-3.14.2-overlayfs.patch
|
||||
Patch101: kernel-5.4.53-revert-to-fix-ath9k_htc.patch
|
||||
URL: http://www.kernel.org
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: ldconfig
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: libperl
|
||||
BuildRequires: libyaml-devel
|
||||
BuildRequires: perl-devel
|
||||
## AUTOBUILDREQ-END
|
||||
#BuildRequires: /bin/bash /bin/sh
|
||||
#BuildRequires: module-init-tools >= 3.1
|
||||
@ -160,6 +168,8 @@ Provides: kernelsound-%{KERNEL_TARGET}-%{kernel_ver}
|
||||
Provides: kernel-%{KERNEL_TARGET}-sound = %{version}-%{release}
|
||||
|
||||
Requires: linux-firmware
|
||||
Requires: alsa-firmware
|
||||
Requires: alsa-sof-firmware
|
||||
Provides: kernel = %{version}
|
||||
|
||||
%description %{KERNEL_TARGET}
|
||||
@ -184,6 +194,7 @@ This kernel sources are configured for %{TARGET_CPU} architecture and the follow
|
||||
Group: Development/Kernel
|
||||
Summary: Headers, scripts, configuration and Makefile for the linux kernel
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
Requires(post): dkms >= 2.8.3-2mamba
|
||||
Provides: kernelheaders = %{version}
|
||||
|
||||
%description %{KERNEL_TARGET}-headers
|
||||
@ -236,6 +247,9 @@ mv linux-%{version}/* .
|
||||
rm -r linux-%{version}
|
||||
%endif
|
||||
|
||||
# Disable build-ids to avoid conflicts
|
||||
%define _build_id_links none
|
||||
|
||||
# add here subrelease patch
|
||||
#%if "%{?kernel_longterm}" != "1"
|
||||
#%if "%{?kernel_pl}" != ""
|
||||
@ -337,8 +351,13 @@ cp $kernel_cfg ./.config
|
||||
#%patch53 -p1
|
||||
%patch59 -p1
|
||||
#%patch77 -p1
|
||||
%patch78 -p1 -R
|
||||
#%patch78 -p1 -R
|
||||
#%patch79 -p1
|
||||
#%patch101 -p1 -R
|
||||
|
||||
# Setting version
|
||||
scripts/setlocalversion --save-scmversion
|
||||
echo "%{?KERNEL_TARGET}" > localversion.20-pkgname
|
||||
|
||||
%build
|
||||
#:<< ___EOF
|
||||
@ -347,8 +366,12 @@ cp $kernel_cfg ./.config
|
||||
#
|
||||
sed -i 's@/usr/bin/env@/bin/env@' ./arch/ia64/scripts/unwcheck.py
|
||||
ARCH=%{target_cpu} make oldconfig
|
||||
cp Makefile Makefile.orig
|
||||
sed -i "s/\(EXTRAVERSION =\).*/\1 %{?KERNEL_TARGET}/" Makefile
|
||||
|
||||
#cp Makefile Makefile.orig
|
||||
#sed -i "s/\(EXTRAVERSION =\).*/\1 %{?KERNEL_TARGET}/" Makefile
|
||||
|
||||
make -s kernelrelease > version
|
||||
|
||||
PATH=%{_bindir}:$PATH \
|
||||
ARCH=%{target_cpu} \
|
||||
make CROSS_COMPILE=%{_target_platform}- \
|
||||
@ -373,10 +396,13 @@ fi
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
# create system dirs in install environment
|
||||
install -d %{buildroot}{/usr/src/,/boot,%{_initrddir},/lib/modules}
|
||||
install -d %{buildroot}{/usr/src/,/boot,/lib/modules}
|
||||
|
||||
#
|
||||
# install modules
|
||||
#
|
||||
ARCH=%{target_cpu} make \
|
||||
modules_install INSTALL_MOD_PATH=%{buildroot} DEPMOD=%{DEPMOD}
|
||||
modules_install INSTALL_MOD_PATH=%{buildroot} INSTALL_MOD_STRIP=1
|
||||
|
||||
install -m0644 modules.builtin %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/
|
||||
install -m0644 modules.order %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/
|
||||
@ -384,14 +410,14 @@ install -m0644 modules.order %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TAR
|
||||
(cd %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}
|
||||
rm -f build && ln -sf /usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET} build )
|
||||
|
||||
# copy modules to major directory location (e.g. 2.6.11) and create
|
||||
# a symlink for the current 4 numbers release (e.g. 2.6.11.11) pointing to
|
||||
# that dir
|
||||
#if [ "%{kernel_pl}" ]; then
|
||||
# mv %{buildroot}/lib/modules/%{version}%{?KERNEL_TARGET} %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}
|
||||
# ln -s %{kernel_ver}%{?KERNEL_TARGET} %{buildroot}/lib/modules/%{version}%{?KERNEL_TARGET}
|
||||
#fi
|
||||
# clean modules files created by depmod
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.{alias,alias.bin,ccwmap,dep,dep.bin,devname,ieee1394map}
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.{inputmap,isapnpmap,ofmap,pcimap,seriomap,softdep}
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.{symbols,symbols.bin,usbmap}
|
||||
|
||||
#
|
||||
# install boot files
|
||||
#
|
||||
cp %{KIMAGE} %{buildroot}/boot/%{KIMAGE_DEST}-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
|
||||
#%if %{_target_cpu} == arm
|
||||
@ -400,135 +426,73 @@ cp %{KIMAGE} %{buildroot}/boot/%{KIMAGE_DEST}-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
|
||||
cp System.map %{buildroot}/boot/System.map-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
|
||||
# recreate kernel sources
|
||||
[ -e kernel-headers.files ] && rm -f kernel-headers.files
|
||||
[ -e kernel-source.files ] && rm -f kernel-source.files
|
||||
cp -R %{_builddir}/%{name}-%{kernel_ver}%{?KERNEL_TARGET} %{buildroot}/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
|
||||
cd %{buildroot}/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
ARCH=%{target_cpu} make mrproper
|
||||
%if %{_target_cpu} == i586
|
||||
case %{?KERNEL_TARGET} in
|
||||
mamba) kernel_cfg=%{SOURCE11} ;;
|
||||
mamba-64GB) kernel_cfg=%{SOURCE13} ;;
|
||||
mamba-64GB-rt) kernel_cfg=%{SOURCE16} ;;
|
||||
mamba-rt) kernel_cfg=%{SOURCE17} ;;
|
||||
custom) kernel_cfg=%{SOURCE9} ;;
|
||||
rt) kernel_cfg=%{SOURCE7} ;;
|
||||
esac
|
||||
%endif
|
||||
%if %{_target_cpu} == x86_64
|
||||
case %{?KERNEL_TARGET} in
|
||||
mamba-x86_64) kernel_cfg=%{SOURCE12} ;;
|
||||
mamba-x86_64-rt) kernel_cfg=%{SOURCE19} ;;
|
||||
mamba-xen) kernel_cfg=%{SOURCE14} ;;
|
||||
esac
|
||||
%endif
|
||||
%if %{_target_cpu} == arm
|
||||
case %{?KERNEL_TARGET} in
|
||||
mamba-arm) kernel_cfg=%{SOURCE15} ;;
|
||||
mamba-arm-kirkwood) kernel_cfg=%{SOURCE18} ;;
|
||||
mamba-arm-dove) kernel_cfg=%{SOURCE20} ;;
|
||||
esac
|
||||
%endif
|
||||
%if %{_target_cpu} == ppc
|
||||
case %{?KERNEL_TARGET} in
|
||||
mamba-ppc) kernel_cfg=%{SOURCE8} ;;
|
||||
esac
|
||||
%endif
|
||||
|
||||
cp $kernel_cfg %{buildroot}/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/.config
|
||||
cp %{_builddir}/%{name}-%{kernel_ver}%{?KERNEL_TARGET}/Module.symvers %{buildroot}/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
#cp Makefile Makefile.orig
|
||||
#sed -i "s/\(EXTRAVERSION =.*\)/\1%{?KERNEL_TARGET}/" Makefile
|
||||
#%if "%{_target_platform}" == "%{_build}"
|
||||
|
||||
# FIXME: problems cross-compiling and running x86_64 tools on x86; building as x86 code for now
|
||||
ARCH=%{target_cpu} make \
|
||||
#
|
||||
# install sanitised headers used by glibc
|
||||
#
|
||||
ARCH=%{target_cpu} make headers_install \
|
||||
HOSTCC=%{_build}-gcc \
|
||||
CROSS_COMPILE=%{_target_platform}- \
|
||||
prepare scripts oldconfig
|
||||
|
||||
cp -a include/generated/* include/linux/
|
||||
#%endif
|
||||
rm .config.old
|
||||
|
||||
# clean modules files created by depmod
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.{alias,alias.bin,ccwmap,dep,dep.bin,devname,ieee1394map}
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.{inputmap,isapnpmap,ofmap,pcimap,seriomap,softdep}
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.{symbols,symbols.bin,usbmap}
|
||||
|
||||
# remove .tmp files if any
|
||||
rm -f %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/.tmp* || true
|
||||
|
||||
# clean a wrong symlink
|
||||
[ -L %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch/ppc/include/asm ] && \
|
||||
{
|
||||
rm -f %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch/ppc/include/asm
|
||||
ln -sf ../../../include/asm %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch/ppc/include/asm
|
||||
}
|
||||
|
||||
# fix symlink pointing to sources
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/source
|
||||
ln -s %{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET} %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/source
|
||||
INSTALL_HDR_PATH=%{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{KERNEL_TARGET}/usr
|
||||
|
||||
#
|
||||
# create kernel-source.files and kernel-headers.files
|
||||
# install kernel headers
|
||||
#
|
||||
cd %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
|
||||
splitdirs="block crypto drivers fs ipc kernel lib mm net security sound"
|
||||
case %{_target_cpu} in
|
||||
i586|x86_64) headers_arch="x86" ;;
|
||||
arm) headers_arch="arm" ;;
|
||||
ppc) headers_arch="powerpc" ;;
|
||||
esac
|
||||
|
||||
# discovered while building nvidia 304.88 for 3.10
|
||||
%ifnarch arm
|
||||
[ -e %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/include/uapi/asm ] || \
|
||||
ln -s ../../arch/$headers_arch/include/uapi/asm \
|
||||
%{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/include/uapi/asm
|
||||
build_dir=%{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{KERNEL_TARGET}
|
||||
|
||||
[ -e %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/include/asm ] || \
|
||||
ln -s ../arch/$headers_arch/include/asm \
|
||||
%{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/include/asm
|
||||
%endif
|
||||
install -Dt ${build_dir} -m644 .config Makefile Module.symvers System.map localversion.* version
|
||||
install -Dt ${build_dir}/kernel -m644 kernel/Makefile
|
||||
install -Dt ${build_dir}/arch/${headers_arch} -m644 arch/${headers_arch}/Makefile
|
||||
cp -t ${build_dir} -a scripts
|
||||
|
||||
find $splitdirs -type f -name *.h -exec \
|
||||
echo "%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/"{} >> \
|
||||
%{_builddir}/kernel-%{kernel_ver}%{?KERNEL_TARGET}/kernel-headers.files \;
|
||||
# add objtool for external module building and enabled VALIDATION_STACK option
|
||||
[ -e tools/objtool/objtool ] && install -Dt ${build_dir}/tools/objtool tools/objtool/objtool
|
||||
|
||||
%if "%{with_full_source}" == "1"
|
||||
find $splitdirs -type f -not -name *.h -exec \
|
||||
echo "%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/"{} >> \
|
||||
%{_builddir}/kernel-%{kernel_ver}%{?KERNEL_TARGET}/kernel-source.files \;
|
||||
%else
|
||||
touch %{_builddir}/kernel-%{kernel_ver}%{?KERNEL_TARGET}/kernel-source.files
|
||||
find $splitdirs -type f -not -name *.h -exec rm -f {} \;
|
||||
rm -rf firmware samples virt
|
||||
%endif
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p ${build_dir}/{fs/xfs,mm}
|
||||
|
||||
archs=" `ls %{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch` "
|
||||
# installing headers
|
||||
cp -t ${build_dir} -a include
|
||||
install -d ${build_dir}/tools
|
||||
cp -t ${build_dir}/tools -a tools/include
|
||||
|
||||
for i in $archs; do
|
||||
[ "$i" == "$headers_arch" ] || \
|
||||
%if "%{with_full_source}" == "1"
|
||||
echo "%{_prefix}/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch/$i" >> \
|
||||
%{_builddir}/kernel-%{kernel_ver}%{?KERNEL_TARGET}/kernel-source.files
|
||||
%else
|
||||
rm -rf arch/$i
|
||||
%endif
|
||||
# Needed build files
|
||||
#cp -t ${build_dir}/arch/${headers_arch} -a arch/${headers_arch}/entry
|
||||
cp -t ${build_dir}/arch/${headers_arch} -a arch/${headers_arch}/include
|
||||
|
||||
install -Dt ${build_dir}/arch/${headers_arch}/kernel -m644 arch/${headers_arch}/kernel/asm-offsets.s
|
||||
cp -r arch/${headers_arch}/tools ${build_dir}/arch/${headers_arch}
|
||||
|
||||
# install Kconfig files
|
||||
find . -name 'Kconfig*' -exec install -Dm644 {} ${build_dir}/{} \;
|
||||
|
||||
# Remove unneeded architectures
|
||||
for arch in ${build_dir}/arch/*/; do
|
||||
[[ $arch = */${headers_arch}/ ]] && continue
|
||||
echo "Removing $(basename "$arch")"
|
||||
rm -r "$arch"
|
||||
done
|
||||
|
||||
cd %{_builddir}/kernel-%{kernel_ver}%{?KERNEL_TARGET}
|
||||
echo "/arch/$headers_arch" kernel-headers.files
|
||||
# Remove broken symlinks
|
||||
find -L ${build_dir} -type l -printf 'Removing %%P\n' -delete
|
||||
|
||||
# install sanitised headers used by glibc
|
||||
ARCH=%{target_cpu} make headers_install \
|
||||
HOSTCC=%{_build}-gcc \
|
||||
CROSS_COMPILE=%{_target_platform}- \
|
||||
INSTALL_HDR_PATH=%{buildroot}%{_prefix}/src/linux-%{kernel_ver}%{KERNEL_TARGET}/usr
|
||||
# Remove loose objects
|
||||
find ${build_dir} -type f -name '*.o' -printf 'Removing %%P\n' -delete
|
||||
|
||||
# Stripping vmlinux
|
||||
#strip -v ${build_dir}/vmlinux
|
||||
|
||||
# Remove sources link
|
||||
rm -f %{buildroot}/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/source
|
||||
|
||||
## Remove Kconfig in Documentation
|
||||
#rm -r ${build_dir}/Documentation
|
||||
|
||||
# Do not package cross-platform host tools
|
||||
if [ "%{_build}" != "%{_target_platform}" ]; then
|
||||
@ -537,11 +501,6 @@ if [ "%{_build}" != "%{_target_platform}" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# HOSTCC=%{_build}-gcc \
|
||||
|
||||
# from kernel 3.0.4 patch
|
||||
rm -f %{buildroot}/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/MAINTAINERS.orig
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
@ -650,8 +609,9 @@ exit 0
|
||||
#%endif
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.builtin
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.builtin.bin
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.builtin.alias.bin
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.builtin.bin
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.builtin.modinfo
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/modules.order
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/arch
|
||||
@ -669,8 +629,6 @@ exit 0
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/locking/*.ko
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/rcu
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/rcu/*
|
||||
#%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/sched
|
||||
#/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/sched/*
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/time
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/kernel/time/*.ko
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/lib
|
||||
@ -682,77 +640,94 @@ exit 0
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/security
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/security/*
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/sound
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/sound
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/sound/*
|
||||
%dir /lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/virt
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/kernel/virt/*
|
||||
|
||||
%files %{KERNEL_TARGET}-source
|
||||
%defattr(-,root,root)
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch/.gitignore
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Documentation
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/gen_initramfs_list.sh
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/gen_init_cpio.c
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/initramfs_data.S
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/Kconfig
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/Makefile
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/.gitignore
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/tools
|
||||
%ifarch x86_64
|
||||
%exclude /usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/tools/objtool/objtool
|
||||
%endif
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/.missing-syscalls.d
|
||||
%if "%{with_full_source}" == "1"
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/block
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/firmware
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/samples
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/virt
|
||||
%endif
|
||||
%doc COPYING CREDITS MAINTAINERS
|
||||
|
||||
%files %{KERNEL_TARGET}-headers-sanitised
|
||||
%defattr(-,root,root)
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/include
|
||||
|
||||
%files %{KERNEL_TARGET}-headers -f kernel-headers.files
|
||||
%files %{KERNEL_TARGET}-headers
|
||||
%defattr(-,root,root)
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/COPYING
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/CREDITS
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Kbuild
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/localversion.20-pkgname
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Documentation
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Makefile
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Module.symvers
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/System.map
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/.config
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/scripts
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/version
|
||||
#/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/vmlinux
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Kconfig
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/arch
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/block
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/certs
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/certs/.gitignore
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/crypto
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/drivers
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/fs
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/kernel
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/include
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/init/
|
||||
%dir /usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES
|
||||
%dir /usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES/exceptions
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES/exceptions/*
|
||||
%dir /usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES/other
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES/other/*
|
||||
%dir /usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES/preferred
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/LICENSES/preferred/*
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Makefile
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Makefile.orig
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Module.symvers
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/MAINTAINERS
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/README
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/scripts
|
||||
%ifarch x86_64
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/tools/objtool/objtool
|
||||
%endif
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/.config
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/init
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/lib
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/mm
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/net
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/samples
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/security
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/sound
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/tools
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/virt
|
||||
/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/build
|
||||
/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/source
|
||||
|
||||
#%files %{?KERNEL_TARGET}-firmware
|
||||
#%defattr (-, root, root)
|
||||
#/lib/firmware/*
|
||||
|
||||
%changelog
|
||||
* Sun Apr 05 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.114-1mamba
|
||||
- update to 4.19.114
|
||||
#%files %{KERNEL_TARGET}-source
|
||||
#%defattr(-,root,root)
|
||||
#/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/Kbuild
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/gen_initramfs_list.sh
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/gen_init_cpio.c
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/initramfs_data.S
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/Makefile
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/usr/.gitignore
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/tools
|
||||
##/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/.missing-syscalls.d
|
||||
#/lib/modules/%{kernel_ver}%{?KERNEL_TARGET}/source
|
||||
#%if "%{with_full_source}" == "1"
|
||||
#/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/block
|
||||
#/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/firmware
|
||||
#/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/samples
|
||||
#/usr/src/linux-%{kernel_ver}%{?KERNEL_TARGET}/virt
|
||||
#%endif
|
||||
|
||||
* Tue Dec 10 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.88-1mamba
|
||||
- update to 4.19.88
|
||||
%changelog
|
||||
* Thu Jul 23 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.53-1mamba
|
||||
- update to 5.4.53
|
||||
- fix kernel headers by installing Kconfig files; reworked to only install needed files; strip modules
|
||||
|
||||
* Sat Jul 11 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.51-1mamba
|
||||
- update to 5.4.51
|
||||
|
||||
* Wed Apr 08 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.31-1mamba
|
||||
- update to 5.4.31
|
||||
|
||||
* Sun Jan 26 2020 Automatic Build System <autodist@mambasoft.it> 5.4.15-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Thu Jan 23 2020 Automatic Build System <autodist@mambasoft.it> 5.4.14-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Jan 18 2020 Automatic Build System <autodist@mambasoft.it> 5.4.13-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Dec 14 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.3-1mamba
|
||||
- update to 5.4.3
|
||||
|
||||
* Sun Jul 14 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2.1-1mamba
|
||||
- update to 5.2.1
|
||||
|
||||
* Sat Jul 06 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.57-1mamba
|
||||
- update to 4.19.57
|
||||
|
Loading…
Reference in New Issue
Block a user