Post Go back to editing

Yocto Linux build version 5.0.0 on ADSP-SC594 EZKIT - system freezes

Category: Software
Product Number: ADSP-SC594
Software Version: 5.0.0

Hi community,

I was very happy to run the process to build a Yocto Linux version 5.0.0 to be run on the SC594 EZKIT these days. In particular, the description how to build, release and install the system was really very good, thank you for that!

Unfortunately, the system does not really work in a stable way: once booted from SPI, the system freezes after a while. I found that it freezes within the time of a few seconds whenever a GBit cable is connected to the ethernet port. If no cable is connected, I have observed that the system freezes after some minutes, e.g., approximately 30 minutes.  

I also ran the system in nfsboot mode. Unfortunately, then, the system freezes after boot as well.

In the next step I built the older Yocto Linux version 3.1.2. With this version, the nfsboot on the EZKIT seems to work in a stable way. However, when trying to run spiboot, an error occurs whenever reading the kernel from spi memory in uboot with an error message reporting a wrong image format for bootm. I was able to work around this problem by using the stage1-boot.ldr and stage2-boot.ldr files from the version 5.0.0 build instead of the versions from 3.1.2 in combination with the kernel and the jff2 file from version 3.1.2.
Principally the boot process worked fine but later, unfortunately, error messages are shown indicating that the jff2 file system is broken (missing folder /var/run).

I am using a recent ADSP-SC594-EZKIT with SOM Rev C and EZKIT baseboard revision D.

Is there any kind of workaround to have version 5.0.0 running from SPI flash in a stable way?

Thank you and best regards

Hauke

Parents Reply Children
  • Hi , very good work, thank you very much for that fix.

    I wonder: I tried to directly change the yocto files to include your version of the kernel. However, the rev id in the branch of the "meta-adi" layer currently points to version "2d5498652adadf55189c4f1b2d591b8db49e59be" for the linux recipe - which is an older version of the adsp-main-6.12 branch. When I switch that to a current version - e.g., commit id "530b3a667811cc9bbac47f7127996694b38cd1e5" - of branch adsp-main-6.12 in the linux recipe the Yocto build fails since the patches located in the "meta-adi" Yocto layer can not be employed properly. I am using the "main" branch of the "meta-adi" layer, is there another branch I could checkout to obtain the latest Yocto patches and allow to directly involve your patch?

  • Hi, yes as its PR its now located at branch adsp-main-6.12-sc594-ethernet-dma 
    When it will be approved and merged it will be located at adsp-main-6.12

  • Perfect, thank you very much - PR is done and closed.

    However, still there is the problem I reported earlier: 

    In order to build the system with your latest patch, I need to modify the file "meta-adi/meta-adi-adsp-sc5xx/recipes-kernel/linux/linux-adi_%.bb" in the meta-adi Yocto layer to checkout the latest SRCREV:


    That is the revision which was born today due to the PR.

    When doing this, unfortunately, the Yocto build fails:



    This makes absolutely sense since between the old revision "2d5498.." and the new version "605ec077..", the *.dtsi file has been changed according to the commit history in Github. In order to fix this, it seems that an update of the meta-adi layer is also required to update the patch files.

  • Have cloned the repo and applied patch without issue. Build Yocto-5.0.0 with setting for CRR_REV "A" and "D" couldn't reproduce observed issue. 

  • managed to reproduce, Im using latest dev sources, and its not issue there. Add the proposed changes as patch from PR https://patch-diff.githubusercontent.com/raw/analogdevicesinc/linux/pull/2966.patch and use release commit hash. This fix will go most likely into release 5.0.x

  • I have checked out version 5.0.0 from scratch and applied a few handwritten patches. Now it seems that I can build kernel 6.12. in the latest version. The problem was related mostly to patches in meta-adi layer that fix issues in the older kernel versions that are integrated in 6.12 anyway and do not need to be fixed anymore. Hence, removing the patches solved most issues.

    Running the new kernel in a quick test seemed to be stable nowThumbsup. I will test that more intensively later.

    One thing I quickly saw was that the mechanisms to load DSP firmware seems to have gone. In version 3.1.2 with the older kernel, there were entries in the file system/sys/class/remoteproc/remoteproc0 and /sys/class/remoteproc/remoteproc1. In version 5.0.0, the folder /sys/class/remoteproc is empty. Does this mechanism require another kernel config parameter in version 5.0.0 or does it work somehow in a different way?

    Thank you and best regards 

  • Have verified on my side. Let me look into that. 

  • Perfect, thank you very much for your efforts.

    I ran the kernel 6.12 for a longer time today. It seems principally stable - I could not observe any instable crashes or freezes. That is very good Thumbsup.

    However, the console output behavior is still a little annoying - it seems to be stuttering. E.g., when running dmesg, the console output stalls after a few lines. I then need to push return to obtain the next bunch of lines. Also, a "top" only fills a few lines.

    I then found that the serial console stuttering behavior seems to have a longer history with the latest kernel and tried many different approaches to fix it. Nothing could improve the console output. The last test was to add option "printk.threaded=0" and "printk.synchronous=1" in the boot args in uboot - with no change of behavior.

    This behavior was not observed in the 5.15 kernel. Is there a known workaround I could try to fix the behavior for the kernel 6.12?

  • Here open PR that fixes that, https://github.com/analogdevicesinc/linux/pull/2980 will be included in release 5.0.1. There is missing config flag in defconfig for sc594, and when moved from kernel 5.15 to 6.12 remoteporc Kconfig missing 32bit platform configuration flag for 32 bit ADSP's

  • Hi  
    thank you for taking care of this. I am looking forward to testing release 5.0.1 once it will be available!
    Best regards