2

I am trying to build a custom ROM on my own. I got hold of the kernel source, android code (LineageOS), device tree and the vendor files. I do a mka bacon -j8 and am getting this error:

In file included from /home/fury/android/lineage/kernel/xiaomi/platina/arch/arm64/kernel/perf_trace_counters.c:16:0:
/home/fury/android/lineage/kernel/xiaomi/platina/include/trace/events/sched.h:875:2: error: #error "Unsupported NR_CPUS for lb tracepoint."
 #error "Unsupported NR_CPUS for lb tracepoint."

I can see that the kernel parameter NR_CPUS is being set to an unsupported value somewhere. Where could this be set?

KConfig NR_CPUS section:

config NR_CPUS
        int "Maximum number of CPUs (2-4096)"
        range 2 4096
        # These have to remain sorted largest to smallest
        default "64"
daltonfury42
  • 3,103
  • 2
  • 30
  • 47

1 Answers1

1

To answer the question, the kernel parameters are set in the config files present in

kernel/<vendor>/<device>/arch/arm64/configs/ 

folder.

In my case, the parameter is set in the file platina_user_defconfig in the above folder, and then this filename is to be specified in the BoardConfig.mk file present in the device tree:

$ cat device/xiaomi/platina/BoardConfig.mk | grep TARGET_KERNEL_CONFIG
TARGET_KERNEL_CONFIG := platina_user_defconfig

I was specifying the wrong filename as TARGET_KERNEL_CONFIG, hence I got the error.

daltonfury42
  • 3,103
  • 2
  • 30
  • 47