Merge branch 'jethro' into fct
Conflicts: conf/machine/am335x-nbhw16.conf conf/machine/am335x-nrhw20.conf recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb recipes-connectivity/tibluetooth/tibluetooth.bb recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service recipes-core/sw-update/sw-update/am335x-nrhw20/sw_update_config
This commit is contained in:
commit
d1170bca5b
|
|
@ -18,8 +18,8 @@ KERNEL_DEVICETREE = "am335x-nbhw16.dtb \
|
|||
"
|
||||
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 ?= "6b0c567a305f65601d5bf32768a0a1080b1db051"
|
||||
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 = "cc8b47ba4afeb67ce82d98fb5c36c321ade8270f"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ KERNEL_IMAGETYPE = "zImage"
|
|||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
|
||||
PV_pn-linux-netmodule = "4.14.14-${SRCPV}"
|
||||
SRC_URI_pn-linux-netmodule ?= "git://git.netmodule.intranet/nmrouter/linux.git;protocol=https;branch=nrhw20-4.14"
|
||||
SRC_URI_pn-linux-netmodule ?= "git://github.com/netmodule/linux.git;protocol=https;branch=nrhw20-4.14"
|
||||
SRCREV_pn-linux-netmodule ?= "bc588eccf4d375d6a5c4fc1ff2584e4e7d550b65"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,16 +3,24 @@ UBOOT_MACHINE = "am335x_nbhw16_defconfig"
|
|||
|
||||
require u-boot-nm.inc
|
||||
|
||||
SRC_URI = "git://gitolite@git/usr/se/u-boot;protocol=ssh;branch=nbhw16-2016.04"
|
||||
# Be aware github/netmodule git
|
||||
SRC_URI = "git://github.com/netmodule/u-boot.git;protocol=https;branch=nbhw16-2016.04"
|
||||
|
||||
SRCREV ?= "${AUTOREV}"
|
||||
# Should be updated when a new U-Boot Version is available
|
||||
SRCREV ?= "a6f157c6dbd048b452c7e2640215c55be658780c"
|
||||
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}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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://gitolite@git/usr/se/u-boot;protocol=ssh;branch=nbhw16-2016.04"
|
||||
|
||||
SRCREV ?= "${AUTOREV}"
|
||||
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
|
||||
}
|
||||
SRCREV = "0b985705d558caceeb968b234af27cfc536ef019"
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
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
|
||||
|
||||
|
|
@ -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 ?= " \
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -0,0 +1 @@
|
|||
FILESEXTRAPATHS_prepend_am335x-nrhw20 := "${THISDIR}/${PN}:"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Attach ti bluetooth
|
||||
Before=bluetooth
|
||||
Before=bluetooth.target
|
||||
Requires=bluetooth.target
|
||||
|
||||
[Service]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Attach ti bluetooth
|
||||
Before=bluetooth
|
||||
Before=bluetooth.target
|
||||
Requires=bluetooth.target
|
||||
|
||||
[Service]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,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 \
|
||||
|
|
|
|||
|
|
@ -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"}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue