mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added core/linux-peach
This commit is contained in:
parent
bfa6565456
commit
81d98bc8d4
12 changed files with 4885 additions and 0 deletions
97
core/linux-peach/0001-kernel-add-support-for-gcc-5.patch
Normal file
97
core/linux-peach/0001-kernel-add-support-for-gcc-5.patch
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
From 5d04fa7b5a52b9cd90d6968c078e5aac2d4d0a6c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sasha Levin <sasha.levin@oracle.com>
|
||||||
|
Date: Mon, 13 Oct 2014 15:51:05 -0700
|
||||||
|
Subject: [PATCH 1/5] kernel: add support for gcc 5
|
||||||
|
|
||||||
|
We're missing include/linux/compiler-gcc5.h which is required now
|
||||||
|
because gcc branched off to v5 in trunk.
|
||||||
|
|
||||||
|
Just copy the relevant bits out of include/linux/compiler-gcc4.h,
|
||||||
|
no new code is added as of now.
|
||||||
|
|
||||||
|
This fixes a build error when using gcc 5.
|
||||||
|
|
||||||
|
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
|
||||||
|
Cc: <stable@vger.kernel.org>
|
||||||
|
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||||
|
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||||
|
---
|
||||||
|
include/linux/compiler-gcc5.h | 66 +++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 66 insertions(+)
|
||||||
|
create mode 100644 include/linux/compiler-gcc5.h
|
||||||
|
|
||||||
|
diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..cdd1cc2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/include/linux/compiler-gcc5.h
|
||||||
|
@@ -0,0 +1,66 @@
|
||||||
|
+#ifndef __LINUX_COMPILER_H
|
||||||
|
+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#define __used __attribute__((__used__))
|
||||||
|
+#define __must_check __attribute__((warn_unused_result))
|
||||||
|
+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||||
|
+
|
||||||
|
+/* Mark functions as cold. gcc will assume any path leading to a call
|
||||||
|
+ to them will be unlikely. This means a lot of manual unlikely()s
|
||||||
|
+ are unnecessary now for any paths leading to the usual suspects
|
||||||
|
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||||
|
+ older compilers]
|
||||||
|
+
|
||||||
|
+ Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||||
|
+ in the preprocessor, but we can live with this because they're unreleased.
|
||||||
|
+ Maketime probing would be overkill here.
|
||||||
|
+
|
||||||
|
+ gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||||
|
+ a special section, but I don't see any sense in this right now in
|
||||||
|
+ the kernel context */
|
||||||
|
+#define __cold __attribute__((__cold__))
|
||||||
|
+
|
||||||
|
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||||
|
+
|
||||||
|
+#ifndef __CHECKER__
|
||||||
|
+# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||||
|
+# define __compiletime_error(message) __attribute__((error(message)))
|
||||||
|
+#endif /* __CHECKER__ */
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Mark a position in code as unreachable. This can be used to
|
||||||
|
+ * suppress control flow warnings after asm blocks that transfer
|
||||||
|
+ * control elsewhere.
|
||||||
|
+ *
|
||||||
|
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||||
|
+ * this in the preprocessor, but we can live with this because they're
|
||||||
|
+ * unreleased. Really, we need to have autoconf for the kernel.
|
||||||
|
+ */
|
||||||
|
+#define unreachable() __builtin_unreachable()
|
||||||
|
+
|
||||||
|
+/* Mark a function definition as prohibited from being cloned. */
|
||||||
|
+#define __noclone __attribute__((__noclone__))
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Tell the optimizer that something else uses this function or variable.
|
||||||
|
+ */
|
||||||
|
+#define __visible __attribute__((externally_visible))
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * GCC 'asm goto' miscompiles certain code sequences:
|
||||||
|
+ *
|
||||||
|
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||||
|
+ *
|
||||||
|
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||||
|
+ * Fixed in GCC 4.8.2 and later versions.
|
||||||
|
+ *
|
||||||
|
+ * (asm goto is automatically volatile - the naming reflects this.)
|
||||||
|
+ */
|
||||||
|
+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||||
|
+
|
||||||
|
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||||
|
+#define __HAVE_BUILTIN_BSWAP32__
|
||||||
|
+#define __HAVE_BUILTIN_BSWAP64__
|
||||||
|
+#define __HAVE_BUILTIN_BSWAP16__
|
||||||
|
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||||
|
--
|
||||||
|
2.4.4
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
From fde1e73dcc14f05c9598151434aa0bfa5d24a075 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Behan Webster <behanw@converseincode.com>
|
||||||
|
Date: Wed, 24 Sep 2014 01:06:46 +0100
|
||||||
|
Subject: [PATCH 2/5] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
|
||||||
|
|
||||||
|
With compilers which follow the C99 standard (like modern versions of gcc and
|
||||||
|
clang), "extern inline" does the wrong thing (emits code for an externally
|
||||||
|
linkable version of the inline function). In this case using static inline
|
||||||
|
and removing the NULL version of return_address in return_address.c does
|
||||||
|
the right thing.
|
||||||
|
|
||||||
|
Signed-off-by: Behan Webster <behanw@converseincode.com>
|
||||||
|
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
|
||||||
|
Acked-by: Steven Rostedt <rostedt@goodmis.org>
|
||||||
|
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||||
|
---
|
||||||
|
arch/arm/include/asm/ftrace.h | 2 +-
|
||||||
|
arch/arm/kernel/return_address.c | 5 -----
|
||||||
|
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
|
||||||
|
index f89515a..2bb8cac 100644
|
||||||
|
--- a/arch/arm/include/asm/ftrace.h
|
||||||
|
+++ b/arch/arm/include/asm/ftrace.h
|
||||||
|
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
-extern inline void *return_address(unsigned int level)
|
||||||
|
+static inline void *return_address(unsigned int level)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
|
||||||
|
index 981087a..824d55c 100644
|
||||||
|
--- a/arch/arm/kernel/return_address.c
|
||||||
|
+++ b/arch/arm/kernel/return_address.c
|
||||||
|
@@ -62,11 +62,6 @@ void *return_address(unsigned int level)
|
||||||
|
#warning "TODO: return_address should use unwind tables"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-void *return_address(unsigned int level)
|
||||||
|
-{
|
||||||
|
- return NULL;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
|
||||||
|
|
||||||
|
EXPORT_SYMBOL_GPL(return_address);
|
||||||
|
--
|
||||||
|
2.4.4
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
From c1f02c13645456e064cb21fd413ea6ea24d9c1a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bing Zhao <bzhao@marvell.com>
|
||||||
|
Date: Mon, 19 Aug 2013 16:10:21 -0700
|
||||||
|
Subject: [PATCH 3/5] mwifiex: do not create AP and P2P interfaces upon driver
|
||||||
|
loading
|
||||||
|
|
||||||
|
Bug 60747 - 1286:2044 [Microsoft Surface Pro]
|
||||||
|
Marvell 88W8797 wifi show 3 interface under network
|
||||||
|
https://bugzilla.kernel.org/show_bug.cgi?id=60747
|
||||||
|
|
||||||
|
This issue was also reported previously by OLPC and some folks from
|
||||||
|
the community.
|
||||||
|
|
||||||
|
There are 3 network interfaces with different types being created
|
||||||
|
when mwifiex driver is loaded:
|
||||||
|
|
||||||
|
1. mlan0 (infra. STA)
|
||||||
|
2. uap0 (AP)
|
||||||
|
3. p2p0 (P2P_CLIENT)
|
||||||
|
|
||||||
|
The Network Manager attempts to use all 3 interfaces above without
|
||||||
|
filtering the managed interface type. As the result, 3 identical
|
||||||
|
interfaces are displayed under network manager. If user happens to
|
||||||
|
click on an entry under which its interface is uap0 or p2p0, the
|
||||||
|
association will fail.
|
||||||
|
|
||||||
|
Work around it by removing the creation of AP and P2P interfaces
|
||||||
|
at driver loading time. These interfaces can be added with 'iw' or
|
||||||
|
other applications manually when they are needed.
|
||||||
|
|
||||||
|
Signed-off-by: Bing Zhao <bzhao@marvell.com>
|
||||||
|
Signed-off-by: Avinash Patil <patila@marvell.com>
|
||||||
|
---
|
||||||
|
drivers/net/wireless/mwifiex/main.c | 15 ---------------
|
||||||
|
1 file changed, 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
|
||||||
|
index 459773b..7fcc7b4 100644
|
||||||
|
--- a/drivers/net/wireless/mwifiex/main.c
|
||||||
|
+++ b/drivers/net/wireless/mwifiex/main.c
|
||||||
|
@@ -521,21 +521,6 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
|
||||||
|
goto err_add_intf;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Create AP interface by default */
|
||||||
|
- if (!mwifiex_add_virtual_intf(adapter->wiphy, "uap%d",
|
||||||
|
- NL80211_IFTYPE_AP, NULL, NULL)) {
|
||||||
|
- mwifiex_dbg(adapter, ERROR,
|
||||||
|
- "cannot create default AP interface\n");
|
||||||
|
- goto err_add_intf;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* Create P2P interface by default */
|
||||||
|
- if (!mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d",
|
||||||
|
- NL80211_IFTYPE_P2P_CLIENT, NULL, NULL)) {
|
||||||
|
- mwifiex_dbg(adapter, ERROR,
|
||||||
|
- "cannot create default P2P interface\n");
|
||||||
|
- goto err_add_intf;
|
||||||
|
- }
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
|
mwifiex_drv_get_driver_version(adapter, fmt, sizeof(fmt) - 1);
|
||||||
|
--
|
||||||
|
2.4.4
|
||||||
|
|
30
core/linux-peach/0004-use-chromiumos-mwifiex-drivers.patch
Normal file
30
core/linux-peach/0004-use-chromiumos-mwifiex-drivers.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
From baf9ac12d612d8938102d096084cad596a42afa2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
Date: Thu, 25 Jun 2015 20:35:06 -0600
|
||||||
|
Subject: [PATCH 4/5] use chromiumos mwifiex drivers
|
||||||
|
|
||||||
|
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
---
|
||||||
|
drivers/net/wireless/mwifiex/sdio.h | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
|
||||||
|
index 57eeb89..455cc32 100644
|
||||||
|
--- a/drivers/net/wireless/mwifiex/sdio.h
|
||||||
|
+++ b/drivers/net/wireless/mwifiex/sdio.h
|
||||||
|
@@ -30,9 +30,9 @@
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
#define SD8786_DEFAULT_FW_NAME "mrvl/sd8786_uapsta.bin"
|
||||||
|
-#define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin"
|
||||||
|
-#define SD8797_DEFAULT_FW_NAME "mrvl/sd8797_uapsta.bin"
|
||||||
|
-#define SD8897_DEFAULT_FW_NAME "mrvl/sd8897_uapsta.bin"
|
||||||
|
+#define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta_cros.bin"
|
||||||
|
+#define SD8797_DEFAULT_FW_NAME "mrvl/sd8797_uapsta_cros.bin"
|
||||||
|
+#define SD8897_DEFAULT_FW_NAME "mrvl/sd8897_uapsta_cros.bin"
|
||||||
|
#define SD8887_DEFAULT_FW_NAME "mrvl/sd8887_wlan_a2.bin"
|
||||||
|
|
||||||
|
#define BLOCK_MODE 1
|
||||||
|
--
|
||||||
|
2.4.4
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
From e20243ddeb8a9e6a956b2233d13691356e728a9d Mon Sep 17 00:00:00 2001
|
||||||
|
From: "S.J.R. van Schaik" <stephan@synkhronix.com>
|
||||||
|
Date: Thu, 19 Jun 2014 17:08:06 +0100
|
||||||
|
Subject: [PATCH 5/5] exynos DRM: have exynos_drm_fbdev_update() set smem_start
|
||||||
|
and smem_len.
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
|
||||||
|
index 02fd32d..6ea4a35 100644
|
||||||
|
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
|
||||||
|
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
|
||||||
|
@@ -125,6 +125,8 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
|
||||||
|
|
||||||
|
fbi->screen_base = buffer->kvaddr;
|
||||||
|
fbi->screen_size = size;
|
||||||
|
+ fbi->fix.smem_start = buffer->dma_addr;
|
||||||
|
+ fbi->fix.smem_len = size;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.4.4
|
||||||
|
|
271
core/linux-peach/PKGBUILD
Normal file
271
core/linux-peach/PKGBUILD
Normal file
|
@ -0,0 +1,271 @@
|
||||||
|
# ChromiumOS kernel for Exynos Chromebooks (Peach, Snow, Spring)
|
||||||
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
|
||||||
|
buildarch=4
|
||||||
|
|
||||||
|
pkgbase=linux-peach
|
||||||
|
_kernelname=${pkgbase#linux}
|
||||||
|
_desc="Exynos Chromebooks (Peach, Snow, Spring)"
|
||||||
|
pkgver=3.8.11
|
||||||
|
pkgrel=1
|
||||||
|
_commit=b719299d59e0ed0ead4ce8667f21cb00ea954ca5
|
||||||
|
arch=('armv7h')
|
||||||
|
url="https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.8"
|
||||||
|
license=('GPL2')
|
||||||
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc')
|
||||||
|
options=('!strip')
|
||||||
|
source=("https://chromium.googlesource.com/chromiumos/third_party/kernel/+archive/${_commit}.tar.gz"
|
||||||
|
http://archlinuxarm.org/builder/src/sd{8787,8797,8897}_uapsta_cros.bin
|
||||||
|
'0001-kernel-add-support-for-gcc-5.patch'
|
||||||
|
'0002-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch'
|
||||||
|
'0003-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch'
|
||||||
|
'0004-use-chromiumos-mwifiex-drivers.patch'
|
||||||
|
'0005-exynos-DRM-have-exynos_drm_fbdev_update-set-smem_sta.patch'
|
||||||
|
'config'
|
||||||
|
'kernel.its'
|
||||||
|
'kernel.keyblock'
|
||||||
|
'kernel_data_key.vbprivk'
|
||||||
|
'cmdline')
|
||||||
|
md5sums=('f96ba628b63718cc1ed8a649ce4b36f7'
|
||||||
|
'bda543cb5943eac34e16d12911f3ee99'
|
||||||
|
'dc6da2272ffb8ea63f10bc4457cc3f70'
|
||||||
|
'5d74feddd86b9c1e6cd23704795cc7d7'
|
||||||
|
'3e25a575dcd98170f3e06e1cc2579c1e'
|
||||||
|
'b7e82ebd11ccf52882f6954f4e275df7'
|
||||||
|
'751e16c71e75c755e31e9e2e50469d7d'
|
||||||
|
'6cfc74e57ee5551ecbf81f2e4f5ffda1'
|
||||||
|
'903e7971321fb7688f5eedc029117edc'
|
||||||
|
'7e1d18307858818b9d85cd841a6da6b9'
|
||||||
|
'9791091c8e4158297533df988d1a47da'
|
||||||
|
'61c5ff73c136ed07a7aadbf58db3d96a'
|
||||||
|
'584777ae88bce2c5659960151b64c7d8'
|
||||||
|
'caac3e4ace66a81a3e0a3e7348e99098')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
git apply 0001-kernel-add-support-for-gcc-5.patch
|
||||||
|
git apply 0002-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
|
||||||
|
git apply 0003-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch
|
||||||
|
git apply 0004-use-chromiumos-mwifiex-drivers.patch
|
||||||
|
git apply 0005-exynos-DRM-have-exynos_drm_fbdev_update-set-smem_sta.patch
|
||||||
|
|
||||||
|
cp config .config
|
||||||
|
|
||||||
|
# add pkgrel to extraversion
|
||||||
|
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
|
||||||
|
|
||||||
|
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||||
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
# get kernel version
|
||||||
|
make prepare
|
||||||
|
|
||||||
|
# load configuration
|
||||||
|
# Configure the kernel. Replace the line below with one of your choice.
|
||||||
|
#make menuconfig # CLI menu for configuration
|
||||||
|
#make nconfig # new CLI menu for configuration
|
||||||
|
#make xconfig # X-based configuration
|
||||||
|
#make oldconfig # using old config from previous kernel version
|
||||||
|
# ... or manually edit .config
|
||||||
|
|
||||||
|
# Copy back our configuration (use with new kernel version)
|
||||||
|
#cp ./.config ../${pkgbase}.config
|
||||||
|
|
||||||
|
####################
|
||||||
|
# stop here
|
||||||
|
# this is useful to configure the kernel
|
||||||
|
#msg "Stopping build"
|
||||||
|
#return 1
|
||||||
|
####################
|
||||||
|
|
||||||
|
#yes "" | make config
|
||||||
|
|
||||||
|
# build!
|
||||||
|
make ${MAKEFLAGS} zImage modules dtbs
|
||||||
|
}
|
||||||
|
|
||||||
|
_package() {
|
||||||
|
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
||||||
|
depends=('coreutils' 'linux-firmware' 'kmod')
|
||||||
|
optdepends=('crda: to set the correct wireless channels of your country')
|
||||||
|
provides=('kernel26' "linux=${pkgver}")
|
||||||
|
conflicts=('linux')
|
||||||
|
install=${pkgname}.install
|
||||||
|
|
||||||
|
KARCH=arm
|
||||||
|
|
||||||
|
# get kernel version
|
||||||
|
_kernver="$(make kernelrelease)"
|
||||||
|
_basekernel=${_kernver%%-*}
|
||||||
|
_basekernel=${_basekernel%.*}
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot/dtbs}
|
||||||
|
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||||
|
|
||||||
|
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
||||||
|
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
||||||
|
vbutil_kernel \
|
||||||
|
--pack vmlinux.kpart \
|
||||||
|
--version 1 \
|
||||||
|
--vmlinuz vmlinux.uimg \
|
||||||
|
--arch arm \
|
||||||
|
--keyblock kernel.keyblock \
|
||||||
|
--signprivate kernel_data_key.vbprivk \
|
||||||
|
--config cmdline \
|
||||||
|
--bootloader bootloader.bin
|
||||||
|
|
||||||
|
cp vmlinux.kpart "${pkgdir}/boot"
|
||||||
|
|
||||||
|
# set correct depmod command for install
|
||||||
|
sed \
|
||||||
|
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||||
|
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||||
|
-i "${startdir}/${pkgname}.install"
|
||||||
|
|
||||||
|
# remove build and source links
|
||||||
|
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
||||||
|
# remove the 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
|
||||||
|
ln -s "../extramodules-${_basekernel}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
|
||||||
|
# add real version for building modules and running depmod from post_install/upgrade
|
||||||
|
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}"
|
||||||
|
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}/version"
|
||||||
|
|
||||||
|
# Now we call depmod...
|
||||||
|
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||||
|
|
||||||
|
# move module tree /lib -> /usr/lib
|
||||||
|
mkdir -p "${pkgdir}/usr"
|
||||||
|
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||||
|
|
||||||
|
# install ChromeOS mwifiex firmware
|
||||||
|
mkdir -p "${pkgdir}"/usr/lib/firmware/mrvl
|
||||||
|
cp sd{8787,8797,8897}_uapsta_cros.bin "${pkgdir}"/usr/lib/firmware/mrvl
|
||||||
|
}
|
||||||
|
|
||||||
|
_package-headers() {
|
||||||
|
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
|
||||||
|
provides=("linux-headers=${pkgver}")
|
||||||
|
conflicts=('linux-headers')
|
||||||
|
|
||||||
|
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
||||||
|
|
||||||
|
install -D -m644 Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
|
||||||
|
install -D -m644 kernel/Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
|
||||||
|
install -D -m644 .config \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
|
||||||
|
|
||||||
|
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
|
||||||
|
media net pcmcia scsi sound trace uapi video xen; do
|
||||||
|
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy arch includes for external modules
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
|
||||||
|
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/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/lib/modules/${_kernver}/build/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
|
||||||
|
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
|
||||||
|
# fix permissions on scripts dir
|
||||||
|
chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
|
||||||
|
|
||||||
|
# add docbook makefile
|
||||||
|
install -D -m644 Documentation/DocBook/Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
|
||||||
|
|
||||||
|
# add dm headers
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
|
||||||
|
# add inotify.h
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
|
||||||
|
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
|
||||||
|
|
||||||
|
# add wireless headers
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
|
||||||
|
# add dvb headers for external modules
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/9912
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core"
|
||||||
|
cp drivers/media/dvb-core/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core/"
|
||||||
|
# and...
|
||||||
|
# http://bugs.archlinux.org/task/11194
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/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
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/13146
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
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
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/20402
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/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/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
|
||||||
|
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
|
||||||
|
cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
|
||||||
|
|
||||||
|
# add xfs and shmem for aufs building
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
|
||||||
|
|
||||||
|
# copy in Kconfig files
|
||||||
|
for i in $(find . -name "Kconfig*"); do
|
||||||
|
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||||
|
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
|
# strip scripts directory
|
||||||
|
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
|
||||||
|
*application/x-sharedlib*) # Libraries (.so)
|
||||||
|
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||||
|
*application/x-archive*) # Libraries (.a)
|
||||||
|
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
||||||
|
*application/x-executable*) # Binaries
|
||||||
|
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# remove unneeded architectures
|
||||||
|
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")
|
||||||
|
for _p in ${pkgname[@]}; do
|
||||||
|
eval "package_${_p}() {
|
||||||
|
_package${_p#${pkgbase}}
|
||||||
|
}"
|
||||||
|
done
|
1
core/linux-peach/cmdline
Normal file
1
core/linux-peach/cmdline
Normal file
|
@ -0,0 +1 @@
|
||||||
|
console=tty1 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd
|
4159
core/linux-peach/config
Normal file
4159
core/linux-peach/config
Normal file
File diff suppressed because it is too large
Load diff
147
core/linux-peach/kernel.its
Normal file
147
core/linux-peach/kernel.its
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
description = "Chrome OS kernel image with one or more FDT blobs";
|
||||||
|
images {
|
||||||
|
kernel@1{
|
||||||
|
description = "kernel";
|
||||||
|
data = /incbin/("arch/arm/boot/zImage");
|
||||||
|
type = "kernel_noload";
|
||||||
|
arch = "arm";
|
||||||
|
os = "linux";
|
||||||
|
compression = "none";
|
||||||
|
load = <0>;
|
||||||
|
entry = <0>;
|
||||||
|
};
|
||||||
|
fdt@1{
|
||||||
|
description = "exynos5250-snow-rev4.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5250-snow-rev4.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@2{
|
||||||
|
description = "exynos5250-snow-rev5.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5250-snow-rev5.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@3{
|
||||||
|
description = "exynos5250-spring.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5250-spring.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@4{
|
||||||
|
description = "exynos5420-peach-kirby.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5420-peach-kirby.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@5{
|
||||||
|
description = "exynos5420-peach-pit.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5420-peach-pit.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@6{
|
||||||
|
description = "exynos5420-peach-pit-rev3_5.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5420-peach-pit-rev3_5.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@7{
|
||||||
|
description = "exynos5420-peach-pit-rev4.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5420-peach-pit-rev4.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@8{
|
||||||
|
description = "exynos5422-peach-pi.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5422-peach-pi.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fdt@9{
|
||||||
|
description = "exynos5250-skate.dtb";
|
||||||
|
data = /incbin/("arch/arm/boot/dts/exynos5250-skate.dtb");
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "arm";
|
||||||
|
compression = "none";
|
||||||
|
hash@1{
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
configurations {
|
||||||
|
default = "conf@1";
|
||||||
|
conf@1{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@1";
|
||||||
|
};
|
||||||
|
conf@2{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@2";
|
||||||
|
};
|
||||||
|
conf@3{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@3";
|
||||||
|
};
|
||||||
|
conf@4{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@4";
|
||||||
|
};
|
||||||
|
conf@5{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@5";
|
||||||
|
};
|
||||||
|
conf@6{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@6";
|
||||||
|
};
|
||||||
|
conf@7{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@7";
|
||||||
|
};
|
||||||
|
conf@8{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@8";
|
||||||
|
};
|
||||||
|
conf@9{
|
||||||
|
kernel = "kernel@1";
|
||||||
|
fdt = "fdt@9";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
BIN
core/linux-peach/kernel.keyblock
Normal file
BIN
core/linux-peach/kernel.keyblock
Normal file
Binary file not shown.
BIN
core/linux-peach/kernel_data_key.vbprivk
Normal file
BIN
core/linux-peach/kernel_data_key.vbprivk
Normal file
Binary file not shown.
37
core/linux-peach/linux-peach.install
Normal file
37
core/linux-peach/linux-peach.install
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# arg 1: the new package version
|
||||||
|
# arg 2: the old package version
|
||||||
|
|
||||||
|
KERNEL_NAME=-peach
|
||||||
|
KERNEL_VERSION=3.8.11-1-ARCH
|
||||||
|
|
||||||
|
flash_kernel() {
|
||||||
|
major=$(mountpoint -d / | cut -f 1 -d ':')
|
||||||
|
minor=$(mountpoint -d / | cut -f 2 -d ':')
|
||||||
|
device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
|
||||||
|
device="/dev/${device/%2/1}"
|
||||||
|
|
||||||
|
echo "A new kernel version needs to be flashed onto ${device}."
|
||||||
|
echo "Do you want to do this now? [y|N]"
|
||||||
|
read -r shouldwe
|
||||||
|
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
dd if=/boot/vmlinux.kpart of=${device}
|
||||||
|
sync
|
||||||
|
else
|
||||||
|
echo "You can do this later by running:"
|
||||||
|
echo "# dd if=/boot/vmlinux.kpart of=/dev/${device}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install () {
|
||||||
|
# updating module dependencies
|
||||||
|
echo ">>> Updating module dependencies. Please wait ..."
|
||||||
|
depmod ${KERNEL_VERSION}
|
||||||
|
flash_kernel
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
# updating module dependencies
|
||||||
|
echo ">>> Updating module dependencies. Please wait ..."
|
||||||
|
depmod ${KERNEL_VERSION}
|
||||||
|
flash_kernel
|
||||||
|
}
|
Loading…
Reference in a new issue