diff options
| -rw-r--r-- | conf/layer.conf | 3 | ||||
| -rw-r--r-- | conf/machine/kc705-trd-microblazeel.conf | 6 | ||||
| -rw-r--r-- | conf/machine/qemumicroblaze.conf | 4 | ||||
| -rw-r--r-- | conf/machine/qemuzynq.conf | 2 | ||||
| -rw-r--r-- | conf/machine/zc702-zynq7.conf | 4 | ||||
| -rw-r--r-- | conf/machine/zedboard-zynq7.conf | 6 | ||||
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-extra.inc | 15 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-machine-common.inc | 4 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-machine-config.inc | 85 | ||||
| -rw-r--r-- | recipes-kernel/linux/linux-xlnx.inc | 4 |
10 files changed, 86 insertions, 47 deletions
diff --git a/conf/layer.conf b/conf/layer.conf index ba976bad..d6f07d3d 100644 --- a/conf/layer.conf +++ b/conf/layer.conf | |||
| @@ -8,6 +8,3 @@ BBFILES += " ${LAYERDIR}/recipes-*/*/*.bbappend" | |||
| 8 | BBFILE_COLLECTIONS += "xilinx" | 8 | BBFILE_COLLECTIONS += "xilinx" |
| 9 | BBFILE_PATTERN_xilinx := "^${LAYERDIR}/" | 9 | BBFILE_PATTERN_xilinx := "^${LAYERDIR}/" |
| 10 | BBFILE_PRIORITY_xilinx = "8" | 10 | BBFILE_PRIORITY_xilinx = "8" |
| 11 | |||
| 12 | XILINX_LAYERDIR := "${LAYERDIR}" | ||
| 13 | XILINX_BOARDDIR := "${XILINX_LAYERDIR}/conf/machine/boards" | ||
diff --git a/conf/machine/kc705-trd-microblazeel.conf b/conf/machine/kc705-trd-microblazeel.conf index 4552824e..86315ba6 100644 --- a/conf/machine/kc705-trd-microblazeel.conf +++ b/conf/machine/kc705-trd-microblazeel.conf | |||
| @@ -19,6 +19,6 @@ TUNE_FEATURES_tune-microblaze += "v8.50 little-endian barrel-shift pattern-compa | |||
| 19 | 19 | ||
| 20 | SERIAL_CONSOLE = "115200 ttyS0" | 20 | SERIAL_CONSOLE = "115200 ttyS0" |
| 21 | 21 | ||
| 22 | MACHINE_DEVICETREE := "${XILINX_BOARDDIR}/kc705/kc705-trd-microblazeel.dts" | 22 | MACHINE_DEVICETREE := "kc705/kc705-trd-microblazeel.dts" |
| 23 | MACHINE_KCONFIG := "${XILINX_BOARDDIR}/kc705/kc705-trd-microblazeel.kconfig.cfg" | 23 | MACHINE_KCONFIG := "kc705/kc705-trd-microblazeel.kconfig.cfg" |
| 24 | MACHINE_XPARAMETERS := "${XILINX_BOARDDIR}/kc705/kc705-trd-microblazeel.xparameters.h" | 24 | MACHINE_XPARAMETERS := "kc705/kc705-trd-microblazeel.xparameters.h" |
diff --git a/conf/machine/qemumicroblaze.conf b/conf/machine/qemumicroblaze.conf index 67a22f3e..824dbf47 100644 --- a/conf/machine/qemumicroblaze.conf +++ b/conf/machine/qemumicroblaze.conf | |||
| @@ -9,5 +9,5 @@ TUNE_FEATURES_tune-microblaze += "v8.50 little-endian barrel-shift reorder patte | |||
| 9 | 9 | ||
| 10 | SERIAL_CONSOLE = "115200 ttyS0" | 10 | SERIAL_CONSOLE = "115200 ttyS0" |
| 11 | 11 | ||
| 12 | MACHINE_DEVICETREE := "${XILINX_BOARDDIR}/qemu/qemumicroblaze.dts" | 12 | MACHINE_DEVICETREE := "qemu/qemumicroblaze.dts" |
| 13 | MACHINE_KCONFIG := "${XILINX_BOARDDIR}/qemu/qemumicroblaze.cfg" | 13 | MACHINE_KCONFIG := "qemu/qemumicroblaze.cfg" |
diff --git a/conf/machine/qemuzynq.conf b/conf/machine/qemuzynq.conf index 7db1b0bb..a260dd32 100644 --- a/conf/machine/qemuzynq.conf +++ b/conf/machine/qemuzynq.conf | |||
| @@ -8,4 +8,4 @@ require conf/machine/include/tune-zynq.inc | |||
| 8 | 8 | ||
| 9 | SERIAL_CONSOLE = "115200 ttyPS0" | 9 | SERIAL_CONSOLE = "115200 ttyPS0" |
| 10 | 10 | ||
| 11 | MACHINE_DEVICETREE := "${XILINX_BOARDDIR}/qemu/qemuzynq.dts" | 11 | MACHINE_DEVICETREE := "qemu/qemuzynq.dts" |
diff --git a/conf/machine/zc702-zynq7.conf b/conf/machine/zc702-zynq7.conf index 2db72377..bb7fb8d7 100644 --- a/conf/machine/zc702-zynq7.conf +++ b/conf/machine/zc702-zynq7.conf | |||
| @@ -19,5 +19,5 @@ UBOOT_MACHINE = "zynq_zc70x_config" | |||
| 19 | 19 | ||
| 20 | SERIAL_CONSOLE = "115200 ttyPS0" | 20 | SERIAL_CONSOLE = "115200 ttyPS0" |
| 21 | 21 | ||
| 22 | MACHINE_DEVICETREE := "${XILINX_BOARDDIR}/zc702/zc702-zynq7.dts" | 22 | MACHINE_DEVICETREE := "zc702/zc702-zynq7.dts" |
| 23 | MACHINE_KCONFIG := "${XILINX_BOARDDIR}/common/rtc.cfg" | 23 | MACHINE_KCONFIG := "common/rtc.cfg" |
diff --git a/conf/machine/zedboard-zynq7.conf b/conf/machine/zedboard-zynq7.conf index 18223796..6dbb8f75 100644 --- a/conf/machine/zedboard-zynq7.conf +++ b/conf/machine/zedboard-zynq7.conf | |||
| @@ -20,7 +20,7 @@ UBOOT_MACHINE = "zynq_zed_config" | |||
| 20 | SERIAL_CONSOLE = "115200 ttyPS0" | 20 | SERIAL_CONSOLE = "115200 ttyPS0" |
| 21 | 21 | ||
| 22 | MACHINE_DEVICETREE := " \ | 22 | MACHINE_DEVICETREE := " \ |
| 23 | ${XILINX_BOARDDIR}/zedboard/zedboard-zynq7.dtsi \ | 23 | zedboard/zedboard-zynq7.dtsi \ |
| 24 | ${XILINX_BOARDDIR}/zedboard/zedboard-zynq7-mmcblk0p2.dts \ | 24 | zedboard/zedboard-zynq7-mmcblk0p2.dts \ |
| 25 | ${XILINX_BOARDDIR}/zedboard/zedboard-zynq7-ram.dts \ | 25 | zedboard/zedboard-zynq7-ram.dts \ |
| 26 | " | 26 | " |
diff --git a/recipes-bsp/u-boot/u-boot-extra.inc b/recipes-bsp/u-boot/u-boot-extra.inc index 79808a37..e1c89d05 100644 --- a/recipes-bsp/u-boot/u-boot-extra.inc +++ b/recipes-bsp/u-boot/u-boot-extra.inc | |||
| @@ -20,9 +20,16 @@ do_deploy_append() { | |||
| 20 | # and generate a u-boot specific config.mk | 20 | # and generate a u-boot specific config.mk |
| 21 | do_configure_prepend () { | 21 | do_configure_prepend () { |
| 22 | if [ "${SOC_FAMILY}" = "microblaze" -a ! -z "${MACHINE_XPARAMETERS}" ]; then | 22 | if [ "${SOC_FAMILY}" = "microblaze" -a ! -z "${MACHINE_XPARAMETERS}" ]; then |
| 23 | if [ ! -z "${MACHINE_XPARAMETERS}" -a -e "${MACHINE_XPARAMETERS}" ]; then | 23 | # Find the file based on the avaliable layers (using $BBPATH) |
| 24 | MACHINE_XPARAMETERS_ABSOLUTE= | ||
| 25 | for i in ${BBPATH}; do | ||
| 26 | if [ -e $i/conf/machine/boards/${MACHINE_XPARAMETERS} ]; then | ||
| 27 | MACHINE_XPARAMETERS_ABSOLUTE = $i/conf/machine/boards/${MACHINE_XPARAMETERS} | ||
| 28 | fi | ||
| 29 | done | ||
| 30 | if [ -e "${MACHINE_XPARAMETERS_ABSOLUTE}" ]; then | ||
| 24 | CONFIG_MK=${S}/board/xilinx/microblaze-generic/config.mk | 31 | CONFIG_MK=${S}/board/xilinx/microblaze-generic/config.mk |
| 25 | cp ${MACHINE_XPARAMETERS} ${S}/board/xilinx/microblaze-generic/xparameters.h | 32 | cp ${MACHINE_XPARAMETERS_ABSOLUTE} ${S}/board/xilinx/microblaze-generic/xparameters.h |
| 26 | 33 | ||
| 27 | # Generate the config.mk from CFLAGS and XPARAMETERS file | 34 | # Generate the config.mk from CFLAGS and XPARAMETERS file |
| 28 | echo "# This file is generated by the meta-xilinx layer." > ${CONFIG_MK} | 35 | echo "# This file is generated by the meta-xilinx layer." > ${CONFIG_MK} |
| @@ -36,8 +43,8 @@ do_configure_prepend () { | |||
| 36 | echo "" >> ${CONFIG_MK} | 43 | echo "" >> ${CONFIG_MK} |
| 37 | 44 | ||
| 38 | # Calculate the TEXT_BASE address at RAM_END - 4MB | 45 | # Calculate the TEXT_BASE address at RAM_END - 4MB |
| 39 | RAM_START=$(grep "XILINX_RAM_START" ${MACHINE_XPARAMETERS} | grep -o "0x.*$") | 46 | RAM_START=$(grep "XILINX_RAM_START" ${MACHINE_XPARAMETERS_ABSOLUTE} | grep -o "0x.*$") |
| 40 | RAM_SIZE=$(grep "XILINX_RAM_SIZE" ${MACHINE_XPARAMETERS} | grep -o "0x.*$") | 47 | RAM_SIZE=$(grep "XILINX_RAM_SIZE" ${MACHINE_XPARAMETERS_ABSOLUTE} | grep -o "0x.*$") |
| 41 | BASE_OFFSET=$(printf "0x%08x" "$[$RAM_START + $RAM_SIZE - 0x400000]") | 48 | BASE_OFFSET=$(printf "0x%08x" "$[$RAM_START + $RAM_SIZE - 0x400000]") |
| 42 | 49 | ||
| 43 | echo "TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK} | 50 | echo "TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK} |
diff --git a/recipes-kernel/linux/linux-machine-common.inc b/recipes-kernel/linux/linux-machine-common.inc index 6d8cd8c5..2ef76ff9 100644 --- a/recipes-kernel/linux/linux-machine-common.inc +++ b/recipes-kernel/linux/linux-machine-common.inc | |||
| @@ -5,6 +5,4 @@ require linux-machine-config.inc | |||
| 5 | DEPENDS_append_microblaze += "u-boot-mkimage-native" | 5 | DEPENDS_append_microblaze += "u-boot-mkimage-native" |
| 6 | 6 | ||
| 7 | # Common Device Tree Includes | 7 | # Common Device Tree Includes |
| 8 | # (put them in ${WORKDIR} to avoid using dtc with include paths) | 8 | MACHINE_DEVICETREE_append_zynq += "common/zynq-7-base.dtsi" |
| 9 | FILESEXTRAPATHS_append := "${XILINX_LAYERDIR}/conf/machine/boards/common:" | ||
| 10 | SRC_URI_append += "file://zynq-7-base.dtsi" | ||
diff --git a/recipes-kernel/linux/linux-machine-config.inc b/recipes-kernel/linux/linux-machine-config.inc index 184011f4..6568e4b5 100644 --- a/recipes-kernel/linux/linux-machine-config.inc +++ b/recipes-kernel/linux/linux-machine-config.inc | |||
| @@ -1,34 +1,71 @@ | |||
| 1 | # | ||
| 2 | # This include file implements the MACHINE_DEVICETREE and MACHINE_KCONFIG | ||
| 3 | # variable handling for the Kernel. | ||
| 4 | # | ||
| 5 | # e.g. (set in the associated <machine>.conf) | ||
| 6 | # MACHINE_DEVICETREE := "zc702/zc702-zynq7.dts" | ||
| 7 | # MACHINE_KCONFIG := "common/rtc.cfg" | ||
| 8 | # | ||
| 9 | # This will expand out to: | ||
| 10 | # SRC_URI_append += "file://zc702/zc702-zynq7.dts file://common/rtc.cfg" | ||
| 11 | # KERNEL_DEVICETREE ?= "${WORKDIR}/devicetree/zc702-zynq7.dts" | ||
| 12 | # | ||
| 13 | # This include also adds all the 'conf/machine/boards' for all layers (that are | ||
| 14 | # available) to the FILESEXTRAPATHS. | ||
| 15 | # | ||
| 1 | 16 | ||
| 2 | # Scan all files in MACHINE_DEVICETREE and MACHINE_KCONFIG and populate SRC_URI, | 17 | # Returns a space seperated list of all '.dts' files which |
| 3 | # FILESEXTRAPATHS and KERNEL_DEVICETREE. | 18 | def get_all_devicetrees(d): |
| 4 | python __anonymous () { | ||
| 5 | workdir = d.getVar("WORKDIR", True) | 19 | workdir = d.getVar("WORKDIR", True) |
| 6 | machine_devicetree = d.getVar("MACHINE_DEVICETREE", True) or '' | 20 | machine_devicetree = d.getVar("MACHINE_DEVICETREE", True) or '' |
| 7 | machine_kconfigs = d.getVar("MACHINE_KCONFIG", True) or '' | ||
| 8 | extrapaths = set() | ||
| 9 | sources = set() | ||
| 10 | if machine_devicetree: | 21 | if machine_devicetree: |
| 11 | # linux-dtb.inc gets processed before this '__anonymous' | ||
| 12 | depends = d.getVar("DEPENDS", True) | ||
| 13 | d.setVar("DEPENDS", "%s dtc-native" % depends) | ||
| 14 | packages = d.getVar("PACKAGES", True) | ||
| 15 | d.setVar("PACKAGES", "%s kernel-devicetree" % packages) | ||
| 16 | |||
| 17 | files=set() | 22 | files=set() |
| 18 | for path in machine_devicetree.split(): | 23 | for path in machine_devicetree.split(): |
| 19 | sources.add("file://" + os.path.basename(path)) | 24 | if os.path.splitext(path)[1] == '.dts': |
| 20 | extrapaths.add(os.path.dirname(path)) | 25 | files.add(os.path.join(workdir, "devicetree", os.path.basename(path))) |
| 21 | if os.path.splitext(os.path.basename(path))[1] == '.dts': | 26 | if len(files) != 0: |
| 22 | files.add(os.path.join(workdir, os.path.basename(path))) | 27 | return ' '.join(files) |
| 23 | d.setVar("KERNEL_DEVICETREE", ' '.join(files)) | 28 | return '' |
| 24 | if machine_kconfigs: | 29 | |
| 25 | for path in machine_kconfigs.split(): | 30 | # Retuns a ':' seperated list of expanded '${BBPATH}/$path' |
| 26 | files.add(os.path.join(workdir, os.path.basename(path))) | 31 | def get_additional_bbpath_filespath(path, d): |
| 27 | sources.add("file://" + os.path.basename(path)) | 32 | board_extrapaths = [] |
| 28 | extrapaths.add(os.path.dirname(path)) | 33 | bbpath = d.getVar("BBPATH", True) or "" |
| 34 | for i in bbpath.split(":"): | ||
| 35 | board_extrapaths.append(os.path.join(i, path)) | ||
| 36 | if len(board_extrapaths): | ||
| 37 | return ":".join(board_extrapaths) + ":" | ||
| 38 | return "" | ||
| 39 | |||
| 40 | # If KERNEL_DEVICETREE is not set, default to the device tree's provided by | ||
| 41 | # MACHINE_DEVICETREE | ||
| 42 | KERNEL_DEVICETREE ?= "${@get_all_devicetrees(d)}" | ||
| 43 | |||
| 44 | # Appends the '<layer>/conf/machine/boards' path to FILESEXTRAPATHS for all | ||
| 45 | # layers (using the ${BBPATH}) | ||
| 46 | FILESEXTRAPATHS_append := "${@get_additional_bbpath_filespath('conf/machine/boards', d)}" | ||
| 29 | 47 | ||
| 30 | if len(extrapaths) != 0: | 48 | # Using the MACHINE_DEVICETREE and MACHINE_KCONFIG vars, append them to SRC_URI |
| 31 | d.setVar("FILESEXTRAPATHS_append", ":".join(extrapaths) + ":") | 49 | python () { |
| 50 | machine_devicetree = d.getVar("MACHINE_DEVICETREE", True) or '' | ||
| 51 | machine_kconfigs = d.getVar("MACHINE_KCONFIG", True) or '' | ||
| 52 | sources = set() | ||
| 53 | for path in (machine_devicetree.split() + machine_kconfigs.split()): | ||
| 54 | sources.add("file://" + path) | ||
| 32 | if len(sources) != 0: | 55 | if len(sources) != 0: |
| 33 | d.setVar("SRC_URI_append", " %s " % " ".join(sources)) | 56 | d.setVar("SRC_URI_append", " %s " % " ".join(sources)) |
| 34 | } | 57 | } |
| 58 | |||
| 59 | # Copy all device tree's into the same directory. This is due to compatibility | ||
| 60 | # with dtc and the use of DTSI (Device Tree Includes), the version of DTC in | ||
| 61 | # Yocto does not provide include path support. | ||
| 62 | do_install_prepend() { | ||
| 63 | if test -n "${MACHINE_DEVICETREE}"; then | ||
| 64 | mkdir -p ${WORKDIR}/devicetree | ||
| 65 | for i in ${MACHINE_DEVICETREE}; do | ||
| 66 | if test -e ${WORKDIR}/$i; then | ||
| 67 | cp ${WORKDIR}/$i ${WORKDIR}/devicetree | ||
| 68 | fi | ||
| 69 | done | ||
| 70 | fi | ||
| 71 | } | ||
diff --git a/recipes-kernel/linux/linux-xlnx.inc b/recipes-kernel/linux/linux-xlnx.inc index b31d61bd..0065466d 100644 --- a/recipes-kernel/linux/linux-xlnx.inc +++ b/recipes-kernel/linux/linux-xlnx.inc | |||
| @@ -18,8 +18,8 @@ COMPATIBLE_MACHINE = "qemumicroblaze|qemuzynq|microblaze|zynq" | |||
| 18 | 18 | ||
| 19 | # Common kernel configuration parts | 19 | # Common kernel configuration parts |
| 20 | # Arch specific kernel configuration parts | 20 | # Arch specific kernel configuration parts |
| 21 | SRC_URI_append_zynq += "file://zynq_defconfig_${LINUX_VERSION}.cfg" | 21 | MACHINE_KCONFIG_append_zynq += "common/zynq_defconfig_${LINUX_VERSION}.cfg" |
| 22 | SRC_URI_append_microblaze += "file://microblaze_defconfig_${LINUX_VERSION}.cfg" | 22 | MACHINE_KCONFIG_append_microblaze += "common/microblaze_defconfig_${LINUX_VERSION}.cfg" |
| 23 | 23 | ||
| 24 | # Add the modules directory to the 'kernel-base' files list | 24 | # Add the modules directory to the 'kernel-base' files list |
| 25 | FILES_kernel-base_append = " /lib/modules/${KERNEL_VERSION}/kernel" | 25 | FILES_kernel-base_append = " /lib/modules/${KERNEL_VERSION}/kernel" |
