title: How to set kernel parameters when building a custom android ROM?
body: <p>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 <code>mka bacon -j8</code> and am getting this error:</p>
  
  <pre><code>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."
  </code></pre>
  
  <p>I can see that the kernel parameter NR_CPUS is being set to an unsupported value somewhere. Where could this be set?</p>
  
  <p>KConfig NR_CPUS section:</p>
  
  <pre><code>config NR_CPUS
          int "Maximum number of CPUs (2-4096)"
          range 2 4096
          # These have to remain sorted largest to smallest
          default "64"
  </code></pre>