How to enable MIPS FPU Emulator when compiling?

I used to enable MIPS FPU Emulator in Kernel options on MT7621 Devices, but recently I tried to do the same thing, I found that there is no longer enable MIPS FPU Emulator in the kernel options(Kernel 5.4.80), could anyone tell me how to solve this please? thanks

I'm not sure if it's correct, try the following:

  1. do make menuconfig
  2. echo "CONFIG_KERNEL_MIPS_FP_SUPPORT=y" >> .config

The description is not set in config KERNEL_MIPS_FP_SUPPORT. As a result, it may not be displayed in menuconfig.

old:

I tried setting the description at bool line and it was displayed in menuconfig.

Thanks for the reply, I've tried to add the line in the .config and do the make menuconfig, still not working

I tried to compile for testing, CONFIG_KERNEL_MIPS_FP_SUPPORT=y must be added to .config after doing menuconfig and do not open menuconfig after that.

make menuconfig
# (finish and close menuconfig)
echo "CONFIG_KERNEL_MIPS_FP_SUPPORT=y" >> .config
# (do not open menuconfig)
make # start compiling OpenWrt

The first question should have been: Why do you need this? This emulation is much slower than the soft-float support from the toolchain.

This is critical option, please do not remove it.

One important example: syncthing binaries (*) require FPU. I'm and my friends are using lots of mips devices as SAN and syncthing.

*) a lot of golang software require it. It works perfectly fine with FPU emu, as it's used only for some operations and mtk7621 does not have HW.

Just to note - even MIPS cores with hardware FPU need the emulator to work around an FPU errata...

The challenge here is that OpenWRT disabled the FPU emulator for small memory targets (16/4) as it does take up a bit of RAM...