aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <stephen.arnold42@gmail.com>2014-04-02 09:58:14 -0700
committerSteve Arnold <stephen.arnold42@gmail.com>2014-04-02 09:58:14 -0700
commit59541998d07feb2e0c6d8ae0a35157c4dd4099b2 (patch)
tree37e5d253730e05e331ef463729a0c86cd13a2916 /sys-kernel
parentadd neon fix for latest pulseaudio (diff)
downloadarm-59541998d07feb2e0c6d8ae0a35157c4dd4099b2.tar.gz
arm-59541998d07feb2e0c6d8ae0a35157c4dd4099b2.tar.bz2
arm-59541998d07feb2e0c6d8ae0a35157c4dd4099b2.zip
added new kernel source ebuild for (heavily) patched beaglebone black kernel (thanks to Calculus)
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/bone-sources/Manifest6
-rw-r--r--sys-kernel/bone-sources/bone-sources-3.8.13.43.ebuild80
-rw-r--r--sys-kernel/bone-sources/files/dso-link-change.patch62
-rw-r--r--sys-kernel/bone-sources/files/fix-db.txt-whitespace.patch16
4 files changed, 164 insertions, 0 deletions
diff --git a/sys-kernel/bone-sources/Manifest b/sys-kernel/bone-sources/Manifest
new file mode 100644
index 0000000..212b5f4
--- /dev/null
+++ b/sys-kernel/bone-sources/Manifest
@@ -0,0 +1,6 @@
+AUX fix-db.txt-whitespace.patch 513 SHA256 9e9b224367bca5fbc7cd7bba1cee69c6d6f77baa1fff4a79d1802add6c18e73b SHA512 1051ce6dbfd247d2b236cdc87b61d8a11b49b1795b401db029dd8d7d842a3be3e73b61a50c0fbd0af2b8d795963140e0c7e9c4651ea0cadec8701c1fd063acba WHIRLPOOL 7254cc9ece2d829efd5c3d5fa60f8da4b251a0589dd887463f377d313d833c026f018b2d0fc9b42cdff79045e1be5ac5463bc92a74d9794f454ae881b1e62e8a
+DIST am335x-pm-firmware.bin;hb=750362868d914702086187096ec2c67b68eac101 11764 SHA256 636a8c982d0474c45e5bda14f11630f627ddd236fd5b419db2d170d9637deaa6 SHA512 e83de17eec5bb443f1c084ccb3411cdee60fc44d4c3844e58aa704d204eed72b51696855e9273ea2a6451e05bbca741b0f684203578785639636fe4f2dca41ad WHIRLPOOL 8c624a378ef403bf0f2a84a8e42b6fa06e5001175457d789e37f70ba14b7af7ba474c744c3137dd1fe96e5beb6e2004c17fae3dcf32e07aedb9877ea3c0ab077
+DIST bone-patches-3.8.13.43.tar.gz 1117459 SHA256 234731885a7ce138b6be99ca2fc929a0dfb1f9251c2ab199c6ef05b330e29018 SHA512 b3462d7061f6123242635177ec49a516716b76c2ff7e65a5ee6fa4f3b0a02cb9649e7816cb63d99c341bf663d89f6fc44256fd90852c2e271d5c1c19d01c8b8c WHIRLPOOL 5743088d52bb654f5a1bf7ec50d6984dda55d71c76c09477bf229a92903f67a7a91920c658c98d29ba3aa8e097354af43c6742b27863795975f585a5afe70e90
+DIST linux-3.8.tar.xz 70989468 SHA256 e070d1bdfbded5676a4f374721c63565f1c969466c5a3e214004a136b583184b SHA512 10a7983391af907d8aec72bdb096d1cabd4911985715e9ea13d35ff09095c035db15d4ab08b92eda7c10026cc27348cb9728c212335f7fcdcda7c610856ec30f WHIRLPOOL 0c633854ad9c06df1b1d832aea9bbef76144ba88c8fccf6a3f8729101dc36838bcda6ccd444451cab19177608e7f7866f4f79cff1a8ef2bd0c893933d7f1f44c
+DIST patch-3.8.13.xz 285296 SHA256 abc523f59e4c7a4c8ccadd7fd3cd03b7ae8788b399040a1c949c4232601cfd5b SHA512 baa9ff60b1b43f5d496afbd75bcab5d58590c574eea2ddb96c35c6451aed4893685db24ccda2b69e8bb247d053db1d5926944125a9614fa4c62e83b2be91ff8d WHIRLPOOL 7b67a06f49301c37b3cfd460d4e449d7d55ac9620d9b6ddc52f6a9eddfe98710a9bd81e1b0c4f52dff9d64a7141d694672110cf10970858a63931207f70170f9
+EBUILD bone-sources-3.8.13.43.ebuild 2645 SHA256 d0acd446826effc3beed8592bfaeaafbcde60ba3137e357b147b27469ea7f5f4 SHA512 f08c9e2b297cb7d86bef63715474e46690c1425fbf1139719eb59cbcb467013cfaf59027345a6b718fecd477aceffc97d1d71e517dbc10b36c9995f15365940f WHIRLPOOL a16b0581d7b15a19221a24ff16aea83014fbdc101f75f5435acae9d116995a71e1122b45c9a197252a319fa410a8519a4cc1f98b23dbcf77b5e4648b1bf3b09e
diff --git a/sys-kernel/bone-sources/bone-sources-3.8.13.43.ebuild b/sys-kernel/bone-sources/bone-sources-3.8.13.43.ebuild
new file mode 100644
index 0000000..70732b5
--- /dev/null
+++ b/sys-kernel/bone-sources/bone-sources-3.8.13.43.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit versionator
+
+CKV=$(get_version_component_range 1-3)
+BONE_RELEASE=$(get_version_component_range 4-)
+GITREV="5b3373356a7c"
+
+ETYPE="sources"
+K_SECURITY_UNSUPPORTED=1
+
+inherit kernel-2 eutils
+detect_version
+
+DESCRIPTION="Kernel for Beaglebone (am33x)"
+HOMEPAGE="https://github.com/RobertCNelson/linux-dev"
+PATCHSET_NAME="${PN/-*}-patches-${PV}.tar.gz"
+PATCHSET_URI="https://api.github.com/repos/RobertCNelson/linux-dev/tarball/${GITREV} -> $PATCHSET_NAME"
+FIRMWARE_NAME="am335x-pm-firmware.bin"
+FIRMWARE_GITREV="750362868d914702086187096ec2c67b68eac101"
+FIRMWARE_URI="http://arago-project.org/git/projects/?p=am33x-cm3.git;a=blob_plain;f=bin/am335x-pm-firmware.bin;hb=${FIRMWARE_GITREV}"
+SRC_URI="${KERNEL_URI} ${PATCHSET_URI} ${FIRMWARE_URI}"
+KEYWORDS="~arm"
+
+KV_FULL="${OKV}-bone${BONE_RELEASE}"
+[[ -n "${PR//r0}" ]] && KV_FULL="${KV_FULL}-${PR}"
+S="${WORKDIR}"/linux-"${KV_FULL}"
+
+# from patch.sh
+PATCHSET="dma rtc pinctrl cpufreq adc i2c da8xx-fb pwm mmc crypto 6lowpan capebus arm omap omap_sakoman omap_beagle_expansion omap_beagle omap_panda net drm not-capebus pru usb PG2 reboot iio w1 gpmc mxt ssd130x build hdmi audio resetctrl camera resources pmic pps leds capes proto fixes saucy machinekit sgx"
+# need to exclude some from the list (from patch.sh)
+patch_excludes() {
+ local retVal=$1
+ local pattern=$2
+ case $pattern in
+ "build")
+ eval $retVal="'0001-* 0002-* 0003-*'";;
+ "resources")
+ eval $retVal="'0022-* 0023-*'";;
+ *)
+ eval $retVal="";;
+ esac
+}
+
+src_unpack() {
+ unpack ${PATCHSET_NAME}
+ kernel-2_src_unpack
+}
+
+src_prepare() {
+ # directory name is based on github download
+ local patchesdir="${WORKDIR}/RobertCNelson-linux-dev-${GITREV:0:7}"
+ for ps in $PATCHSET; do
+ einfo "Patchset: $ps"
+ patch_excludes exclude $ps
+ EPATCH_SOURCE="$patchesdir/patches/${ps}" EPATCH_OPTS="-p1" \
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \
+ EPATCH_EXCLUDE=$exclude epatch
+ done
+ cp "$patchesdir/patches/defconfig" "${S}/.config"
+ cp "${DISTDIR}/${FIRMWARE_NAME};hb=${FIRMWARE_GITREV}" "${S}/firmware/${FIRMWARE_NAME}"
+
+ # fixup patch
+ epatch "${FILESDIR}"/fix-db.txt-whitespace.patch
+
+ # apply lkml patch for ncurses link issue
+ epatch "${FILESDIR}"/dso-link-change.patch
+
+ # fix ncurses linking issue
+# if use unicode ; then
+# infolib="tinfow"
+# else
+# infolib="tinfo"
+# fi
+# sed -i -e "s|lncurses|lncurses -l${infolib}|" "${S}"scripts/kconfig/Makefile
+}
diff --git a/sys-kernel/bone-sources/files/dso-link-change.patch b/sys-kernel/bone-sources/files/dso-link-change.patch
new file mode 100644
index 0000000..5d8ab58
--- /dev/null
+++ b/sys-kernel/bone-sources/files/dso-link-change.patch
@@ -0,0 +1,62 @@
+When building ncurses with --with-termlib several symbols get moved from
+libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one
+additionally needs to link with libtinfo.so.
+
+Ncurses provides a config script (ncurses5-config) and an interface with
+pkg-config. This patch makes use of those to detect the necessary libs
+for linking of the ncurses menuconfig and nconfig dialogs.
+
+Signed-off-by: Justin Lecher <jlec@gentoo.org>
+---
+ scripts/kconfig/Makefile | 2 +-
+ scripts/kconfig/lxdialog/check-lxdialog.sh | 22 ++++++++++++++--------
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
+index 3091794..7649047 100644
+--- a/scripts/kconfig/Makefile
++++ b/scripts/kconfig/Makefile
+@@ -216,7 +216,7 @@ HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
+
+ HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
+
+-HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses
++HOSTLOADLIBES_nconf = `pkg-config --libs menu panel ncurses`
+ $(obj)/qconf.o: $(obj)/.tmp_qtcheck
+
+ ifeq ($(qconf-target),1)
+diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
+index c8e8a71..4699c1b 100644
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -4,15 +4,21 @@
+ # What library to link
+ ldflags()
+ {
+- for ext in so a dll.a dylib ; do
+- for lib in ncursesw ncurses curses ; do
+- $cc -print-file-name=lib${lib}.${ext} | grep -q /
+- if [ $? -eq 0 ]; then
+- echo "-l${lib}"
+- exit
+- fi
++ if type -p ncurses5-config &> /dev/null ; then
++ ncurses5-config --libs
++ exit 0
++ else
++ for ext in so a dll.a dylib ; do
++ for lib in ncursesw ncurses curses ; do
++ $cc -print-file-name=lib${lib}.${ext} | \
++ grep -q /
++ if [ $? -eq 0 ]; then
++ echo "-l${lib}"
++ exit
++ fi
++ done
+ done
+- done
++ fi
+ exit 1
+ }
+
+--
+1.8.1.4
diff --git a/sys-kernel/bone-sources/files/fix-db.txt-whitespace.patch b/sys-kernel/bone-sources/files/fix-db.txt-whitespace.patch
new file mode 100644
index 0000000..4622c9f
--- /dev/null
+++ b/sys-kernel/bone-sources/files/fix-db.txt-whitespace.patch
@@ -0,0 +1,16 @@
+--- a/net/wireless/db.txt 2014-04-01 19:48:00.835291206 -0700
++++ b/net/wireless/db.txt 2014-04-01 18:31:52.957690992 -0700
+@@ -735,7 +735,7 @@
+ (5250 - 5330 @ 20), (N/A, 20), DFS
+ # 60 gHz band channels 1-4, ref: Etsi En 302 567
+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR
+-
++
+ # Source:
+ # #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874
+ # #1174 / 23 Oct 2008: http://www.nkrz.gov.ua/uk/activities/ruling/1225269361
+@@ -796,4 +796,3 @@
+
+ country ZW:
+ (2402 - 2482 @ 40), (N/A, 20)
+-