Open aiChaoSONG opened 3 years ago
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py instead of chromebrew?
Running everything as root should avoid sudo, at least to get things started.
For python problems, installing miniconda is the solution. It will take care of python version and packages. I will summarize the procedures.
Need package manager, I found chromebrew useful. expect, graphviz pacakage can be installed https://medium.com/@dihuta/chromebrew-crew-chromeos-package-manager-a91e56a3d898
wget -q -O - https://raw.github.com/skycocker/chromebrew/master/install.sh | bash
Need to remount to add executable permission.
sudo mount -o remount exec /home
sudo mount -o remount exec /home/chronos
sudo mount -o remount exec /home/chronos/user
/var/log/kern.log error, I just did touch /var/log/kern.log
but need to be fixed.
sof-logger is not found. Need to look for same version with current SOF binary
/etc/sof is missing, hence sof-{PLATFORM}.ldc is missing. need to find matching file with current SOF binary
for miniconda, there is a shell script installer.
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash "./Miniconda3-latest-Linux-x86_64.sh" -b -p /usr/local/miniconda3
#setup conda env
#export PATH="/usr/local/miniconda3/bin:$PATH"
. /usr/local/miniconda3/etc/profile.d/conda.sh
conda -V
conda init
conda update conda -y
conda create -y -n sof-test python=3.7
conda activate sof-test
pip install -r "$PATH_SOF/requirement.txt"
I'm using CML Chromebook for reference ChromeOS platform, version R89-13729.1.0, dev image. Without ChromeBrew or minicodna, default python is python 3.6.5. get-pip.py works fine! pip version today i have is pip 20.3.3. I'm able to run check-playback.sh
graphviz and numpy installed fine but scipy couldn't be installed due to unknown error.
https://pexpect.readthedocs.io/en/stable/
Pexpect is in the spirit of Don Libes’ Expect, but Pexpect is pure Python. Unlike other Expect-like modules for Python, Pexpect does not require TCL or Expect nor does it require C extensions to be compiled. It should work on any platform that supports the standard Python pty module
How to turn a Chromebook device into SOF (on Zephyr) development with Crouton by @andyross https://github.com/zephyrproject-rtos/zephyr/pull/36528/commits/16456d475f4354005cb656f4d5e975ec5b098696
How to turn a Chromebook device into SOF (on Zephyr) development with Crouton by @andyross zephyrproject-rtos/zephyr@16456d4
This was merged some time ago in https://github.com/zephyrproject-rtos/zephyr/pull/37647
I'm listing Crouton and other Linux-on-Chromebooks options in new https://github.com/thesofproject/sof-docs/pull/379
Can we close this @aiChaoSONG ?
If download sof-test to /usr/local, and install dependencies with chromebrew, sof-test can run on ChromeOS
I just looked at a recent ChromeOS image developer image (less than a few weeks old) to collect some "datapoints" relevant for sof-test and it looks like none of these has changed in the last few years:
No journalctl
, still the same old rsyslogd
. EDIT: except for a short time around 2020, see below. So in sof-test calls to journalctl -k
would have to be replaced by something like grep ' kernel: ' /var/log/messages
with the huge caveat that journalctl --since test_start_time
and journalctl --boot 0
would have to be re-implemented. /var/log/messages
has not just the current boot but ALL boots until the last time /var/log/messages
was log-rotated! In the past we had some awkard / buggy DMESG_LOG_START_LINE
but it was joyfully deleted when moving to journalctl
(see 18c7e6155053b and others). Time warps could also become much more "fun" https://github.com/thesofproject/sof-test/discussions/908
No systemctl
, still using upstart
that Ubuntu sponsored but abandoned. From https://upstart.ubuntu.com/
Upstart Project is in maintenance mode only. No new features are being developed and the general advice would be to move over to another minimal init system or systemd.
cras
is still the ALSA daemon
As mentioned by @andyross in https://github.com/zephyrproject-rtos/zephyr/pull/50424#issuecomment-1253150425, I can confirm python
is present but still stuck to obsolete version 3.6
cc:
sudo journalctl
for chrome compatibility https://github.com/thesofproject/sof-test/commit/76e90c35778c6f ??An intern from Chrome team asked for help to migrate sof-test to chrome OS, I think it is done, but unfortunately she doesn't upstream anything. there is no journalctl on chrome, but there is an alternative tool craslog
, which provide similar options to journalctl.
Thanks @aiChaoSONG for pointing me to http://crbug.com/1066706 "removing journald" and other useful links. Apparently ChromeOS used journalctl for a short timespan, only 1 or 2 years around 2020 and then went back to .log text files.
It's not easy to find information because the design documents like go/improve-cros-logging seem closed-source but looking at some source code and git logs it seems chromeOS now provides a croslog
wrapper on top of rsyslogd
that provides features that were lost when removing journalctl like for instance journalctl --boot
and the ability to interleave / multiplex logs from different rsyslogd text files. This croslog
front-end looks like it also provides (provided?) journalctl compatibility during the transition.
tl;dr: sof-test should very likely rely on croslog
when run on ChromeOS. @aiChaoSONG I guess craslog
was a typo for croslog
?
https://chromium.googlesource.com/chromiumos/third_party/autotest/+/b1ec0cb83b2feb1b https://chromium.googlesource.com/chromiumos/platform2/+/3417bf876ad9c88f79c3ddfe569c3fbb32616896 https://docs.google.com/document/d/1xbC-A4zgEIzaCU6SS-XI7QiF3XjEQB5_4uw2XCqcw9M/edit#heading=h.qapfgw2vziay
I was not aware of this ticket (but now I am, thanks @marc-hb ). I did a test with R106 based image and results I got: Tested sof-test today on recent CrOS and...
Seems to be aligned to what has been already discussed on this ticket. The rtcwake issue might require more study, whether this is a configuration issue specific to my board/kernel, or something that will be hit more generally on CrOS.
I can make sof-test/test-case/check-playback.sh run on ChromeOS, but there are some issues. terminal.txt
How dependencies are installed?