I am experimenting weird behaviors with a SoM.
For some silly reasons I found the DDR clock set to 900Mhz while it should be <700Mhz. I cannot fix it at the moment because I don't have access to the firmware file (u-boot) and I am going to fix it next week.
Even with the wrong DDR clock speed, the SoM appears *somehow* stable if you do not stress the ram, otherwise the kernel crashes, and this is really something you wouldn't like to see.
It seems that some issues happen under heavy load, which is difficult to emulate on u-boot, so to expose the issue I am using cmake -J8 running eight c++ in parallel to compile Clang
Clang is really an heavy job for the SoM, and I am doing it only for testing reasons, I mean, usually I cross-compile this heavy stuff on a x86 machine.
It seems recent gcc versions (>=v10) take 1 GB to 1.5 GB of RAM per job, and if the system has the 8 logical CPUs, but only 512MB RAM (which is insane, but that's the SoM I have here), the MAKEOPTS value should be lowered, this is so that the system has RAM to run the basics as well as compile without hitting swap very often slowing things down.
At the moment the kernel has 2Gbyte of swap allocated on an attached USB HDD, and the weird thing is:
- with Gcc-v10, the kernel crashes ... claiming the DRAM has some issues (1)
- with Gcc-v8, the kernel doesn't crashes
- with Gcc-v7, the kernel doesn't crashes
And I am perplexed about this
(1) which is correct, the DRAM clock is wrong, even if it passes all the memtests(2) on u-boot
(2) on u-boot these tests are not as stressing tests as with compiling clang with gcc v10 under Linux