blob: 70732b53ecc05bbfaec092d48192e40de3945c69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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
}
|