The source file mcerr.c is in the tegra/mc folder and this source is built or not depending on the configuration NV_TEGRA_MC. See this line in the tegra/Makefile
obj-$(CONFIG_NV_TEGRA_MC) += mc/
If this configuration is not set in your build, you will not see this error. Because I need this config, so I have this problem, I guess.
You can find who introduced this variable to mcerr.c via the git commit history info. If you can ask the engineer who made this commit, the answer would be quick.
crash> struct of_device_id __mcerr_of_table
struct of_device_id {
name = “\002\001\000\000$\000\000\000\v\002\000\000\000\000\000\000\064\334\001\000\000\000\000\000\002\001\000\000$\000\000”,
type = “y\v\001\000\000\000\000\000A\334\001\000\000\000\000\000\002\001\000\000$\000\000\000\355\003\000\000\000\000\000”,
compatible = “N\334\001\000\000\000\000\000\002\001\000\000$\000\000\000Jt\001\000\000\000\000\000a\334\001\000\000\000\000\000\002\001\000\000$\000\000\000@\245\000\000\000\000\000\000{\334\001\000\000\000\000\000\002\001\000\000$\000\000\000>\003\000\000\000\000\000\000\210\334\001\000\000\000\000\000\002\001\000\000$\000\000\000%,\000\000\000\000\000\000\225\334\001\000\000\000\000\000\002\001\000\000$\000\000\000\067Z\000\000\000\000\000\000\242\334\001\000\000\000\000”,
data = 0x2400000102
}
However, the data in this structure above doesn’t look like valid. However, the system is running ok. If I dumped out more items with “struct of_device_id __mcerr_of_table -c5”, it appeared none of the five look like valid structure.
So, the variable __mcerr_of_table should be defined somewhere. And my recent build missed that module. But I don’t know which one is.
My question remains where __mcerr_of_table is defined in the source tree.
can you share the full workflow for how to reproduce this error? Also the version of the compiler toolchain you are using. We can successfully generate object files under drivers/platform/tegra/mc after enabling CONFIG_NV_TEGRA_MC=y in the config file.
Thanks for the response. I actually built on an Orin. So I didn’t use the Nvidia toolchain. I ever built successfully many time before. But after some changes including configurations, I started to see this problem. However, if I cross-compile the bits on another x86 machine with the toolchain I downloaded from the jetson website, I could see the same problem.
Actually, my question is about the variable __mcerr_of_table. I cannot find the place it is defined. Because you have the git repo of the source tree which I don’t have, so it should be quite easy for you to find out the commit-hash which introduced this code. You can do this way:
Yeah, if you do need it, I will check our codebase and communicate with the guy who wrote the code.
But I don’t think it’s a problem as I also did it on the public BSP freshly downloaded from our website, not on our codebase. Can you elaborate under which circumstances do you fail to build the code (Jetson/x86 PC, toolchain version, L4T version, etc.)
Thanks Dave.
As said, the problem is persistently reproducible in my build environment which is Jetson ORIN without toolchain + L4T 35.1. If I did cross-compile on x86 with toolchain, it was the same.
This might be caused by the bunch of configuration changes. But all I need to know is where the variable __mcerr_of_table is defined in the L4T-35.1 source tree so I can include it in.
I’ve checked it with our developer, and will update you given any progress on it. I actually searched for it, and it’s only declared as an extern variable, but not defined anywhere else.
Also, are you using the recommend toolchain version on x86 cross compiling? Can you give the latest 35.3.1 a try, which I managed to build successfully?