Repository navigation
ambarella-osdrv-s3l: log the microcode version at boot - #2786
Conversation
PR Summary by QodoLog the Ambarella S3L microcode version at boot
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Boot log change has no hardware test
|
|
Booted it on the IP4M-1026E: the version line is there. How it was run. Netbooted, so the flash wasn't touched. The image is master Serial console during boot: After that, the DSP entered modes 0 and 1 and stream 0 came up (2688×1512 H.264), as on #2782. One thing about where the line ends up. On this image it isn't in |
load_ambarella sent load_ucode's output to /dev/null, so nothing recorded which microcode a camera booted with. Cameras in the field run many builds of it, and reading the version back took a separate tool on the IP4M-1026E (#2782).
7f1ac11 to
602cf22
Compare
Problem
load_ambarellasendsload_ucode's output to/dev/null, so a boot log doesn't say which microcode the DSP got. On the IP4M-1026E, reading it back took a separate tool (#2782, which suggested this change), and #2767 lists seven builds of this microcode in the field.Change
On success,
load_ambarellalogs theucode versionline throughlog_vendor. The per-file lines stay out of the log. A failure is handled as before:load_ucode's own error reaches stderr, andload_ucode failedis logged.Hardware tested on
Ambarella S3L, Amcrest IP4M-1026E, run by @DeathCamel58, not by me: output. The console shows
ambarella: ucode version 2018/10/28 284712.282649. That run was a warm netboot of the first version of this PR. The later fix below only changes the case where no version line comes back, and it hasn't run on a camera.Evidence
QEMU, on qemu-bench's
s3lmachine, withs3l_lite's kernel, the realdsp.koand the shipped microcode. QEMU doesn't model the DSP.Before (the image built for #2782; this is the last 8 lines of the script's output, and
rcistail's):After:
After, with
orcme.binremoved:After, with a stand-in
load_ucodethat exits 0 and prints no version line, which is what a failed version ioctl does. Without the fix this logged a blank line (Qodo's finding):STRICT=1 test_shell_parse.shandSTRICT=1 test_strip_shell_comments.shpass.ci-matrix.py --stdinnarrows this tos3l_lite.Known limit
The line can scroll out of
logread: on the IP4M-1026E the driver'skern.debugdumps filled the 64 KB syslog ring within 40 seconds of boot. The console keeps it. That's outside this PR.Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from source