Closed yoyojacky closed 1 day ago
@yoyojacky , did you build the linux with an extern riscv cross toolchain not the buildroot toolchain?
If not, do you have run into the below situation? Especially when you had build the whole sdk, and then you want to rebuild the linux for example:
rm -rf work/linux
make -j8
It will prompt like below:
make[2]: Entering directory '/var/lib/jenkins/workspace/VF2_515_Branch_SDK_Release/visionfive/work/linux'
SYNC include/config/auto.conf.cmd
GEN Makefile
*
* Restart config...
*
* GCC plugins
*
GCC plugins (GCC_PLUGINS) [Y/n/?] (NEW)
Compute the cyclomatic complexity of a function (GCC_PLUGIN_CYC_COMPLEXITY) [N/y/?] (NEW)
Generate some entropy during boot and runtime (GCC_PLUGIN_LATENT_ENTROPY) [N/y/?] (NEW)
Randomize layout of sensitive kernel structures (GCC_PLUGIN_RANDSTRUCT) [N/y/?] (NEW)
*
* Memory initialization
*
Initialize kernel stack variables at function entry
> 1. no automatic stack variable initialization (weakest) (INIT_STACK_NONE)
2. zero-init structs marked for userspace (weak) (GCC_PLUGIN_STRUCTLEAK_USER) (NEW)
3. zero-init structs passed by reference (strong) (GCC_PLUGIN_STRUCTLEAK_BYREF) (NEW)
4. zero-init everything passed by reference (very strong) (GCC_PLUGIN_STRUCTLEAK_BYREF_ALL) (NEW)
choice[1-4?]:
Enable heap memory zeroing on allocation by default (INIT_ON_ALLOC_DEFAULT_ON) [N/y/?] n
Enable heap memory zeroing on free by default (INIT_ON_FREE_DEFAULT_ON) [N/y/?] n
Normally we should select the default config. If you select the CONFIG_GCC_PLUGIN_RANDSTRUCT to Y, then will reproduce your problem
BTW, if you don't want the above prompt when building the linux, then you could run the below
rm -rf work/linux
rm -rf work/u-boot
make -j8
OK, Thanks, I works for me, I have selected the CONFIG_GCC_PLUGIN_RANDSTRUCT
by mistake, right now, everything is ok.. thanks for your tips.
when it compiling to drivers/gpu/drm/img/img-rogue/services/server/common/physmem_lma.o, it will crash and raise an error message:
How can I solve this problem ?