mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
core/kernel26-trimslice to 2.6.38.3-3
This commit is contained in:
parent
9011a96f18
commit
8b820dccd2
3 changed files with 3091 additions and 32 deletions
core/kernel26-trimslice
|
@ -1,4 +1,4 @@
|
||||||
# Maintainer: Mike Staszel <mikestaszel@plugapps.com>
|
# Maintainer: Kevin Mihelich <kevin@plugapps.com>
|
||||||
|
|
||||||
# Trim Slice kernel and headers
|
# Trim Slice kernel and headers
|
||||||
# - note: any other kernel packages should include headers for that march
|
# - note: any other kernel packages should include headers for that march
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
# - This is built from TS's git repo (gitorious) with minimal patching
|
# - This is built from TS's git repo (gitorious) with minimal patching
|
||||||
|
|
||||||
noautobuild=1
|
noautobuild=1
|
||||||
plugrel=2
|
plugrel=1
|
||||||
|
|
||||||
pkgbase="kernel26"
|
pkgbase="kernel26"
|
||||||
pkgname=('kernel26-trimslice' 'kernel26-headers-trimslice')
|
pkgname=('kernel26-trimslice' 'kernel26-headers-trimslice')
|
||||||
|
@ -14,9 +14,7 @@ pkgname=('kernel26-trimslice' 'kernel26-headers-trimslice')
|
||||||
_kernelname=""
|
_kernelname=""
|
||||||
_basekernel=2.6.38
|
_basekernel=2.6.38
|
||||||
pkgver=${_basekernel}.3
|
pkgver=${_basekernel}.3
|
||||||
_pkgrel=1
|
pkgrel=3
|
||||||
pkgrel=${_pkgrel}
|
|
||||||
#pkgrel=${_pkgrel}.${plugrel}
|
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage' 'make')
|
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage' 'make')
|
||||||
_patchname="patch-${pkgver}-${_pkgrel}-ARCH"
|
_patchname="patch-${pkgver}-${_pkgrel}-ARCH"
|
||||||
#_patchname="patch-${pkgver}-1-ARCH"
|
#_patchname="patch-${pkgver}-1-ARCH"
|
||||||
|
@ -26,26 +24,24 @@ KARCH=arm
|
||||||
LDFLAGS=""
|
LDFLAGS=""
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
url="http://www.kernel.org"
|
url="http://www.kernel.org"
|
||||||
source=(ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2
|
source=(trimslice-kernel-1.02.tar.bz2
|
||||||
http://trimslice.com/download/drivers/firmware/rtl_nic/rtl8168d-1.fw
|
http://trimslice.com/download/drivers/firmware/rtl_nic/rtl8168d-1.fw
|
||||||
http://trimslice.com/download/drivers/firmware/rtl_nic/rtl8168d-2.fw)
|
http://trimslice.com/download/drivers/firmware/rtl_nic/rtl8168d-2.fw
|
||||||
md5sums=('5b14b6eb2cdcb074905d4974437c4df6'
|
config
|
||||||
|
armdma.patch)
|
||||||
|
md5sums=('34319c7c3700aef5f049d8352671b737'
|
||||||
'500d938ce15d1b0aff8d394aefb7a812'
|
'500d938ce15d1b0aff8d394aefb7a812'
|
||||||
'b14a1a124c2d58fd346ed25ffbbe2959')
|
'b14a1a124c2d58fd346ed25ffbbe2959'
|
||||||
options=('!distcc' '!ccache')
|
'5ee191dd2afe94623a5fc0c7c1177014'
|
||||||
|
'6e7667c6c6348bfeca22eaaa05462d62')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $srcdir
|
cd "${srcdir}/trimslice-kernel"
|
||||||
git clone git://gitorious.org/trimslice-kernel/trimslice-kernel.git --depth 1
|
|
||||||
cd trimslice-kernel
|
|
||||||
git checkout trimslice/1.01-upstream
|
|
||||||
|
|
||||||
# Add -ARCH patches
|
patch -p1 -i ${srcdir}/armdma.patch
|
||||||
# See http://projects.archlinux.org/linux-2.6-ARCH.git/
|
|
||||||
#patch -Np1 -i ${srcdir}/${_patchname} || echo "Cheating!"
|
|
||||||
|
|
||||||
# Copy in our configuration
|
# Copy in our configuration
|
||||||
#cp ../${_basekernel}.config ./.config
|
cp ${srcdir}/config ./.config
|
||||||
|
|
||||||
# Copy in the ethernet firmware, needed for make!
|
# Copy in the ethernet firmware, needed for make!
|
||||||
mkdir -p firmware/rtl_nic
|
mkdir -p firmware/rtl_nic
|
||||||
|
@ -53,24 +49,12 @@ build() {
|
||||||
cp ${srcdir}/rtl8168d-2.fw firmware/rtl_nic/
|
cp ${srcdir}/rtl8168d-2.fw firmware/rtl_nic/
|
||||||
|
|
||||||
# Prepare sources
|
# Prepare sources
|
||||||
#make prepare
|
make prepare
|
||||||
make clean # sometimes git isn't clean
|
|
||||||
make mrproper # same as above
|
|
||||||
# Configure the kernel. Replace the line below with one of your choice.
|
# Configure the kernel. Replace the line below with one of your choice.
|
||||||
make trimslice_defconfig # The branch we're using
|
|
||||||
#make menuconfig # CLI menu for configuration
|
#make menuconfig # CLI menu for configuration
|
||||||
#make nconfig # new CLI menu for configuration
|
#make nconfig # new CLI menu for configuration
|
||||||
#make oldconfig # using old config from previous kernel version
|
#make oldconfig # using old config from previous kernel version
|
||||||
|
|
||||||
# Make the config compatible with Arch Linux's naming scheme
|
|
||||||
sed 's|CONFIG_LOCALVERSION="-trimslice-1.01"|CONFIG_LOCALVERSION="-ARCH"|g' -i .config
|
|
||||||
|
|
||||||
# Copy back our configuration (use with new kernel version)
|
|
||||||
#cp ./.config ../${_basekernel}.config
|
|
||||||
|
|
||||||
# Halt the build for configuration only
|
|
||||||
#return 1
|
|
||||||
|
|
||||||
# Build!
|
# Build!
|
||||||
make ${MAKEFLAGS} uImage modules
|
make ${MAKEFLAGS} uImage modules
|
||||||
}
|
}
|
||||||
|
@ -237,5 +221,5 @@ package_kernel26-headers-trimslice() {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
# remove unneeded architectures
|
# remove unneeded architectures
|
||||||
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
|
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,x86,xtensa}
|
||||||
}
|
}
|
||||||
|
|
122
core/kernel26-trimslice/armdma.patch
Normal file
122
core/kernel26-trimslice/armdma.patch
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
diff -urN linux-3.1-rc4-a/arch/arm/include/asm/dma-mapping.h linux-3.1-rc4-b/arch/arm/include/asm/dma-mapping.h
|
||||||
|
--- linux-3.1-rc4-a/arch/arm/include/asm/dma-mapping.h 2011-08-29 05:16:01.000000000 +0100
|
||||||
|
+++ linux-3.1-rc4-b/arch/arm/include/asm/dma-mapping.h 2011-09-02 12:09:00.000000000 +0100
|
||||||
|
@@ -205,6 +205,15 @@
|
||||||
|
int dma_mmap_writecombine(struct device *, struct vm_area_struct *,
|
||||||
|
void *, dma_addr_t, size_t);
|
||||||
|
|
||||||
|
+#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
|
||||||
|
+#define ARCH_HAS_DMA_COHERENT_WRITE_SYNC
|
||||||
|
+
|
||||||
|
+static inline void dma_coherent_write_sync(void)
|
||||||
|
+{
|
||||||
|
+ dsb();
|
||||||
|
+ outer_sync();
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DMABOUNCE
|
||||||
|
/*
|
||||||
|
diff -urN linux-3.1-rc4-a/Documentation/DMA-API-HOWTO.txt linux-3.1-rc4-b/Documentation/DMA-API-HOWTO.txt
|
||||||
|
--- linux-3.1-rc4-a/Documentation/DMA-API-HOWTO.txt 2011-08-29 05:16:01.000000000 +0100
|
||||||
|
+++ linux-3.1-rc4-b/Documentation/DMA-API-HOWTO.txt 2011-09-02 12:01:09.000000000 +0100
|
||||||
|
@@ -400,6 +400,22 @@
|
||||||
|
from a pool before you destroy the pool. This function may not
|
||||||
|
be called in interrupt context.
|
||||||
|
|
||||||
|
+Some architectures which supporting DMA coherent memory may still have write
|
||||||
|
+buffering between the CPU and DMA memory. This buffering may delay CPU writes
|
||||||
|
+from reaching coherent memory in a timely manner. These delays in turn can
|
||||||
|
+lead lead to dramatic performance issues in certain cases. An architecture
|
||||||
|
+may mitigate this problem to a large degree by having a write buffer flush
|
||||||
|
+implicit in the MMIO functions used to write to device registers. This works
|
||||||
|
+for the most common cases where a driver needs to write to a register to tell
|
||||||
|
+a device that something was written to the shared coherent memory. There are
|
||||||
|
+other cases where the device polls the dma-coherent memory for data written
|
||||||
|
+by the driver. In such cases, the driver needs to explicity force write buffer
|
||||||
|
+data to memory by calling:
|
||||||
|
+
|
||||||
|
+ dma_coherent_write_sync();
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
DMA Direction
|
||||||
|
|
||||||
|
The interfaces described in subsequent portions of this document
|
||||||
|
diff -urN linux-3.1-rc4-a/Documentation/DMA-API.txt linux-3.1-rc4-b/Documentation/DMA-API.txt
|
||||||
|
--- linux-3.1-rc4-a/Documentation/DMA-API.txt 2011-08-29 05:16:01.000000000 +0100
|
||||||
|
+++ linux-3.1-rc4-b/Documentation/DMA-API.txt 2011-09-02 12:03:06.000000000 +0100
|
||||||
|
@@ -418,6 +418,18 @@
|
||||||
|
....
|
||||||
|
|
||||||
|
|
||||||
|
+Part Ie - Write buffering to dma-coherent memory
|
||||||
|
+------------------------------------------------
|
||||||
|
+
|
||||||
|
+Some architectures supporting DMA coherent memory may have write
|
||||||
|
+buffering between the CPU and DMA memory. This buffering may delay
|
||||||
|
+CPU writes from reaching coherent memory in a timely manner.
|
||||||
|
+
|
||||||
|
+ void
|
||||||
|
+ dma_coherent_write_sync()
|
||||||
|
+
|
||||||
|
+Force any outstanding coherent writes to memory.
|
||||||
|
+
|
||||||
|
Part II - Advanced dma_ usage
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
diff -urN linux-3.1-rc4-a/drivers/usb/host/ehci-q.c linux-3.1-rc4-b/drivers/usb/host/ehci-q.c
|
||||||
|
--- linux-3.1-rc4-a/drivers/usb/host/ehci-q.c 2011-08-29 05:16:01.000000000 +0100
|
||||||
|
+++ linux-3.1-rc4-b/drivers/usb/host/ehci-q.c 2011-09-02 12:17:20.000000000 +0100
|
||||||
|
@@ -114,6 +114,7 @@
|
||||||
|
/* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
|
||||||
|
wmb ();
|
||||||
|
hw->hw_token &= cpu_to_hc32(ehci, QTD_TOGGLE | QTD_STS_PING);
|
||||||
|
+ dma_coherent_write_sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if it weren't for a common silicon quirk (writing the dummy into the qh
|
||||||
|
@@ -404,6 +405,7 @@
|
||||||
|
wmb();
|
||||||
|
hw->hw_token = cpu_to_hc32(ehci,
|
||||||
|
token);
|
||||||
|
+ dma_coherent_write_sync();
|
||||||
|
goto retry_xacterr;
|
||||||
|
}
|
||||||
|
stopped = 1;
|
||||||
|
@@ -753,8 +755,10 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
/* by default, enable interrupt on urb completion */
|
||||||
|
- if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
|
||||||
|
+ if (likely(!(urb->transfer_flags & URB_NO_INTERRUPT))) {
|
||||||
|
qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC);
|
||||||
|
+ dma_coherent_write_sync();
|
||||||
|
+ }
|
||||||
|
return head;
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
@@ -1081,6 +1085,7 @@
|
||||||
|
/* let the hc process these next qtds */
|
||||||
|
wmb ();
|
||||||
|
dummy->hw_token = token;
|
||||||
|
+ dma_coherent_write_sync();
|
||||||
|
|
||||||
|
urb->hcpriv = qh_get (qh);
|
||||||
|
}
|
||||||
|
diff -urN linux-3.1-rc4-a/include/linux/dma-mapping.h linux-3.1-rc4-b/include/linux/dma-mapping.h
|
||||||
|
--- linux-3.1-rc4-a/include/linux/dma-mapping.h 2011-08-29 05:16:01.000000000 +0100
|
||||||
|
+++ linux-3.1-rc4-b/include/linux/dma-mapping.h 2011-09-02 12:06:06.000000000 +0100
|
||||||
|
@@ -154,6 +154,12 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifndef ARCH_HAS_DMA_COHERENT_WRITE_SYNC
|
||||||
|
+static inline void dma_coherent_write_sync(void)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Managed DMA API
|
||||||
|
*/
|
2953
core/kernel26-trimslice/config
Normal file
2953
core/kernel26-trimslice/config
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue