Go to file
Liam Girdwood b5eb15516c
Merge pull request #116 from bkokoszx/logger-rejecting-trace-address
logger: refinement handling invalid trace address
2018-10-26 11:35:57 +01:00
eqctl eqctl: Add check for calloc() success and return 0 in exit 2018-10-15 19:20:26 +03:00
kmod_scripts kmod_scripts: look for timeout errors and stop loops 2018-08-07 20:55:19 -05:00
rimage/keys rimage: move rimage to sof firmware repo 2018-02-13 20:44:03 +00:00
rmbox logger: refinement handling invalid trace address 2018-10-26 10:06:14 +02:00
test Test: Audio: Fix paths in SRC host version testbench 2018-10-23 14:52:08 +03:00
topology Merge pull request #114 from plbossart/fix/ipc-alignment 2018-10-24 14:03:04 +01:00
tune Merge pull request #107 from singalsu/eq_iir_fix_assign_integer_type 2018-10-15 12:40:14 +01:00
.gitignore topology: test: Add simple component test generator. 2017-12-13 21:08:57 +00:00
.travis.yml ci: travis: enable travis ci for SOFT 2018-08-09 17:19:05 +08:00
Makefile.am tests: add qa tests and rearrange other tests under one directory 2018-10-12 08:12:49 +03:00
README readme: upgrade readme with sof-logger instruction 2018-10-15 15:13:07 +02:00
autogen.sh rimage: Initial import of rimage firmware tool. 2016-10-07 10:48:49 +01:00
configure.ac tests: add qa tests and rearrange other tests under one directory 2018-10-12 08:12:49 +03:00

README

Sound Open Firmware Tools
=========================

This is a collection of open source tools used to develop open source audio
DSP firmwares for ALSA.

Building and Installing
=======================

./autogen.sh (only needed first time)
./configure
make
make install


rimage
======

rimage is used to convert ELF executable firmware files to the firmware file
formats used by the kernel drivers.

e.g.

rimage -i elf_file -o kernel_file -m machine

rimage can also convert kernel firmware formats to flat binaries formats to
assist in debugging :-

e.g. convert to flat binary, then ELF then dissasemble

rimage -i /lib/firmware/intel/reef-byt.ri -o image.bin -b -m byt

xtensa-byt-elf-objcopy -I binary -O elf32-xtensa-le -B xtensa image.bin image.bin.elf

xtensa-byt-elf-objdump -D image.bin.elf > image.dis.txt


sof-logger
======

sof-logger is used to print logs delivered from FW dma_trace mechanism, by searching log
entries in *.ldc file generated by rimage. 

Every entry declared in FW is placed in elf output file (e.g. sof-apl) in 
.static_log_entries section in a form of struct defined in sof/src/include/sof/trace.h
in sof fw repo.

*.ldc file contains snd_sof_logs_header (defined in rmbox/logger_convert.c) 
following by .static_log_entries section incorporated from FW elf file (e.g. sof-apl).
snd_sof_logs_header contains basic information about .static_log_entries section
like base_address and data_length.

sof-logger works by reading entry parameters value and entries addresses from FW
dma_trace mechanism and searching suitable entry in *.ldc file by its address.

Usage sof-logger <option(s)> <file(s)>
			Display mailbox contents
-h			help
-l *.ldc_file		Specify the *.ldc file
-i in_file		Get traces from in_file, instead of the default 
			"/sys/kernel/debug/sof/etrace"
-o out_file		Specify the output file, instead of default stdout
-t			Get traces from "/sys/kernel/debug/sof/trace", instead 
			of the default "/sys/kernel/debug/sof/etrace"
-p			Get traces from stdin, instead of the default 
			"/sys/kernel/debug/sof/etrace"
-c			Set timestamp clock in MHz
-s			Take a snapshot of state


Examples:

- Get traces from "/sys/kernel/debug/sof/etrace" file and prints logs to stdout

  $ sof-logger -l ldc_file

- Get traces from "/sys/kernel/debug/sof/etrace" file and prints logs to
  out_file file

  $ sof-logger -l ldc_file -o out_file

- Get traces from "/sys/kernel/debug/sof/trace" file and prints logs to stdout

  $ sof-logger -l ldc_file -t

- Get traces from "/sys/kernel/debug/sof/trace" file and prints logs to 
  out_file file

  $ sof-logger -l ldc_file -t -o out_file

- Get traces from stdin and prints logs to stdout

  $ sof-logger -l ldc_file -p

- Get traces from stdin and prints logs to out_file file

  $ sof-logger -l ldc_file -p -o out_file

- Get traces from trace_dump file and prints logs to stdout

  $ sof-logger -l ldc_file -i trace_dump

- Get traces from trace_dump file and prints logs to out_file file

  $ sof-logger -l ldc_file -i trace_dump -o out_file

- c flag is intented for defining clock value (in MHz) used to format log 
  timestamps. By default clock value is set to 19.2 (MHz). Below example
  set clock value to 19.9 (MHz).

  $ sof-logger -l ldc_file -i trace_dump -o out_file -c 19.9


tests
=====

To generate all test configuration files:

make tests