Skip to content

Commit 4c516c2

Browse files
committed
Add tools-v2.11 binaries
Generated with Intel SOF community build, identification "Build #5357". Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 72d761e commit 4c516c2

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env python3
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
#
4+
# Copyright (c) 2022, Intel Corporation. All rights reserved.
5+
6+
#pylint:disable=mixed-indentation
7+
8+
# Tool to stream data from Linux SOF driver "mtrace" debugfs
9+
# interface to standard output. Plain "cat" is not sufficient
10+
# as each read() syscall returns log data with a 32bit binary
11+
# header, containing the payload length.
12+
13+
import struct
14+
import os
15+
import sys
16+
17+
READ_BUFFER = 16384
18+
MTRACE_FILE = "/sys/kernel/debug/sof/mtrace/core0"
19+
20+
fd = os.open(MTRACE_FILE, os.O_RDONLY)
21+
while fd >= 0:
22+
# direct unbuffered os.read() must be used to comply with
23+
# debugfs protocol used. each non-zero read will return
24+
# a buffer containing a 32bit header and a payload
25+
read_bytes = os.read(fd, READ_BUFFER)
26+
27+
# handle end-of-file
28+
if len(read_bytes) == 0:
29+
continue
30+
31+
if len(read_bytes) <= 4:
32+
continue
33+
34+
header = struct.unpack('I', read_bytes[0:4])
35+
data_len = header[0]
36+
data = read_bytes[4:4+data_len]
37+
38+
os.write(sys.stdout.fileno(), data)

v2.11.x/tools-v2.11/sof-ctl

35.8 KB
Binary file not shown.

v2.11.x/tools-v2.11/sof-probes

30.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)