From dda6e40605b632cd832b7ef4a0dcc9b84d72358a Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 31 Jul 2017 18:22:11 +0200 Subject: [PATCH 01/29] board-descriptor: port changes from fct --- .../board-descriptor/board-descriptor/bd.py | 2 +- .../board-descriptor/config.json | 3 +- .../board-descriptor/descriptor.py | 41 ++++++++++--------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/recipes-core/board-descriptor/board-descriptor/bd.py b/recipes-core/board-descriptor/board-descriptor/bd.py index b3d94c5..b36cf51 100755 --- a/recipes-core/board-descriptor/board-descriptor/bd.py +++ b/recipes-core/board-descriptor/board-descriptor/bd.py @@ -63,7 +63,7 @@ def read_descriptors(config): desc = descriptor.Descriptor(eeprom["path"], valid_bd["start"], valid_bd["size"], - config_table) + json.loads(config_table)) desc.read() descs.append(desc) return descs diff --git a/recipes-core/board-descriptor/board-descriptor/config.json b/recipes-core/board-descriptor/board-descriptor/config.json index a3ab00c..1ca6a6d 100644 --- a/recipes-core/board-descriptor/board-descriptor/config.json +++ b/recipes-core/board-descriptor/board-descriptor/config.json @@ -2,7 +2,8 @@ "tag_list": "/etc/bd/bd.json", "eeprom": [ { "path": "/sys/bus/i2c/devices/0-0050/eeprom", "valid_bds": [ - {"name": "info", "start": 0, "size": 1024}, + {"name": "board", "start": 0, "size": 1024}, + {"name": "platform", "start": 512, "size": 512}, {"name": "settings", "start": 1536, "size": 512} ] } diff --git a/recipes-core/board-descriptor/board-descriptor/descriptor.py b/recipes-core/board-descriptor/board-descriptor/descriptor.py index d4c78d1..922e9ba 100644 --- a/recipes-core/board-descriptor/board-descriptor/descriptor.py +++ b/recipes-core/board-descriptor/board-descriptor/descriptor.py @@ -1,5 +1,3 @@ -import json - def _array_to_int(data): # This one works for python2.7 and python3 @@ -31,8 +29,6 @@ def _array_to_partition(data): return part - return _array_to_parition_gen(data, 4) - def _array_to_partition64(data): import codecs @@ -112,6 +108,7 @@ def _dict_to_partition64(data): def _not_supported_yet(data): + del data raise NotImplementedError("Setting this type is not supported yet") _type_to_value = { @@ -185,12 +182,12 @@ class _BdRaw: class _BdParsed: - def __init__(self, strtype, value): - self.value = self._value_type(strtype, value) + def __init__(self, str_type, value): + self.value = self._value_type(str_type, value) - def _value_type(self, strtype, value): + def _value_type(self, str_type, value): for key, fun in _string_to_type.items(): - if key == strtype: + if key == str_type: return fun(value) @@ -199,7 +196,10 @@ class Descriptor: self.file = file self.offset = offset self.max_size = max_size - self.config_table = json.loads(config_table) + self.config_table = config_table + self.bd_raw = None + self.bd_parsed = None + self.tlv_by_name = None def _read_raw_bd(self): fd = open(self.file, "rb") @@ -218,6 +218,7 @@ class Descriptor: if tlv.tag == value["id"]: parsed = _BdParsed(value["type"], tlv.value) return key, parsed.value + return "unknown_" + str(tlv.tag), tlv.value def _parse_data(self, bdraw): bdparsed = {} @@ -228,26 +229,26 @@ class Descriptor: i = 1 while key in bdparsed: key = name + "_" + str(i) - i = i + 1 + i += 1 bdparsed[key] = value tlv_by_name[key] = tlv return bdparsed, tlv_by_name def read(self): - self.bdraw = self._read_raw_bd() - self.bdparsed, self.tlv_by_name = self._parse_data(self.bdraw) + self.bd_raw = self._read_raw_bd() + self.bd_parsed, self.tlv_by_name = self._parse_data(self.bd_raw) def get_list(self): - return self.bdparsed + return self.bd_parsed def get(self, name): name = name.split(".") - element = self.bdparsed + element = self.bd_parsed # Search the final element to print - # This allows names in the form parition64.flags + # This allows names in the form partition64.flags for key in name: - if not key in element: + if key not in element: return None element = element[key] return element @@ -269,6 +270,8 @@ class Descriptor: return dictionary def _do_set(self, name, value, tlv): + tlv_type = None + for key, config_item in self.config_table.items(): if tlv.tag == config_item["id"]: tlv_type = config_item["type"] @@ -282,11 +285,11 @@ class Descriptor: if not type(name) is list: self._write_bd(tlv.pos, fun(value), tlv.length) else: - element = self.bdparsed[name[0]] + element = self.bd_parsed[name[0]] # if we have changed the element it will be our value again value = self._update_dict(element, name[1:], value) self._write_bd(tlv.pos, fun(value), tlv.length) - self.bdparsed[name[0]] = value + self.bd_parsed[name[0]] = value def set(self, name, value): if self.tlv_by_name is None: @@ -298,7 +301,7 @@ class Descriptor: if tlv is None: return False - if not self.bdraw.is_writable: + if not self.bd_raw.is_writable: raise IOError("This operation is not permitted on " "this descriptor (ro)") From d496e517c181bfb8474b0ab83708f284fe25d22a Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 31 Jul 2017 18:22:47 +0200 Subject: [PATCH 02/29] board-descriptor: add missing dependency --- recipes-core/board-descriptor/board-descriptor.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/board-descriptor/board-descriptor.bb b/recipes-core/board-descriptor/board-descriptor.bb index 12cdcff..59284ac 100644 --- a/recipes-core/board-descriptor/board-descriptor.bb +++ b/recipes-core/board-descriptor/board-descriptor.bb @@ -7,7 +7,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" PR = "r0" -RDEPENDS_${PN} = "python-json" +RDEPENDS_${PN} = "python-json python-textutils" SRC_URI = " \ file://bd.py \ From 8b2d4fc35803721f7cd40e86c8b872fb7a97479a Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 31 Jul 2017 18:27:06 +0200 Subject: [PATCH 03/29] bd.json: add missing tags --- recipes-core/board-descriptor/board-descriptor/bd.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-core/board-descriptor/board-descriptor/bd.json b/recipes-core/board-descriptor/board-descriptor/bd.json index 2abd114..0df4417 100644 --- a/recipes-core/board-descriptor/board-descriptor/bd.json +++ b/recipes-core/board-descriptor/board-descriptor/bd.json @@ -58,6 +58,9 @@ "pd_usbhost": { "id": 4124, "type": "String"}, "pd_dev_tree": { "id": 4125, "type": "String"}, "patch_ver": { "id": 4126, "type": "UInt8"}, + "pd_phy2": { "id": 4127, "type": "String"}, + "pd_serdes": { "id": 4128, "type": "UInt16"}, + "pd_shield": { "id": 4129, "type": "UInt16"}, "boot_part": { "id": 32768, "type": "UInt8"}, "factory_reset": { "id": 32769, "type": "UInt8"} From a8d746976e2f343675f864bc60b73ea949f158df Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 2 Aug 2017 17:41:53 +0200 Subject: [PATCH 04/29] u-boot: add recipes for nbhw16 v1 and v2 --- .../u-boot/u-boot-am335x-nbhw16-v1_git.bb | 18 ++ .../u-boot/u-boot-am335x-nbhw16-v2_git.bb | 18 ++ .../u-boot/u-boot-fw-utils/fw_env.config | 9 + recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend | 7 + recipes-bsp/u-boot/u-boot-nm.inc | 286 ++++++++++++++++++ 5 files changed, 338 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb create mode 100644 recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb create mode 100644 recipes-bsp/u-boot/u-boot-fw-utils/fw_env.config create mode 100644 recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend create mode 100644 recipes-bsp/u-boot/u-boot-nm.inc diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb new file mode 100644 index 0000000..b5e6f52 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb @@ -0,0 +1,18 @@ +# Force machine configuration for this recipe +UBOOT_MACHINE = "am335x_nbhw16_defconfig" + +require u-boot-nm.inc + +SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw16-2016.04" + +SRCREV ?= "a6f157c6dbd048b452c7e2640215c55be658780c" +PV = "v2016.04+git${SRCPV}" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +do_deploy_append() { + cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin + cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin +} + diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb new file mode 100644 index 0000000..86b2519 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -0,0 +1,18 @@ +# Force machine configuration for this recipe +UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" + +require u-boot-nm.inc + +SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw16-2016.04" + +SRCREV ?= "a6f157c6dbd048b452c7e2640215c55be658780c" +PV = "v2016.04+git${SRCPV}" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +do_deploy_append() { + cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin + cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin +} + diff --git a/recipes-bsp/u-boot/u-boot-fw-utils/fw_env.config b/recipes-bsp/u-boot/u-boot-fw-utils/fw_env.config new file mode 100644 index 0000000..f3363b9 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fw-utils/fw_env.config @@ -0,0 +1,9 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# MTD device name Device offset Environment size +/sys/bus/i2c/devices/0-0050/eeprom 0x1000 0x0800 diff --git a/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend new file mode 100644 index 0000000..2cb8d2c --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://fw_env.config" + +do_install_prepend() { + cp -f ${WORKDIR}/fw_env.config ${S}/tools/env/ +} diff --git a/recipes-bsp/u-boot/u-boot-nm.inc b/recipes-bsp/u-boot/u-boot-nm.inc new file mode 100644 index 0000000..2c31c58 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-nm.inc @@ -0,0 +1,286 @@ +SUMMARY = "Universal Boot Loader for embedded devices" +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" + +S = "${WORKDIR}/git" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit uboot-config deploy + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1' +EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' + +PACKAGECONFIG ??= "openssl" +# u-boot will compile its own tools during the build, with specific +# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as +# a host build dependency. +PACKAGECONFIG[openssl] = ",,openssl-native" + +# Allow setting an additional version string that will be picked up by the +# u-boot build system and appended to the u-boot version. If the .scmversion +# file already exists it will not be overwritten. +UBOOT_LOCALVERSION ?= "" + +# Some versions of u-boot use .bin and others use .img. By default use .bin +# but enable individual recipes to change this value. +UBOOT_SUFFIX ??= "bin" +UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" +UBOOT_SYMLINK ?= "${PN}.${UBOOT_SUFFIX}" +UBOOT_MAKE_TARGET ?= "all" + +# Output the ELF generated. Some platforms can use the ELF file and directly +# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging +# purposes. +UBOOT_ELF ?= "" +UBOOT_ELF_SUFFIX ?= "elf" +UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" + +# Some versions of u-boot build an SPL (Second Program Loader) image that +# should be packaged along with the u-boot binary as well as placed in the +# deploy directory. For those versions they can set the following variables +# to allow packaging the SPL. +SPL_BINARY ?= "" +SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}" +SPL_SYMLINK ?= "${SPL_BINARY}-${PN}" + +# Additional environment variables or a script can be installed alongside +# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' +# or 'boot.scr', should be packaged along with u-boot as well as placed in the +# deploy directory. Machine configurations needing one of these files should +# include it in the SRC_URI and set the UBOOT_ENV parameter. +UBOOT_ENV_SUFFIX ?= "txt" +UBOOT_ENV ?= "" +UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" + +do_compile () { + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then + sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk + fi + + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + oe_runmake O=${config} ${config} + oe_runmake O=${config} ${UBOOT_MAKE_TARGET} + cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} + fi + done + unset j + done + unset i + else + oe_runmake ${UBOOT_MACHINE} + oe_runmake ${UBOOT_MAKE_TARGET} + fi + +} + +do_install () { + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + install -d ${D}/boot + install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -d ${D}/boot + install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + fi + + if [ "x${UBOOT_ELF}" != "x" ] + then + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + install ${S}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install ${S}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + fi + fi + + if [ -e ${WORKDIR}/fw_env.config ] ; then + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + fi + + if [ "x${SPL_BINARY}" != "x" ] + then + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY} + fi + done + unset j + done + unset i + else + install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} + fi + fi + + if [ "x${UBOOT_ENV}" != "x" ] + then + install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} + ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + fi +} + +FILES_${PN} = "/boot ${sysconfdir}" +# Ensure the split debug part of any elf files are put into dbg +FILES_${PN}-dbg += "/boot/.debug" + +do_deploy () { + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + install -d ${DEPLOYDIR} + install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + cd ${DEPLOYDIR} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -d ${DEPLOYDIR} + install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + cd ${DEPLOYDIR} + rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} + fi + + if [ "x${UBOOT_ELF}" != "x" ] + then + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + install ${S}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + fi + done + unset j + done + unset i + else + install ${S}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + fi + fi + + + if [ "x${SPL_BINARY}" != "x" ] + then + if [ "x${UBOOT_CONFIG}" != "x" ] + then + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + if [ $j -eq $i ] + then + install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} + rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} + fi + done + unset j + done + unset i + else + install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} + rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} + fi + fi + + + if [ "x${UBOOT_ENV}" != "x" ] + then + install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} + rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + fi +} + +addtask deploy before do_build after do_compile From 7ce15f779968ef8e813b216fcb184dc2bab090fd Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 21 Aug 2017 18:12:46 +0200 Subject: [PATCH 05/29] am335x-nbhw16: update kernel revision --- conf/machine/am335x-nbhw16.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/am335x-nbhw16.conf b/conf/machine/am335x-nbhw16.conf index 265b837..1e14091 100644 --- a/conf/machine/am335x-nbhw16.conf +++ b/conf/machine/am335x-nbhw16.conf @@ -21,5 +21,5 @@ KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" PV_pn-linux-netmodule = "4.4.71-${SRCPV}" SRC_URI_pn-linux-netmodule = "git://github.com/netmodule/linux.git;protocol=https;branch=nbhw16-4.4-pm-ti" -SRCREV_pn-linux-netmodule = "ad39a4ea4151b886a6d56fe5b7b01a86d9603c4d" +SRCREV_pn-linux-netmodule = "cc1311058ca565929b749a829ed6c623cc6ad0ea" From e987ffd3804bf5a4c8dcc9c92e440dfa0f8354f0 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 21 Aug 2017 18:15:05 +0200 Subject: [PATCH 06/29] u-boot-am335x-nbhw16-v2: update revision --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index 86b2519..46db3dd 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -5,7 +5,7 @@ require u-boot-nm.inc SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw16-2016.04" -SRCREV ?= "a6f157c6dbd048b452c7e2640215c55be658780c" +SRCREV ?= "afb88d5192d4bd6b7734e3ae1de9ee2929c08058" PV = "v2016.04+git${SRCPV}" SPL_BINARY = "MLO" From 7f4fa308055acb77b800489c9e858b817ce57601 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 21 Aug 2017 18:28:54 +0200 Subject: [PATCH 07/29] u-boot: include nbhw16-v1 in nbhw16-v2 Include the recipe of nbhw16-v1 in nbhw16-v2 and fix a problem that occurs if both images are built. --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb | 6 ++++++ recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 15 ++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb index b5e6f52..6268c48 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb @@ -12,7 +12,13 @@ SPL_BINARY = "MLO" UBOOT_SUFFIX = "img" do_deploy_append() { + rm -f ${DEPLOYDIR}/${PN}-spl.bin + rm -f ${DEPLOYDIR}/${PN}.bin + rm -f ${DEPLOYDIR}/${PN}.img + rm -f ${DEPLOYDIR}/MLO-${PN} cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin + cp ${S}/u-boot.img ${DEPLOYDIR}/${PN}.img + cp ${S}/MLO ${DEPLOYDIR}/MLO-${PN} } diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index 46db3dd..b124b6e 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -1,18 +1,7 @@ +require u-boot-am335x-nbhw16-v1_git.bb + # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -require u-boot-nm.inc - -SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw16-2016.04" - SRCREV ?= "afb88d5192d4bd6b7734e3ae1de9ee2929c08058" -PV = "v2016.04+git${SRCPV}" - -SPL_BINARY = "MLO" -UBOOT_SUFFIX = "img" - -do_deploy_append() { - cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin - cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin -} From 440deeb234fa1c92898dd55fca5be2b017fd219b Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 21 Aug 2017 18:49:49 +0200 Subject: [PATCH 08/29] u-boot-am335x-nbhw16-v2: use correct revision --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index b124b6e..cdb9cae 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -3,5 +3,5 @@ require u-boot-am335x-nbhw16-v1_git.bb # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -SRCREV ?= "afb88d5192d4bd6b7734e3ae1de9ee2929c08058" +SRCREV = "afb88d5192d4bd6b7734e3ae1de9ee2929c08058" From 539793dc75fcc6e906230e03e1152dd913fd9923 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Tue, 5 Sep 2017 10:17:23 +0200 Subject: [PATCH 09/29] u-boot-am335x-nbhw16-v2: use newer version --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index cdb9cae..29eb587 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -3,5 +3,5 @@ require u-boot-am335x-nbhw16-v1_git.bb # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -SRCREV = "afb88d5192d4bd6b7734e3ae1de9ee2929c08058" +SRCREV = "e6539d6c79109b63a3bf156b728cfe10edaf2185" From 1db02e91a2eef90cf3647bdb5dc6b16229e537e9 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Tue, 5 Sep 2017 10:22:10 +0200 Subject: [PATCH 10/29] u-boot-am335x-nbhw16-v2: fix revision --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index 29eb587..35a84a5 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -3,5 +3,5 @@ require u-boot-am335x-nbhw16-v1_git.bb # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -SRCREV = "e6539d6c79109b63a3bf156b728cfe10edaf2185" +SRCREV = "d7677ffa84990cf0d6f5722e35bc6692053907a6" From 2d8349266008fe9b932cfa396ee5abe40593fccc Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 13 Sep 2017 16:13:43 +0200 Subject: [PATCH 11/29] u-boot-am335x-nbhw16-v2: update u-boot version --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index 35a84a5..266b128 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -3,5 +3,5 @@ require u-boot-am335x-nbhw16-v1_git.bb # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -SRCREV = "d7677ffa84990cf0d6f5722e35bc6692053907a6" +SRCREV = "9f5e4cd0e9c4b888cc6a75bcc77cbdc97ce5d032" From e9ca2d1ad0154a26660141fbfca22522e5cbd7d1 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Thu, 14 Sep 2017 10:26:52 +0200 Subject: [PATCH 12/29] machine: am335x-nbhw16: update kernel version The newer kernel version has a fix for CVE-2017-1000251 which allows attackers to produce a buffer overflow via bluetooth in the kernel. --- conf/machine/am335x-nbhw16.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/am335x-nbhw16.conf b/conf/machine/am335x-nbhw16.conf index 1e14091..000d66c 100644 --- a/conf/machine/am335x-nbhw16.conf +++ b/conf/machine/am335x-nbhw16.conf @@ -21,5 +21,5 @@ KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" PV_pn-linux-netmodule = "4.4.71-${SRCPV}" SRC_URI_pn-linux-netmodule = "git://github.com/netmodule/linux.git;protocol=https;branch=nbhw16-4.4-pm-ti" -SRCREV_pn-linux-netmodule = "cc1311058ca565929b749a829ed6c623cc6ad0ea" +SRCREV_pn-linux-netmodule = "cc8b47ba4afeb67ce82d98fb5c36c321ade8270f" From ed317407b10d0648fc0b2cd4ec9b0da05f89ff08 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Thu, 14 Sep 2017 11:56:00 +0200 Subject: [PATCH 13/29] bluez5: add patch for CVE-2017-1000250 This commit adds a patch to fix CVE-2017-1000250 in the bluez5 packet. --- .../bluez5/fix-out-of-bounds-heap-read.patch | 26 +++++++++++++++++++ recipes-connectivity/bluez5/bluez5_5.44.bb | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 recipes-connectivity/bluez5/bluez5/fix-out-of-bounds-heap-read.patch diff --git a/recipes-connectivity/bluez5/bluez5/fix-out-of-bounds-heap-read.patch b/recipes-connectivity/bluez5/bluez5/fix-out-of-bounds-heap-read.patch new file mode 100644 index 0000000..05359da --- /dev/null +++ b/recipes-connectivity/bluez5/bluez5/fix-out-of-bounds-heap-read.patch @@ -0,0 +1,26 @@ +From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz +Date: Wed, 13 Sep 2017 10:01:40 +0300 +Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function + +Check if there is enough data to continue otherwise return an error. +--- + src/sdpd-request.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sdpd-request.c b/src/sdpd-request.c +index 1eefdce..318d044 100644 +--- a/src/sdpd-request.c ++++ b/src/sdpd-request.c +@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf) + } else { + /* continuation State exists -> get from cache */ + sdp_buf_t *pCache = sdp_get_cached_rsp(cstate); +- if (pCache) { ++ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) { + uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent); + pResponse = pCache->data; + memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent); +-- +cgit v1.1 + diff --git a/recipes-connectivity/bluez5/bluez5_5.44.bb b/recipes-connectivity/bluez5/bluez5_5.44.bb index 2c4f4fe..bcff5e2 100644 --- a/recipes-connectivity/bluez5/bluez5_5.44.bb +++ b/recipes-connectivity/bluez5/bluez5_5.44.bb @@ -4,6 +4,10 @@ SRC_URI[sha256sum] = "0c321e291f8b45e6a78e379dfe80592b65955a0f0ab191f1cca0edd8ec EXTRA_OECONF += "--enable-deprecated" +SRC_URI_append = " file://fix-out-of-bounds-heap-read.patch" + +PR = "r2" + # noinst programs in Makefile.tools that are conditional on READLINE # support NOINST_TOOLS_READLINE ?= " \ From 9811c9bbde46058a01b65916520d0975ea8926e8 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 27 Nov 2017 16:58:42 +0100 Subject: [PATCH 14/29] u-boot: nbhw16-v2: use new version of u-boot --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index 266b128..7e3d8e7 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -3,5 +3,5 @@ require u-boot-am335x-nbhw16-v1_git.bb # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -SRCREV = "9f5e4cd0e9c4b888cc6a75bcc77cbdc97ce5d032" +SRCREV = "3f18cdaff7435cfddaf217189f094319c83357d5" From b50a93dd0541e5b4a5a7d146cdec75bf35164bb8 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Tue, 12 Dec 2017 09:57:08 +0100 Subject: [PATCH 15/29] nbhw16: update uboot --- recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb index 7e3d8e7..01579a8 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb @@ -3,5 +3,5 @@ require u-boot-am335x-nbhw16-v1_git.bb # Force machine configuration for this recipe UBOOT_MACHINE = "am335x_nbhw16_v2_defconfig" -SRCREV = "3f18cdaff7435cfddaf217189f094319c83357d5" +SRCREV = "0b985705d558caceeb968b234af27cfc536ef019" From c4391adffbd160b24a959bc2d65a8dde52c1a3c9 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Tue, 9 Jan 2018 16:12:36 +0100 Subject: [PATCH 16/29] nrhw20: u-boot: add recipe for u-boot build --- .../u-boot/u-boot-am335x-nbhw16-v1_git.bb | 2 ++ .../u-boot/u-boot-am335x-nrhw20-v1_git.bb | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-am335x-nrhw20-v1_git.bb diff --git a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb index 6268c48..8cb370e 100644 --- a/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb +++ b/recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb @@ -3,8 +3,10 @@ UBOOT_MACHINE = "am335x_nbhw16_defconfig" require u-boot-nm.inc +# Be aware github/netmodule git SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw16-2016.04" +# Should be updated when a new U-Boot Version is available SRCREV ?= "a6f157c6dbd048b452c7e2640215c55be658780c" PV = "v2016.04+git${SRCPV}" diff --git a/recipes-bsp/u-boot/u-boot-am335x-nrhw20-v1_git.bb b/recipes-bsp/u-boot/u-boot-am335x-nrhw20-v1_git.bb new file mode 100644 index 0000000..64ca76e --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-am335x-nrhw20-v1_git.bb @@ -0,0 +1,27 @@ +require u-boot-nm.inc + +# Force machine configuration for this recipe +UBOOT_MACHINE = "am335x_nrhw20_defconfig" + +# Be aware github/netmodule git +SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nrhw20-2016.04" + +# Should be updated when a new U-Boot Version is available +SRCREV ?= "297c60c69942e7d377925181b29a1f8e9515284d" + +PV = "v2016.04+git${SRCPV}" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +do_deploy_append() { + rm -f ${DEPLOYDIR}/${PN}-spl.bin + rm -f ${DEPLOYDIR}/${PN}.bin + rm -f ${DEPLOYDIR}/${PN}.img + rm -f ${DEPLOYDIR}/MLO-${PN} + cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin + cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin + cp ${S}/u-boot.img ${DEPLOYDIR}/${PN}.img + cp ${S}/MLO ${DEPLOYDIR}/MLO-${PN} +} + From 735ca499e21b6b6938f2bb962b0a9edff1006271 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 10 Jan 2018 11:24:23 +0100 Subject: [PATCH 17/29] u-boot: nrhw18: add u-boot configuration --- .../u-boot/u-boot-armada-nrhw18-v1_git.bb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-armada-nrhw18-v1_git.bb diff --git a/recipes-bsp/u-boot/u-boot-armada-nrhw18-v1_git.bb b/recipes-bsp/u-boot/u-boot-armada-nrhw18-v1_git.bb new file mode 100644 index 0000000..d8c9632 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-armada-nrhw18-v1_git.bb @@ -0,0 +1,25 @@ +require u-boot-nm.inc + +# Force machine configuration for this recipe +UBOOT_MACHINE = "armada-385-nbhw18-v1_defconfig" + +# Be aware github/netmodule git +SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw-armada-v2017.11" + +# Should be updated when a new U-Boot Version is available +SRCREV ?= "43f3c912f8f0130c75bb9daf71386fc63ed193fd" + +PV = "v2017.11+git${SRCPV}" + +UBOOT_SUFFIX = "kwb" +UBOOT_BINARY = "u-boot-spl.${UBOOT_SUFFIX}" + +do_deploy() { + rm -f ${DEPLOYDIR}/${PN}-spl.bin + rm -f ${DEPLOYDIR}/${PN}.bin + rm -f ${DEPLOYDIR}/${PN}-spl.kwb + cp ${S}/spl/u-boot-spl.bin ${DEPLOYDIR}/${PN}-spl.bin + cp ${S}/u-boot.bin ${DEPLOYDIR}/${PN}.bin + cp ${S}/u-boot-spl.kwb ${DEPLOYDIR}/${PN}.kwb +} + From fc96b459d51e7ec23f90fb2ab12d4fae96ed096a Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Mon, 5 Feb 2018 10:06:19 +0100 Subject: [PATCH 18/29] machine: am335x-nrhw20: add new machine config --- conf/machine/am335x-nrhw20.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 conf/machine/am335x-nrhw20.conf diff --git a/conf/machine/am335x-nrhw20.conf b/conf/machine/am335x-nrhw20.conf new file mode 100644 index 0000000..e7e856b --- /dev/null +++ b/conf/machine/am335x-nrhw20.conf @@ -0,0 +1,21 @@ +#@TYPE: Machine +#@NAME: NBHW16 based routers like NB800 +#@DESCRIPTION: Machine configuration for the NBHW16 based routers http://netmodule.com/en/products/iot-routers + +require conf/machine/include/ti33x.inc + +IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot" +IMAGE_CLASSES += "image_types_uboot" + +MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree" + +KERNEL_DEFCONFIG = "am335x-nrhw20_defconfig" +KERNEL_DEVICETREE = "am335x-nrhw20-prod1.dtb \ + " +KERNEL_IMAGETYPE = "zImage" + +PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" +PV_pn-linux-netmodule = "4.14.14-${SRCPV}" +SRC_URI_pn-linux-netmodule ?= "git://github.com/netmodule/linux.git;protocol=https;branch=nrhw20-4.14" +SRCREV_pn-linux-netmodule ?= "78b62bee0d49e48668918494a39719210fc772b3" + From 5cdd281e6ebecf15f77793640b3ad85bab2d1889 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Tue, 20 Feb 2018 11:24:14 +0100 Subject: [PATCH 19/29] nrhw20: Update GPIO pin in BT init script --- recipes-connectivity/tibluetooth/tibluetooth.bb | 17 +++++++++++++---- ...tooth.service => tibluetooth-nbhw16.service} | 0 .../tibluetooth/tibluetooth-nrhw20.service | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) rename recipes-connectivity/tibluetooth/tibluetooth/{tibluetooth.service => tibluetooth-nbhw16.service} (100%) create mode 100644 recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service diff --git a/recipes-connectivity/tibluetooth/tibluetooth.bb b/recipes-connectivity/tibluetooth/tibluetooth.bb index c63bfec..fe4dc6e 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth.bb +++ b/recipes-connectivity/tibluetooth/tibluetooth.bb @@ -10,7 +10,8 @@ PR = "r2" inherit systemd SRC_URI = " \ - file://tibluetooth.service\ + file://tibluetooth-nbhw16.service \ + file://tibluetooth-nrhw20.service \ file://TIInit_11.8.32.bts \ " @@ -25,11 +26,19 @@ FILES_${PN}_append = " \ /lib \ " -do_install () { +do_install_am335x-nbhw16 () { install -d ${D}${systemd_unitdir}/system/ - install -m 0644 tibluetooth.service ${D}${systemd_unitdir}/system/ + install -m 0644 tibluetooth-nbhw16.service ${D}${systemd_unitdir}/system/tibluetooth.service install -d ${D}/lib/firmware/ti-connectivity install -m 0644 TIInit_11.8.32.bts ${D}/lib/firmware/ti-connectivity/ - } + +do_install_am335x-nrhw20 () { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 tibluetooth-nrhw20.service ${D}${systemd_unitdir}/system/tibluetooth.service + + install -d ${D}/lib/firmware/ti-connectivity + install -m 0644 TIInit_11.8.32.bts ${D}/lib/firmware/ti-connectivity/ +} + diff --git a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth.service b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nbhw16.service similarity index 100% rename from recipes-connectivity/tibluetooth/tibluetooth/tibluetooth.service rename to recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nbhw16.service diff --git a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service new file mode 100644 index 0000000..6ad68d8 --- /dev/null +++ b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service @@ -0,0 +1,16 @@ +[Unit] +Description=Attach ti bluetooth +Before=bluetooth +Requires=bluetooth.target + +[Service] +Type=forking +ExecStartPre=-/bin/sh -c "/bin/echo 52 > /sys/class/gpio/export" +ExecStartPre=-/bin/sh -c "/bin/echo out > /sys/class/gpio/gpio52/direction" +ExecStartPre=/bin/sh -c "/bin/echo 1 > /sys/class/gpio/gpio52/value" +ExecStart=/usr/bin/hciattach /dev/ttyS5 texas 3000000 flow + +ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio52/value" + +[Install] +WantedBy=multi-user.target From d077d1b1c4682976cc3fb85e61889ef8e8063fb5 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Thu, 22 Feb 2018 14:17:14 +0100 Subject: [PATCH 20/29] nrhw20: Update gpsd service file to enable gpio --- recipes-connectivity/gpsd/gpsd/gpsd.service | 15 +++++++++++++++ recipes-connectivity/gpsd/gpsd_3.14.bbappend | 1 + 2 files changed, 16 insertions(+) create mode 100644 recipes-connectivity/gpsd/gpsd/gpsd.service create mode 100644 recipes-connectivity/gpsd/gpsd_3.14.bbappend diff --git a/recipes-connectivity/gpsd/gpsd/gpsd.service b/recipes-connectivity/gpsd/gpsd/gpsd.service new file mode 100644 index 0000000..8769762 --- /dev/null +++ b/recipes-connectivity/gpsd/gpsd/gpsd.service @@ -0,0 +1,15 @@ +[Unit] +Description=GPS (Global Positioning System) Daemon +Requires=gpsd.socket + +[Service] +ExecStartPre=-/bin/sh -c "/bin/echo 2 > /sys/class/gpio/export" +ExecStartPre=-/bin/sh -c "/bin/echo out > /sys/class/gpio/gpio2/direction" +ExecStartPre=/bin/sh -c "/bin/echo 1 > /sys/class/gpio/gpio2/value" +ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio2/value" + +EnvironmentFile=/etc/default/gpsd +ExecStart=/usr/sbin/gpsd -N /dev/ttyS3 + +[Install] +Also=gpsd.socket diff --git a/recipes-connectivity/gpsd/gpsd_3.14.bbappend b/recipes-connectivity/gpsd/gpsd_3.14.bbappend new file mode 100644 index 0000000..98cb56f --- /dev/null +++ b/recipes-connectivity/gpsd/gpsd_3.14.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend_am335x-nrhw20 := "${THISDIR}/${PN}:" \ No newline at end of file From 14cc4bacd774563beaac4a5fabc577c898721d4a Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Thu, 22 Feb 2018 15:55:42 +0100 Subject: [PATCH 21/29] networkmanager: add support for nrhw20 --- .../am335x-nrhw20/system-connections.tar.gz | Bin 0 -> 646 bytes ...ernet-2a2b6485-4d06-4b86-8051-751399c6881a | 19 ------------------ .../networkmanager/support-dsa.patch | 14 +++++++++++++ .../networkmanager/system-connections.tar.gz | Bin 0 -> 353 bytes .../networkmanager/networkmanager_1.4.4.bb | 8 ++++---- 5 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 recipes-connectivity/networkmanager/networkmanager/am335x-nrhw20/system-connections.tar.gz delete mode 100644 recipes-connectivity/networkmanager/networkmanager/ethernet-2a2b6485-4d06-4b86-8051-751399c6881a create mode 100644 recipes-connectivity/networkmanager/networkmanager/support-dsa.patch create mode 100644 recipes-connectivity/networkmanager/networkmanager/system-connections.tar.gz diff --git a/recipes-connectivity/networkmanager/networkmanager/am335x-nrhw20/system-connections.tar.gz b/recipes-connectivity/networkmanager/networkmanager/am335x-nrhw20/system-connections.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ea69609c059078fdc76c74800c000b97a5510134 GIT binary patch literal 646 zcmV;10(t!(iwFQw$xdAY1MQd1Zlf?1g<1P4@&dQDum51da-O2xHaDI#<4&OQPco-*YA@p5GVQTtryv;sZJj!Z)JV%|Mk7FSsUF|6A9I5BJ}^_5HX1QmW`bDyg~Ah|zx~ zEYCJP`TyT__s98r)>P$eKHKl($a$Wl5&~+c9Vl&bD0HoX3#=SsUh`11>9C`crbik& znpo3KG}JB-bgrf4TCIx@*ihQs2bDVoA$Sf7l>=wB0;+S8CO99oVLKYyW*q0Iuw)~} zpH{h{q4~wuJrf*P^FvcT5My^Q%ihN|0=TLgXdJ0kI?Zt!RFZ^SA8 zC0G2&zm7GK_+Nql6J5syco(y;nLOj)5Bvhs?5^28t9y0=SCpc_8)5PraU*U~v8o$k zBsYY|lC_cbzA9VS?cH{nX_lGrKpnJwMP>BSZwYoo^X$UmZ`0j=>QgAZr~h&N{uhb= zmHHnS`hyWXS6G1-!AJVJ0Pnp3sS66VL=m(4YX4*E|8K|tkJEkqJpL`7?f{`;I##)KV#bwf|-6|L@2@U!8wr6aOpm&lmoE?j&Jt!TO?tn8-C0 g^CF)W)IbbWqm-%a9O8!ELG6H2%s#3MlRV{w|=g@3Xq?TnW$9tCol?B_pZ`!iK_1t-%C}-Xs zT>pFsc{* Date: Thu, 22 Feb 2018 15:56:11 +0100 Subject: [PATCH 22/29] board-descriptor: add support for nrhw20 --- recipes-core/board-descriptor/board-descriptor.bb | 2 ++ .../board-descriptor/am335x-nrhw20/config.json | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 recipes-core/board-descriptor/board-descriptor/am335x-nrhw20/config.json diff --git a/recipes-core/board-descriptor/board-descriptor.bb b/recipes-core/board-descriptor/board-descriptor.bb index 59284ac..531e6eb 100644 --- a/recipes-core/board-descriptor/board-descriptor.bb +++ b/recipes-core/board-descriptor/board-descriptor.bb @@ -2,6 +2,8 @@ SUMMARY = "Boarddescriptor Tool" DESCRIPTION = "Read and write from/to the boarddescriptor" AUTHOR = "Stefan Eichenberger (stefan.eichenberger@netmodule.com)" +FILESEXTRAPAHT_prepend := "${THISDIR}/${PN}/${MACHINE}:" + SECTION = "core" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" diff --git a/recipes-core/board-descriptor/board-descriptor/am335x-nrhw20/config.json b/recipes-core/board-descriptor/board-descriptor/am335x-nrhw20/config.json new file mode 100644 index 0000000..ad391bd --- /dev/null +++ b/recipes-core/board-descriptor/board-descriptor/am335x-nrhw20/config.json @@ -0,0 +1,11 @@ +{ + "tag_list": "/etc/bd/bd.json", + "eeprom": [ + { "path": "/sys/bus/i2c/devices/2-0050/eeprom", "valid_bds": [ + {"name": "board", "start": 0, "size": 1024}, + {"name": "platform", "start": 512, "size": 512}, + {"name": "settings", "start": 1536, "size": 512} + ] + } + ] +} From d4f6909ddbc66dcc81da31b91fada3795e13ed05 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Thu, 22 Feb 2018 18:24:19 +0100 Subject: [PATCH 23/29] nrhw20: update kernel version --- conf/machine/am335x-nrhw20.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/am335x-nrhw20.conf b/conf/machine/am335x-nrhw20.conf index e7e856b..7920f8e 100644 --- a/conf/machine/am335x-nrhw20.conf +++ b/conf/machine/am335x-nrhw20.conf @@ -17,5 +17,5 @@ KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" PV_pn-linux-netmodule = "4.14.14-${SRCPV}" SRC_URI_pn-linux-netmodule ?= "git://github.com/netmodule/linux.git;protocol=https;branch=nrhw20-4.14" -SRCREV_pn-linux-netmodule ?= "78b62bee0d49e48668918494a39719210fc772b3" +SRCREV_pn-linux-netmodule ?= "4eda667f07b401ff4cea94564b24e2957b48239b" From 24ba1c2f82de244909dd1558f1d94d414c1e4df7 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Thu, 1 Mar 2018 14:02:25 +0100 Subject: [PATCH 24/29] nbhw16+nrhw20: Fix warning on boot related to bluetooth --- .../tibluetooth/tibluetooth/tibluetooth-nbhw16.service | 2 +- .../tibluetooth/tibluetooth/tibluetooth-nrhw20.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nbhw16.service b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nbhw16.service index 18bd305..0c69a95 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nbhw16.service +++ b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nbhw16.service @@ -1,6 +1,6 @@ [Unit] Description=Attach ti bluetooth -Before=bluetooth +Before=bluetooth.target Requires=bluetooth.target [Service] diff --git a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service index 6ad68d8..4489bc3 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service +++ b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service @@ -1,6 +1,6 @@ [Unit] Description=Attach ti bluetooth -Before=bluetooth +Before=bluetooth.target Requires=bluetooth.target [Service] From 8f391c9234dd0c4d06ae781300d085bcf7781fa1 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 7 Mar 2018 15:50:41 +0100 Subject: [PATCH 25/29] nrhw20: update kernel --- conf/machine/am335x-nrhw20.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/am335x-nrhw20.conf b/conf/machine/am335x-nrhw20.conf index 7920f8e..31d93a8 100644 --- a/conf/machine/am335x-nrhw20.conf +++ b/conf/machine/am335x-nrhw20.conf @@ -17,5 +17,5 @@ KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" PV_pn-linux-netmodule = "4.14.14-${SRCPV}" SRC_URI_pn-linux-netmodule ?= "git://github.com/netmodule/linux.git;protocol=https;branch=nrhw20-4.14" -SRCREV_pn-linux-netmodule ?= "4eda667f07b401ff4cea94564b24e2957b48239b" +SRCREV_pn-linux-netmodule ?= "48364c77ec4cad7768c1fc7138dcd5bbac6ee665" From f2bf47139cbe63a5c6484111848bfe6a209e0a95 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 21 Mar 2018 11:27:41 +0100 Subject: [PATCH 26/29] machine: nrhw20: update kernel --- conf/machine/am335x-nrhw20.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/am335x-nrhw20.conf b/conf/machine/am335x-nrhw20.conf index 31d93a8..237e9fc 100644 --- a/conf/machine/am335x-nrhw20.conf +++ b/conf/machine/am335x-nrhw20.conf @@ -17,5 +17,5 @@ KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" PV_pn-linux-netmodule = "4.14.14-${SRCPV}" SRC_URI_pn-linux-netmodule ?= "git://github.com/netmodule/linux.git;protocol=https;branch=nrhw20-4.14" -SRCREV_pn-linux-netmodule ?= "48364c77ec4cad7768c1fc7138dcd5bbac6ee665" +SRCREV_pn-linux-netmodule ?= "bc588eccf4d375d6a5c4fc1ff2584e4e7d550b65" From 70d6eb29f6320044dec1f5a4a22c9448d849e0b0 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Mon, 26 Mar 2018 16:27:36 +0200 Subject: [PATCH 27/29] nbhw16-fct : Fix tibluetooth recipe --- recipes-connectivity/tibluetooth/tibluetooth.bb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes-connectivity/tibluetooth/tibluetooth.bb b/recipes-connectivity/tibluetooth/tibluetooth.bb index 5ef1e14..586865f 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth.bb +++ b/recipes-connectivity/tibluetooth/tibluetooth.bb @@ -26,7 +26,7 @@ FILES_${PN}_append = " \ /lib \ " -do_install_am335x-nbhw16 () { +install_nbhw16 () { install -d ${D}${systemd_unitdir}/system/ install -m 0644 tibluetooth-nbhw16.service ${D}${systemd_unitdir}/system/tibluetooth.service @@ -34,6 +34,14 @@ do_install_am335x-nbhw16 () { install -m 0644 TIInit_11.8.32.bts ${D}/lib/firmware/ti-connectivity/ } +do_install_am335x-nbhw16 () { + install_nbhw16 +} + +do_install_am335x-nbhw16-fct () { + install_nbhw16 +} + install_nrhw20 () { install -d ${D}${systemd_unitdir}/system/ install -m 0644 tibluetooth-nrhw20.service ${D}${systemd_unitdir}/system/tibluetooth.service From cbd59ae614ed8b2e73da3e94ffb6af9c5e8c88db Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 7 Mar 2018 15:57:32 +0100 Subject: [PATCH 28/29] modemmanager: add version 1.8.0 for ublox support --- .../libmbim/libmbim_1.16.0.bb | 18 ++++++++ recipes-connectivity/libqmi/libqmi_1.20.0.bb | 19 ++++++++ .../modemmanager/make-compilable.patch | 13 ++++++ .../modemmanager/modemmanager_1.8.0.bb | 46 +++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100644 recipes-connectivity/libmbim/libmbim_1.16.0.bb create mode 100644 recipes-connectivity/libqmi/libqmi_1.20.0.bb create mode 100644 recipes-connectivity/modemmanager/modemmanager/make-compilable.patch create mode 100644 recipes-connectivity/modemmanager/modemmanager_1.8.0.bb diff --git a/recipes-connectivity/libmbim/libmbim_1.16.0.bb b/recipes-connectivity/libmbim/libmbim_1.16.0.bb new file mode 100644 index 0000000..aa5e1ea --- /dev/null +++ b/recipes-connectivity/libmbim/libmbim_1.16.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "libmbim is library for talking to WWAN devices by MBIM protocol" +DESCRIPTION = "libmbim is a glib-based library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libmbim/" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = "glib-2.0 libgudev" + +inherit autotools pkgconfig + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "76ea4d8381989919b1d9b91c818fed80" +SRC_URI[sha256sum] = "c8ca50beeddd4b43309df5b698917268303bf176cea58fe4fe53d5bf0e93fac2" + +FILES_${PN}_append = " ${datadir}/bash-completion" diff --git a/recipes-connectivity/libqmi/libqmi_1.20.0.bb b/recipes-connectivity/libqmi/libqmi_1.20.0.bb new file mode 100644 index 0000000..66b56db --- /dev/null +++ b/recipes-connectivity/libqmi/libqmi_1.20.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol" +DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = "glib-2.0" + +inherit autotools pkgconfig + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "797e365521df76b77b067e6317618b41" +SRC_URI[sha256sum] = "21428cd3749c56246565123f707fee51238651a22c60bdc85ebce97388626eb4" + +FILES_${PN}_append = " ${datadir}/bash-completion" + diff --git a/recipes-connectivity/modemmanager/modemmanager/make-compilable.patch b/recipes-connectivity/modemmanager/modemmanager/make-compilable.patch new file mode 100644 index 0000000..4f59d91 --- /dev/null +++ b/recipes-connectivity/modemmanager/modemmanager/make-compilable.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index ce1e2ea..6615c08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -26,7 +26,7 @@ dnl----------------------------------------------------------------------------- + dnl autoconf, automake, libtool initialization + dnl + AC_INIT([ModemManager],[mm_version],[modemmanager-devel@lists.freedesktop.org],[ModemManager]) +-AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability]) ++AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability foreign]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + + AM_MAINTAINER_MODE([enable]) diff --git a/recipes-connectivity/modemmanager/modemmanager_1.8.0.bb b/recipes-connectivity/modemmanager/modemmanager_1.8.0.bb new file mode 100644 index 0000000..c3f9caa --- /dev/null +++ b/recipes-connectivity/modemmanager/modemmanager_1.8.0.bb @@ -0,0 +1,46 @@ +SUMMARY = "ModemManager is a daemon controlling broadband devices/connections" +DESCRIPTION = "ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ModemManager/" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +inherit autotools gettext gtk-doc systemd + +DEPENDS = "glib-2.0 libmbim libqmi polkit libgudev dbus-glib libxslt-native" + +SRC_URI = " \ + git://anongit.freedesktop.org/ModemManager/ModemManager \ + file://make-compilable.patch \ + " + +SRCREV = "223b754fccba28dbb3ce950058a81bd133c8ce86" + +S = "${WORKDIR}/git" + +FILES_${PN} += " \ + ${datadir}/icons \ + ${datadir}/polkit-1 \ + ${datadir}/bash-completion \ + ${libdir}/ModemManager \ + ${systemd_unitdir}/system \ +" + +FILES_${PN}-dev += " \ + ${datadir}/dbus-1 \ + ${libdir}/ModemManager/*.la \ +" + +FILES_${PN}-staticdev += " \ + ${libdir}/ModemManager/*.a \ +" + +FILES_${PN}-dbg += "${libdir}/ModemManager/.debug" + +SYSTEMD_SERVICE_${PN} = "ModemManager.service" + +do_install_append_am335x-nbhw16-fct() { + sed -i 's/ExecStart=.*/ExecStart=\/usr\/sbin\/ModemManager --debug/g' ${D}/lib/systemd/system/ModemManager.service +} From 854147028b3134c2d4c43f1fe04854c7c36235a9 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Thu, 19 Apr 2018 15:42:09 +0200 Subject: [PATCH 29/29] nrhw18 : Add machine config --- conf/machine/armada-385-nrhw18.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 conf/machine/armada-385-nrhw18.conf diff --git a/conf/machine/armada-385-nrhw18.conf b/conf/machine/armada-385-nrhw18.conf new file mode 100644 index 0000000..e4fbdf4 --- /dev/null +++ b/conf/machine/armada-385-nrhw18.conf @@ -0,0 +1,21 @@ +#@TYPE: Machine +#@NAME: NRHW18 based routers like NB1800 +#@DESCRIPTION: Machine configuration for the NRHW18 based routers + +require conf/machine/include/armada.inc + +IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot" +IMAGE_CLASSES += "image_types_uboot" + +SERIAL_CONSOLE = "115200 ttyS1" +MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree" + +KERNEL_DEFCONFIG = "armada-385-nrhw18_defconfig" +KERNEL_DEVICETREE = "armada-385-nrhw18-prod3.dtb" +KERNEL_IMAGETYPE = "zImage" + +PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule" +PV_pn-linux-netmodule = "4.14.0-${SRCPV}" +SRC_URI_pn-linux-netmodule ?= "git://github.com/netmodule/linux.git;protocol=https;branch=nrhw18-4.14" +SRCREV_pn-linux-netmodule ?= "2fb3360ec3cf672c74321e1dbe5c04e59d1ced11" +