blob: 182e93f6edf68470683623198f2c9f2a746fff36 (
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
|
DESCRIPTION = "Xilinx Kernel"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
# This version extension should match CONFIG_LOCALVERSION in defconfig
LINUX_VERSION_EXTENSION ?= "-xilinx"
PV = "${LINUX_VERSION}${LINUX_VERSION_EXTENSION}+git${SRCREV}"
# Sources
KBRANCH ?= "master"
SRC_URI = "git://github.com/Xilinx/linux-xlnx;protocol=git;branch=${KBRANCH}"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx:"
# Source Directory
S = "${WORKDIR}/git"
# Inherit/include base functionality
inherit kernel
require linux-machine-common.inc
# Override COMPATIBLE_MACHINE to include your machine in a bbappend file.
COMPATIBLE_MACHINE = "qemumicroblaze|qemuzynq|microblaze|zynq"
# Common kernel configuration parts
# Arch specific kernel configuration parts
MACHINE_KCONFIG_append_zynq += "common/zynq_defconfig_${LINUX_VERSION}.cfg"
MACHINE_KCONFIG_append_microblaze += "common/microblaze_defconfig_${LINUX_VERSION}.cfg"
# Add the modules directory to the 'kernel-base' files list
FILES_kernel-base_append = " /lib/modules/${KERNEL_VERSION}/kernel"
# returns all the elements from the src uri that are .cfg files
def find_config_fragments(d):
sources=src_patches(d, True)
sources_list=[]
for s in sources:
if s.endswith('.cfg'):
sources_list.append(s)
return sources_list
kernel_do_configure_prepend() {
# Find all ".cfg" files and cat them together into a .config
CFG_FILES="${@" ".join(find_config_fragments(d))}"
if [ ! -z "$CFG_FILES" ]; then
echo "# Generated by linux-xlnx recipe in meta-xilinx" > "${B}/.config"
for i in $CFG_FILES; do
echo "Joining configuration file $i"
echo "# $i" >> "${B}/.config"
cat $i >> "${B}/.config"
done
fi
}
|