From 204fea2e7d1fbea0e8513e01d5eaeda058177371 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 28 Mar 2017 21:08:49 +0200 Subject: [PATCH] linux-sysmocom: Add a Linux 4.9 recipe to be used for new poky Linux 4.9 is a LTS released and will be maintained until at least January 2019. --- conf/machine/include/sysmobts.inc | 2 +- recipes-bsp/linux/linux-sysmocom_4.9.bb | 59 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 recipes-bsp/linux/linux-sysmocom_4.9.bb diff --git a/conf/machine/include/sysmobts.inc b/conf/machine/include/sysmobts.inc index 1beba7f..0ccad1f 100644 --- a/conf/machine/include/sysmobts.inc +++ b/conf/machine/include/sysmobts.inc @@ -1,7 +1,7 @@ TARGET_ARCH = "arm" PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom" -PREFERRED_VERSION_linux-sysmocom = "3.10.84+git%" +PREFERRED_VERSION_linux-sysmocom = "${@dict([('1.5', '3.10.84+git%')]).get(d.getVar('DISTRO_VERSION', True)[0:3],'4.9.14+git%')}" PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross" PREFERRED_VERSION_u-boot = "git" diff --git a/recipes-bsp/linux/linux-sysmocom_4.9.bb b/recipes-bsp/linux/linux-sysmocom_4.9.bb new file mode 100644 index 0000000..df2faca --- /dev/null +++ b/recipes-bsp/linux/linux-sysmocom_4.9.bb @@ -0,0 +1,59 @@ +inherit kernel +require linux-sysmocom.inc + +DEPENDS += "bc-native" + +# ATTENTION: Update linux-backports PR on version change. In Dora the +# reverse dependency tracking for the kernel doesn't appear to work. So +# please bump the PR on version changes! +# at versions changes do not forget to update conf/machine/include/sysmobts.inc too +LINUX_VERSION ?= "4.9.14" +LINUX_VERSION_EXTENSION ?= "-sysmocom-${LINUX_KERNEL_TYPE}" + +# Overrides for the sysmocom bts v2 +BTS_FIRMWARE_NAME_sysmobts-v2 = "sysmobts-v2" + +SRCREV = "8d5d275254642b70b3ecf18a5b9b9fe9d5777230" + +PR = "r1" +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=lynxis/v4.9 \ + file://defconfig" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(sysmobts-v2|sysmocom-bsc)" +EXTRA_OEMAKE += "KALLSYMS_EXTRA_PASS=1" + +require linux-tools.inc + +do_configure() { + install -m 0644 ${WORKDIR}/defconfig ${B}/.config + oe_runmake -C ${S} O=${B} oldconfig +} + +# autoload defaults (alphabetically sorted) +module_autoload_davinci_mmc = "davinci_mmc" +module_autoload_dspdl_dm644x = "dspdl_dm644x" +module_autoload_fpgadl_par = "fpgadl_par" +module_autoload_leds-gpio = "leds-gpio" +module_autoload_mmc_block = "mmc_block" +module_autoload_msgqueue = "msgqueue" +module_autoload_rtfifo = "rtfifo" + +KERNEL_MODULE_PROBECONF_append = "davinci_mmc dspdl_dm644x fpgadl_par leds-gpio mmc_block msgqueue rtfifo" +KERNEL_MODULE_AUTOLOAD_append = "davinci_mmc dspdl_dm644x fpgadl_par leds-gpio mmc_block msgqueue rtfifo" + +# module configs (alphabetically sorted) +module_conf_dspdl_dm644x = "options dspdl_dm644x fw_name=${BTS_FIRMWARE_NAME}.out debug=0" +module_conf_fpgadl_par = "options fpgadl_par fw_name=${BTS_FIRMWARE_NAME}.bit" +module_conf_msgqueue = "options msgqueue fw_name=${BTS_FIRMWARE_NAME}.out" +module_conf_rtfifo = "options rtfifo fw_name=${BTS_FIRMWARE_NAME}.out" + +RDEPENDS_kernel-module-dspdl-dm644x += "sysmobts-firmware" +RDEPENDS_kernel-module-fpgadl-par += "sysmobts-firmware" +RDEPENDS_kernel-module-msgqueue += "sysmobts-firmware" +RDEPENDS_kernel-module-rtfifo += "sysmobts-firmware" + +DEFAULT_PREFERENCE = "-1"