blob: 8bada194a7eb4f141a2417f28dd4c4fa5b4cc6b1 (
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
SECTION = "kernel"
DESCRIPTION = "Linux kernel for HP Moonshot m400"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
COMPATIBLE_MACHINE = "proliant-m400"
inherit kernel siteinfo
require recipes-kernel/linux/linux-dtb.inc
MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"
PR = "${MACHINE_KERNEL_PR}"
KERNEL_DEVICETREE = "arch/${ARCH}/boot/dts/proliant-m400.dts"
SRCREV = "485659fab442882158cb3a007215e89529b987a3"
BRANCH = "Ubuntu-3.13.0-29.53"
SRC_URI = "git://kernel.ubuntu.com/dannf/trusty-xgene.git;protocol=git \
file://hpconfig \
file://defconfig \
file://proliant-m400.dts \
file://cfg/00027-lttng.cfg \
file://cfg/00028-perf.cfg \
file://cfg/00025-powertop.cfg \
file://cfg/00004-systemtap.cfg \
"
require kernel-configure.inc
KERNEL_FEATURES = "\
cfg/00027-lttng.cfg \
cfg/00028-perf.cfg \
cfg/00025-powertop.cfg \
cfg/00004-systemtap.cfg \
"
DEPENDS += "libgcc u-boot-mkimage-native"
S = "${WORKDIR}/git"
# KERNEL_LOCALVERSION can be set to add a tag to the end of the
# kernel version string. such as the commit id
KERNEL_LOCALVERSION ?= ""
# Check the defconfig file and see if it points to an in kernel
# defconfig that should be used, or if it is a complete config file
addtask setup_defconfig before do_configure after do_patch
do_setup_defconfig() {
cp ${WORKDIR}/proliant-m400.dts ${S}/arch/arm64/boot/dts/proliant-m400.dts
# Always copy the defconfig file to .config to keep consistency
# between the case where there is a real config and the in kernel
# tree config
cp ${WORKDIR}/hpconfig ${S}/arch/arm64/configs/hpconfig_defconfig
cp ${WORKDIR}/defconfig ${S}/.config
configure_kernel "${S}/.config" "${KERNEL_FEATURES}"
}
# define our own do_configure that will:
# 1. Check the .config file and see if string use-kernel-config= is present
# 2. If the use-kernel-config string is present parse out the config to use
# and run make ${config}
# 3. else run yes '' | oe_runmake oldconfig like the default do_configure
# does
do_configure() {
echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2`
if [ "x${config}" != "x" ]
then
oe_runmake ${config}
else
yes '' | oe_runmake oldconfig
fi
}
# Force uImage build, no support for doing it in do_compile in arm64 arch
do_uboot_mkimage() {
local ENTRYPOINT=${UBOOT_ENTRYPOINT}
if test -n "${UBOOT_ENTRYSYMBOL}"; then
ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
fi
uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e ${ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
}
do_deploy_append() {
local readonly KERNEL_UIMAGE_BASE_NAME="uImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
local readonly KERNEL_UIMAGE_SYMLINK_NAME="uImage-${MACHINE}"
install -m 0644 arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_UIMAGE_BASE_NAME}.bin
ln -sf ${KERNEL_UIMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_UIMAGE_SYMLINK_NAME}.bin
ln -sf ${KERNEL_UIMAGE_BASE_NAME}.bin ${DEPLOYDIR}/uImage
}
|