diff options
-rw-r--r-- | recipes-kernel/linux/linux-dtb.inc | 68 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-machine-common.inc | 5 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-machine-config.inc | 45 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-machine-kconfig.inc | 21 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-xlnx-dev.bb | 9 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-xlnx.inc | 27 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-xlnx_3.10.bb | 11 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-xlnx_3.14.bb | 8 |
8 files changed, 23 insertions, 171 deletions
diff --git a/recipes-kernel/linux/linux-dtb.inc b/recipes-kernel/linux/linux-dtb.inc deleted file mode 100644 index 5efb9a0d..00000000 --- a/recipes-kernel/linux/linux-dtb.inc +++ /dev/null @@ -1,68 +0,0 @@ -# Support for device tree generation -FILES_kernel-devicetree = "/boot/devicetree*" -OOT_KERNEL_DEVICETREE_FLAGS ?= "-R 8 -p 0x3000" - -python __anonymous () { - oot_devicetree = d.getVar("OOT_KERNEL_DEVICETREE", True) or '' - if oot_devicetree: - depends = d.getVar("DEPENDS", True) - d.setVar("DEPENDS", "%s dtc-native" % depends) - packages = d.getVar("PACKAGES", True) - if "kernel-devicetree" not in packages: - d.setVar("PACKAGES", "%s kernel-devicetree" % packages) -} - -do_install_append() { - if test -n "${OOT_KERNEL_DEVICETREE}"; then - for DTS_FILE in ${OOT_KERNEL_DEVICETREE}; do - if [ ! -f ${DTS_FILE} ]; then - echo "Warning: ${DTS_FILE} is not available!" - continue - fi - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` - DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"` - dtc -I dts -O dtb ${OOT_KERNEL_DEVICETREE_FLAGS} -o ${DTS_BASE_NAME} ${DTS_FILE} - install -m 0644 ${DTS_BASE_NAME} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb - done - fi -} - -do_deploy_append() { - if test -n "${OOT_KERNEL_DEVICETREE}"; then - for DTS_FILE in ${OOT_KERNEL_DEVICETREE}; do - if [ ! -f ${DTS_FILE} ]; then - echo "Warning: ${DTS_FILE} is not available!" - continue - fi - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` - DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"` - install -d ${DEPLOYDIR} - install -m 0644 ${B}/${DTS_BASE_NAME} ${DEPLOYDIR}/${DTB_NAME}.dtb - cd ${DEPLOYDIR} - ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb - cd - - done - fi -} - -pkg_postinst_kernel-devicetree () { - cd /${KERNEL_IMAGEDEST} - for DTS_FILE in ${OOT_KERNEL_DEVICETREE} - do - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"` - update-alternatives --install /${KERNEL_IMAGEDEST}/${DTS_BASE_NAME}.dtb ${DTS_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true - done -} - -pkg_postrm_kernel-devicetree () { - cd /${KERNEL_IMAGEDEST} - for DTS_FILE in ${OOT_KERNEL_DEVICETREE} - do - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` - DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTS_BASE_NAME}/g"` - update-alternatives --remove ${DTS_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true - done -} diff --git a/recipes-kernel/linux/linux-machine-common.inc b/recipes-kernel/linux/linux-machine-common.inc deleted file mode 100644 index 0f79e1bb..00000000 --- a/recipes-kernel/linux/linux-machine-common.inc +++ /dev/null @@ -1,5 +0,0 @@ -require linux-dtb.inc -require linux-machine-config.inc - -# MicroBlaze is a uImage target, but its not called 'uImage' -DEPENDS_append_microblaze += "u-boot-mkimage-native" diff --git a/recipes-kernel/linux/linux-machine-config.inc b/recipes-kernel/linux/linux-machine-config.inc deleted file mode 100644 index f4e7fa54..00000000 --- a/recipes-kernel/linux/linux-machine-config.inc +++ /dev/null @@ -1,45 +0,0 @@ -# -# This include file implements the MACHINE_DEVICETREE and MACHINE_KCONFIG -# variable handling for the Kernel. -# -# e.g. (set in the associated <machine>.conf) -# MACHINE_DEVICETREE := "zc702/zc702-zynq7.dts" -# MACHINE_KCONFIG := "common/rtc.cfg" -# -# This will expand out to: -# SRC_URI_append += "file://zc702/zc702-zynq7.dts file://common/rtc.cfg" -# OOT_KERNEL_DEVICETREE ?= "${WORKDIR}/devicetree/zc702-zynq7.dts" -# -# This include also adds all the 'conf/machine/boards' for all layers (that are -# available) to the FILESEXTRAPATHS. -# - -inherit xilinx-utils - -# If OOT_KERNEL_DEVICETREE is not set, default to the device tree's provided by -# MACHINE_DEVICETREE -OOT_KERNEL_DEVICETREE ?= "${@expand_dir_basepaths_by_extension("MACHINE_DEVICETREE", os.path.join(d.getVar("WORKDIR", True), 'devicetree'), '.dts', d)}" - -# Appends the '<layer>/conf/machine/boards' path to FILESEXTRAPATHS for all -# layers (using the ${BBPATH}) -FILESEXTRAPATHS_append := "${@get_additional_bbpath_filespath('conf/machine/boards', d)}" - -# Using the MACHINE_DEVICETREE and MACHINE_KCONFIG vars, append them to SRC_URI -SRC_URI_append += " \ - ${@paths_affix(d.getVar("MACHINE_DEVICETREE", True) or '', prefix = 'file://')} \ - ${@paths_affix(d.getVar("MACHINE_KCONFIG", True) or '', prefix = 'file://')} \ - " - -# Copy all device tree's into the same directory. This is due to compatibility -# with dtc and the use of DTSI (Device Tree Includes), the version of DTC in -# Yocto does not provide include path support. -do_install_prepend() { - if test -n "${MACHINE_DEVICETREE}"; then - mkdir -p ${WORKDIR}/devicetree - for i in ${MACHINE_DEVICETREE}; do - if test -e ${WORKDIR}/$i; then - cp ${WORKDIR}/$i ${WORKDIR}/devicetree - fi - done - fi -} diff --git a/recipes-kernel/linux/linux-machine-kconfig.inc b/recipes-kernel/linux/linux-machine-kconfig.inc deleted file mode 100644 index 881847d0..00000000 --- a/recipes-kernel/linux/linux-machine-kconfig.inc +++ /dev/null @@ -1,21 +0,0 @@ -# -# This include file implements the merging of *.cfg files from the SRC_URI for -# the 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 merge them together into a .config - CFG_FILES="${@" ".join(find_config_fragments(d))}" - if [ ! -z "$CFG_FILES" ]; then - ${S}/scripts/kconfig/merge_config.sh -m $CFG_FILES - fi -} diff --git a/recipes-kernel/linux/linux-xlnx-dev.bb b/recipes-kernel/linux/linux-xlnx-dev.bb index 89b26409..4ef20275 100644 --- a/recipes-kernel/linux/linux-xlnx-dev.bb +++ b/recipes-kernel/linux/linux-xlnx-dev.bb @@ -3,13 +3,10 @@ # # To enable this recipe, set PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev" -KBRANCH = "master-next" -KBRANCH_DEFAULT = "${KBRANCH}" - -include linux-xlnx.inc +KBRANCH ?= "master-next" # Use the SRCREV for the last tagged revision of linux-xlnx. -SRCREV = "f27f400f43062b28d2b6f0977e50492b851d7464" +SRCREV ?= "f27f400f43062b28d2b6f0977e50492b851d7464" python () { if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-xlnx-dev": @@ -21,3 +18,5 @@ python () { LINUX_VERSION ?= "3.14+" LINUX_VERSION_EXTENSION = "-xilinx-dev" PV = "${LINUX_VERSION}${LINUX_VERSION_EXTENSION}+git${SRCPV}" + +include linux-xlnx.inc diff --git a/recipes-kernel/linux/linux-xlnx.inc b/recipes-kernel/linux/linux-xlnx.inc index 3caddc87..4c30438b 100644 --- a/recipes-kernel/linux/linux-xlnx.inc +++ b/recipes-kernel/linux/linux-xlnx.inc @@ -1,25 +1,20 @@ -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}" +PV = "${LINUX_VERSION}${LINUX_VERSION_EXTENSION}+git${SRCPV}" # Sources KBRANCH ?= "master" -SRC_URI = "git://github.com/Xilinx/linux-xlnx.git;protocol=https;branch=${KBRANCH}" -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx:" +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx:${THISDIR}/config:" +SRC_URI = " \ + git://github.com/Xilinx/linux-xlnx.git;protocol=https;branch=${KBRANCH} \ + file://xilinx-base;type=kmeta;destsuffix=xilinx-base \ + " -# Source Directory -S = "${WORKDIR}/git" +require recipes-kernel/linux/linux-yocto.inc + +DESCRIPTION = "Xilinx Kernel" -# Inherit/include base functionality -inherit kernel -require linux-machine-common.inc -require linux-machine-kconfig.inc +require linux-xilinx-configs.inc +require linux-xilinx-machines.inc -# Override COMPATIBLE_MACHINE to include your machine in a bbappend file. -COMPATIBLE_MACHINE = "qemumicroblaze|qemuzynq|microblaze|zynq" diff --git a/recipes-kernel/linux/linux-xlnx_3.10.bb b/recipes-kernel/linux/linux-xlnx_3.10.bb index 6df3aeb1..7f03bc63 100644 --- a/recipes-kernel/linux/linux-xlnx_3.10.bb +++ b/recipes-kernel/linux/linux-xlnx_3.10.bb @@ -1,10 +1,7 @@ -# See include file for common information -include linux-xlnx.inc - -PR = "r1" - # Kernel version and SRCREV correspond to: -# xilinx-v14.7 tag LINUX_VERSION = "3.10" -SRCREV = "efc27505715e64526653f35274717c0fc56491e3" +# xilinx-v14.7 tag +SRCREV ?= "efc27505715e64526653f35274717c0fc56491e3" +PR = "r1" +include linux-xlnx.inc diff --git a/recipes-kernel/linux/linux-xlnx_3.14.bb b/recipes-kernel/linux/linux-xlnx_3.14.bb index da3e51e4..d30f5816 100644 --- a/recipes-kernel/linux/linux-xlnx_3.14.bb +++ b/recipes-kernel/linux/linux-xlnx_3.14.bb @@ -1,6 +1,6 @@ -include linux-xlnx.inc - # Kernel version and SRCREV correspond to: xlnx_3.14 branch -KBRANCH = "xlnx_3.14" LINUX_VERSION = "3.14" -SRCREV = "2b48a8aeea7367359f9eebe55c4a09a05227f32b" +KBRANCH ?= "xlnx_3.14" +SRCREV ?= "2b48a8aeea7367359f9eebe55c4a09a05227f32b" + +include linux-xlnx.inc |