mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
core/linux-odroid-xu3 to 4.9.13-1
This commit is contained in:
parent
11b93a4dda
commit
1cf6251e4c
7 changed files with 2696 additions and 1603 deletions
|
@ -1,44 +0,0 @@
|
||||||
From b2e8eb3c57c2c2c624ad92308ac3d2ec0f0ef622 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
||||||
Date: Thu, 8 Dec 2016 19:58:12 -0700
|
|
||||||
Subject: [PATCH 1/2] exynos-ss GCC6 compatibility
|
|
||||||
|
|
||||||
---
|
|
||||||
arch/arm/mach-exynos/exynos-ss.c | 14 +++++++-------
|
|
||||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm/mach-exynos/exynos-ss.c b/arch/arm/mach-exynos/exynos-ss.c
|
|
||||||
index 9ede7277bc7d..e8c7836f9807 100644
|
|
||||||
--- a/arch/arm/mach-exynos/exynos-ss.c
|
|
||||||
+++ b/arch/arm/mach-exynos/exynos-ss.c
|
|
||||||
@@ -238,6 +238,13 @@ struct exynos_ss_interface {
|
|
||||||
struct exynos_ss_hook info_hook;
|
|
||||||
};
|
|
||||||
|
|
||||||
+enum ess_cause_emerg_events {
|
|
||||||
+ CAUSE_INVALID_DUMP = 0x00000000,
|
|
||||||
+ CAUSE_KERNEL_PANIC = 0x00000001,
|
|
||||||
+ CAUSE_FORCE_DUMP = 0x0000000D,
|
|
||||||
+ CAUSE_FORCE_REBOOT = 0x000000FF,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
extern void (*arm_pm_restart)(char str, const char *cmd);
|
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,5,00)
|
|
||||||
extern void register_hook_logbuf(void (*)(const char));
|
|
||||||
@@ -493,13 +500,6 @@ static inline void exynos_ss_hook_logbuf(const char *buf, u64 ts_nsec, size_t si
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-enum ess_cause_emerg_events {
|
|
||||||
- CAUSE_INVALID_DUMP = 0x00000000,
|
|
||||||
- CAUSE_KERNEL_PANIC = 0x00000001,
|
|
||||||
- CAUSE_FORCE_DUMP = 0x0000000D,
|
|
||||||
- CAUSE_FORCE_REBOOT = 0x000000FF,
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
static void exynos_ss_scratch_reg(unsigned int val)
|
|
||||||
{
|
|
||||||
__raw_writel(val, S5P_VA_SS_SCRATCH);
|
|
||||||
--
|
|
||||||
2.11.1
|
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
From 8c2a2d97be6bc64335cbc0194bacab0940ba6909 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Philip Pettersson <philip.pettersson@gmail.com>
|
|
||||||
Date: Wed, 30 Nov 2016 14:55:36 -0800
|
|
||||||
Subject: [PATCH 2/2] packet: fix race condition in packet_set_ring
|
|
||||||
|
|
||||||
When packet_set_ring creates a ring buffer it will initialize a
|
|
||||||
struct timer_list if the packet version is TPACKET_V3. This value
|
|
||||||
can then be raced by a different thread calling setsockopt to
|
|
||||||
set the version to TPACKET_V1 before packet_set_ring has finished.
|
|
||||||
|
|
||||||
This leads to a use-after-free on a function pointer in the
|
|
||||||
struct timer_list when the socket is closed as the previously
|
|
||||||
initialized timer will not be deleted.
|
|
||||||
|
|
||||||
The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
|
|
||||||
changing the packet version while also taking the lock at the start
|
|
||||||
of packet_set_ring.
|
|
||||||
|
|
||||||
Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
|
|
||||||
Signed-off-by: Philip Pettersson <philip.pettersson@gmail.com>
|
|
||||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
|
||||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
---
|
|
||||||
net/packet/af_packet.c | 18 ++++++++++++------
|
|
||||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
|
|
||||||
index 24f006623f7c..e38c69969c33 100644
|
|
||||||
--- a/net/packet/af_packet.c
|
|
||||||
+++ b/net/packet/af_packet.c
|
|
||||||
@@ -3135,19 +3135,25 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
|
|
||||||
|
|
||||||
if (optlen != sizeof(val))
|
|
||||||
return -EINVAL;
|
|
||||||
- if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
|
|
||||||
- return -EBUSY;
|
|
||||||
if (copy_from_user(&val, optval, sizeof(val)))
|
|
||||||
return -EFAULT;
|
|
||||||
switch (val) {
|
|
||||||
case TPACKET_V1:
|
|
||||||
case TPACKET_V2:
|
|
||||||
case TPACKET_V3:
|
|
||||||
- po->tp_version = val;
|
|
||||||
- return 0;
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
+ lock_sock(sk);
|
|
||||||
+ if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
|
|
||||||
+ ret = -EBUSY;
|
|
||||||
+ } else {
|
|
||||||
+ po->tp_version = val;
|
|
||||||
+ ret = 0;
|
|
||||||
+ }
|
|
||||||
+ release_sock(sk);
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
case PACKET_RESERVE:
|
|
||||||
{
|
|
||||||
@@ -3603,6 +3609,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
|
||||||
/* Added to avoid minimal code churn */
|
|
||||||
struct tpacket_req *req = &req_u->req;
|
|
||||||
|
|
||||||
+ lock_sock(sk);
|
|
||||||
/* Opening a Tx-ring is NOT supported in TPACKET_V3 */
|
|
||||||
if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
|
|
||||||
WARN(1, "Tx-ring is not supported.\n");
|
|
||||||
@@ -3684,7 +3691,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- lock_sock(sk);
|
|
||||||
|
|
||||||
/* Detach socket from network */
|
|
||||||
spin_lock(&po->bind_lock);
|
|
||||||
@@ -3733,11 +3739,11 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
|
||||||
if (!tx_ring)
|
|
||||||
prb_shutdown_retire_blk_timer(po, tx_ring, rb_queue);
|
|
||||||
}
|
|
||||||
- release_sock(sk);
|
|
||||||
|
|
||||||
if (pg_vec)
|
|
||||||
free_pg_vec(pg_vec, order, req->tp_block_nr);
|
|
||||||
out:
|
|
||||||
+ release_sock(sk);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.11.1
|
|
||||||
|
|
11
core/linux-odroid-xu3/99-linux.hook
Normal file
11
core/linux-odroid-xu3/99-linux.hook
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Trigger]
|
||||||
|
Type = File
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = boot/zImage
|
||||||
|
Target = usr/lib/initcpio/*
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Updating %PKGBASE% initcpios
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
|
@ -1,48 +1,32 @@
|
||||||
# ODROID-XU3
|
# ODROID-XU3/4
|
||||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
|
||||||
buildarch=4
|
buildarch=4
|
||||||
|
|
||||||
pkgbase=linux-odroid-xu3
|
pkgbase=linux-odroid-xu3
|
||||||
_commit=4e555dd7a15cc7ce3d8131655d8cc20f7abac661
|
_commit=d3d2fb3a7aa850aea3033b6b342d28dba1a4499f
|
||||||
_srcname=linux-${_commit}
|
_srcname=linux-${_commit}
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
_desc="ODROID-XU3"
|
_desc="ODROID-XU3/4"
|
||||||
pkgver=3.10.105
|
pkgver=4.9.13
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
bfqver=v7r8
|
|
||||||
arch=('armv7h')
|
arch=('armv7h')
|
||||||
url="https://github.com/hardkernel/linux"
|
url="https://github.com/hardkernel/linux"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
source=("https://github.com/hardkernel/linux/archive/${_commit}.tar.gz"
|
source=("https://github.com/hardkernel/linux/archive/${_commit}.tar.gz"
|
||||||
'0001-exynos-ss-GCC6-compatibility.patch'
|
'config'
|
||||||
'0002-packet-fix-race-condition-in-packet_set_ring.patch'
|
'linux.preset'
|
||||||
"ftp://teambelgium.net/bfq/patches/${pkgver:0:4}.8+-${bfqver}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver:0:4}.8.patch"
|
'99-linux.hook')
|
||||||
"ftp://teambelgium.net/bfq/patches/${pkgver:0:4}.8+-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver:0:4}.8.patch"
|
md5sums=('d686162a69abb01e4556bd9bcf16bda9'
|
||||||
"ftp://teambelgium.net/bfq/patches/${pkgver:0:4}.8+-${bfqver}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${pkgver:0:4}.8+.patch"
|
'ec81d3ac62ed4a79b3d40aa74e915d77'
|
||||||
'config')
|
'a84976d500db50cee07177eccfe2f455'
|
||||||
md5sums=('326ef327f8da09e0a3194814ff9575e2'
|
'79fa396e3f9a09a85156d6d7c2d34b58')
|
||||||
'b38a203d9083d66e31196494513fd5a3'
|
|
||||||
'd366eb182dc5ba9fa033f0c36af921a0'
|
|
||||||
'003f1554be6b672100d2f2401a574d92'
|
|
||||||
'12ffe57584b4f2adcc3e184dc6948772'
|
|
||||||
'9e78f9f5364f8ebb981aeb235dcb7415'
|
|
||||||
'bea5e3a60a7303c76156f506f46e2d3f')
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${srcdir}/${_srcname}"
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
# ALARM patches
|
|
||||||
git apply ../0001-exynos-ss-GCC6-compatibility.patch
|
|
||||||
git apply ../0002-packet-fix-race-condition-in-packet_set_ring.patch
|
|
||||||
|
|
||||||
# Add BFQ patches
|
|
||||||
patch -sNp1 -i "${srcdir}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver:0:4}.8.patch"
|
|
||||||
patch -sNp1 -i "${srcdir}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver:0:4}.8.patch"
|
|
||||||
patch -sNp1 -i "${srcdir}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${pkgver:0:4}.8+.patch"
|
|
||||||
|
|
||||||
cat "${srcdir}/config" > ./.config
|
cat "${srcdir}/config" > ./.config
|
||||||
|
|
||||||
# add pkgrel to extraversion
|
# add pkgrel to extraversion
|
||||||
|
@ -79,13 +63,14 @@ build() {
|
||||||
#yes "" | make config
|
#yes "" | make config
|
||||||
|
|
||||||
# build!
|
# build!
|
||||||
make ${MAKEFLAGS} zImage modules exynos5422-odroidxu3.dtb
|
make ${MAKEFLAGS} zImage modules dtbs
|
||||||
}
|
}
|
||||||
|
|
||||||
_package() {
|
_package() {
|
||||||
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
||||||
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
|
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
|
||||||
optdepends=('crda: to set the correct wireless channels of your country')
|
optdepends=('crda: to set the correct wireless channels of your country')
|
||||||
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||||
provides=('kernel26' "linux=${pkgver}")
|
provides=('kernel26' "linux=${pkgver}")
|
||||||
conflicts=('linux')
|
conflicts=('linux')
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
|
@ -99,12 +84,10 @@ _package() {
|
||||||
_basekernel=${_kernver%%-*}
|
_basekernel=${_kernver%%-*}
|
||||||
_basekernel=${_basekernel%.*}
|
_basekernel=${_basekernel%.*}
|
||||||
|
|
||||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot/dtbs}
|
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware}
|
||||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||||
|
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||||
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/zImage"
|
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/zImage"
|
||||||
cp arch/$KARCH/boot/dts/*.dtb "${pkgdir}/boot/dtbs"
|
|
||||||
cp "${pkgdir}/boot/dtbs/exynos5422-odroidxu3.dtb" "${pkgdir}/boot/dtbs/exynos5422-odroidxu3-lite.dtb"
|
|
||||||
cp "${pkgdir}/boot/dtbs/exynos5422-odroidxu3.dtb" "${pkgdir}/boot/dtbs/exynos5422-odroidxu4.dtb"
|
|
||||||
|
|
||||||
# set correct depmod command for install
|
# set correct depmod command for install
|
||||||
sed \
|
sed \
|
||||||
|
@ -112,17 +95,26 @@ _package() {
|
||||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||||
-i "${startdir}/${pkgname}.install"
|
-i "${startdir}/${pkgname}.install"
|
||||||
|
|
||||||
|
# install mkinitcpio preset file for kernel
|
||||||
|
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||||
|
sed \
|
||||||
|
-e "1s|'linux.*'|'${pkgbase}'|" \
|
||||||
|
-e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \
|
||||||
|
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||||
|
|
||||||
|
# install pacman hook for initramfs regeneration
|
||||||
|
sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/99-linux.hook" |
|
||||||
|
install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook"
|
||||||
|
|
||||||
# remove build and source links
|
# remove build and source links
|
||||||
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
||||||
# remove the firmware
|
# remove the firmware
|
||||||
rm -rf "${pkgdir}/lib/firmware"
|
rm -rf "${pkgdir}/lib/firmware"
|
||||||
# gzip -9 all modules to save 100MB of space
|
|
||||||
find "${pkgdir}" -name '*.ko' |xargs -P 2 -n 1 gzip -9
|
|
||||||
# make room for external modules
|
# make room for external modules
|
||||||
ln -s "../extramodules-${_basekernel}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
|
ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
|
||||||
# add real version for building modules and running depmod from post_install/upgrade
|
# add real version for building modules and running depmod from post_install/upgrade
|
||||||
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}"
|
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
|
||||||
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}/version"
|
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
|
||||||
|
|
||||||
# Now we call depmod...
|
# Now we call depmod...
|
||||||
depmod -b "$pkgdir" -F System.map "$_kernver"
|
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||||
|
@ -130,9 +122,6 @@ _package() {
|
||||||
# move module tree /lib -> /usr/lib
|
# move module tree /lib -> /usr/lib
|
||||||
mkdir -p "${pkgdir}/usr"
|
mkdir -p "${pkgdir}/usr"
|
||||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||||
|
|
||||||
cd "${srcdir}/${_srcname}"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_package-headers() {
|
_package-headers() {
|
||||||
|
@ -142,132 +131,102 @@ _package-headers() {
|
||||||
|
|
||||||
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
||||||
|
|
||||||
cd "${pkgdir}/usr/lib/modules/${_kernver}"
|
|
||||||
ln -sf ../../../src/linux-${_kernver} build
|
|
||||||
|
|
||||||
cd "${srcdir}/${_srcname}"
|
cd "${srcdir}/${_srcname}"
|
||||||
install -D -m644 Makefile \
|
install -D -m644 Makefile \
|
||||||
"${pkgdir}/usr/src/linux-${_kernver}/Makefile"
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
|
||||||
install -D -m644 kernel/Makefile \
|
install -D -m644 kernel/Makefile \
|
||||||
"${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
|
||||||
install -D -m644 .config \
|
install -D -m644 .config \
|
||||||
"${pkgdir}/usr/src/linux-${_kernver}/.config"
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
|
||||||
|
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
|
||||||
|
|
||||||
for i in acpi asm-generic config crypto drm generated linux math-emu \
|
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
|
||||||
media net pcmcia scsi sound trace uapi video xen; do
|
media net pcmcia scsi soc sound trace uapi video xen; do
|
||||||
cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
|
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
|
||||||
done
|
done
|
||||||
|
|
||||||
# copy arch includes for external modules
|
# copy arch includes for external modules
|
||||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
|
||||||
cp -a arch/$KARCH/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
|
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
|
||||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/mach-exynos
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-exynos
|
||||||
cp -a arch/$KARCH/mach-exynos/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/mach-exynos/
|
cp -a arch/$KARCH/mach-exynos/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-exynos/
|
||||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/plat-samsung
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-samsung
|
||||||
cp -a arch/$KARCH/plat-samsung/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/plat-samsung/
|
cp -a arch/$KARCH/plat-samsung/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-samsung/
|
||||||
|
|
||||||
# copy files necessary for later builds, like nvidia and vmware
|
# copy files necessary for later builds, like nvidia and vmware
|
||||||
cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
|
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
|
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
|
||||||
# fix permissions on scripts dir
|
# fix permissions on scripts dir
|
||||||
chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
|
chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
|
||||||
|
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
|
||||||
|
|
||||||
cp arch/${KARCH}/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
|
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
|
||||||
|
|
||||||
if [ "${CARCH}" = "i686" ]; then
|
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
|
||||||
cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"
|
|
||||||
|
|
||||||
# add headers for lirc package
|
|
||||||
# pci
|
|
||||||
for i in bt8xx cx88 saa7134; do
|
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
|
|
||||||
cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
|
|
||||||
done
|
|
||||||
# usb
|
|
||||||
for i in cpia2 em28xx pwc sn9c102; do
|
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
|
|
||||||
cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
|
|
||||||
done
|
|
||||||
# i2c
|
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c"
|
|
||||||
cp drivers/media/i2c/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
|
|
||||||
for i in cx25840; do
|
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
|
|
||||||
cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# add docbook makefile
|
# add docbook makefile
|
||||||
install -D -m644 Documentation/DocBook/Makefile \
|
install -D -m644 Documentation/DocBook/Makefile \
|
||||||
"${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
|
||||||
|
|
||||||
# add dm headers
|
# add dm headers
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
|
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
|
||||||
# add inotify.h
|
# add inotify.h
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/linux"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
|
||||||
cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"
|
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
|
||||||
|
|
||||||
# add wireless headers
|
# add wireless headers
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
|
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
|
||||||
# add dvb headers for external modules
|
# add dvb headers for external modules
|
||||||
# in reference to:
|
# in reference to:
|
||||||
# http://bugs.archlinux.org/task/9912
|
# http://bugs.archlinux.org/task/9912
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core"
|
||||||
cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
|
cp drivers/media/dvb-core/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core/"
|
||||||
# and...
|
# and...
|
||||||
# http://bugs.archlinux.org/task/11194
|
# http://bugs.archlinux.org/task/11194
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||||
cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
|
cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||||
|
|
||||||
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||||
# in reference to:
|
# in reference to:
|
||||||
# http://bugs.archlinux.org/task/13146
|
# http://bugs.archlinux.org/task/13146
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
|
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||||
|
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||||
|
|
||||||
# add dvb headers
|
# add dvb headers
|
||||||
# in reference to:
|
# in reference to:
|
||||||
# http://bugs.archlinux.org/task/20402
|
# http://bugs.archlinux.org/task/20402
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
|
||||||
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
|
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
|
||||||
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
|
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
|
||||||
cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"
|
cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
|
||||||
|
|
||||||
# add xfs and shmem for aufs building
|
# add xfs and shmem for aufs building
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
|
||||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
|
||||||
cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"
|
|
||||||
|
|
||||||
#make uapi headers, some of them are needed for vpu/ipu usage
|
|
||||||
mkdir -p "${srcdir}/headers"
|
|
||||||
make headers_install ARCH=$KARCH INSTALL_HDR_PATH="${srcdir}/headers"
|
|
||||||
|
|
||||||
# copy in Kconfig files
|
# copy in Kconfig files
|
||||||
for i in `find . -name "Kconfig*"`; do
|
for i in $(find . -name "Kconfig*"); do
|
||||||
mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
|
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||||
cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
|
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
|
||||||
done
|
done
|
||||||
|
|
||||||
chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
|
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
# strip scripts directory
|
# strip scripts directory
|
||||||
find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
||||||
case "$(file -bi "${binary}")" in
|
case "$(file -bi "${binary}")" in
|
||||||
*application/x-sharedlib*) # Libraries (.so)
|
*application/x-sharedlib*) # Libraries (.so)
|
||||||
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||||
|
@ -279,7 +238,7 @@ _package-headers() {
|
||||||
done
|
done
|
||||||
|
|
||||||
# remove unneeded architectures
|
# remove unneeded architectures
|
||||||
rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,x86,xtensa}
|
rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa}
|
||||||
}
|
}
|
||||||
|
|
||||||
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,7 @@
|
||||||
# arg 2: the old package version
|
# arg 2: the old package version
|
||||||
|
|
||||||
KERNEL_NAME=-odroid-xu3
|
KERNEL_NAME=-odroid-xu3
|
||||||
KERNEL_VERSION=3.10.102-1-ARCH
|
KERNEL_VERSION=4.9.13-1-ARCH
|
||||||
|
|
||||||
post_install () {
|
post_install () {
|
||||||
# updating module dependencies
|
# updating module dependencies
|
||||||
|
@ -15,3 +15,7 @@ post_upgrade() {
|
||||||
echo ">>> Updating module dependencies. Please wait ..."
|
echo ">>> Updating module dependencies. Please wait ..."
|
||||||
depmod ${KERNEL_VERSION}
|
depmod ${KERNEL_VERSION}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
rm -f boot/initramfs-linux.img
|
||||||
|
}
|
||||||
|
|
10
core/linux-odroid-xu3/linux.preset
Normal file
10
core/linux-odroid-xu3/linux.preset
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# mkinitcpio preset file for the linux-odroid-xu3 package
|
||||||
|
|
||||||
|
ALL_config="/etc/mkinitcpio.conf"
|
||||||
|
ALL_kver="4.9.13-1-ARCH"
|
||||||
|
|
||||||
|
PRESETS=('default')
|
||||||
|
|
||||||
|
#default_config="/etc/mkinitcpio.conf"
|
||||||
|
default_image="/boot/initramfs-linux.img"
|
||||||
|
#default_options=""
|
Loading…
Reference in a new issue