Enabling kernel config options

Is there any way to enable kernel config options disabled or not set on my branched kernel built through the OBS?

https://www.reddit.com/r/openSUSE/comments/72wz1l/best_way_to_compile_a_kernel_with_custom_options/

Oh, thanks. I just found out about *config.addon *too, can’t I use that to append stuff to the original config without having to fully replace it?

Yes, you can.

Not sure what i’m doing wrong, it gives me this error during build:

   35s] Using .config as base
   35s] Merging /home/abuild/rpmbuild/BUILD/kernel-default-5.8.0/config.addon/x86_64/default
   35s] Value of CONFIG_ANDROID is redefined by fragment /home/abuild/rpmbuild/BUILD/kernel-default-5.8.0/config.addon/x86_64/default:
   35s] Previous value: # CONFIG_ANDROID is not set
   35s] New value: CONFIG_ANDROID=y
   35s] 
   35s] #
   35s] # merged configuration written to .config (needs make)
   35s] #
   35s] + CONFIG_SUSE_KERNEL_RELEASED='--disable CONFIG_SUSE_KERNEL_RELEASED'
   35s] + echo home:alphard:branches:Kernel:Factory-acs
   35s] + egrep -qx -f /home/abuild/rpmbuild/SOURCES/release-projects
   35s] + ../scripts/config --set-str CONFIG_LOCALVERSION -1-default --enable CONFIG_SUSE_KERNEL --disable CONFIG_SUSE_KERNEL_RELEASED --disable CONFIG_DEBUG_INFO
(...)
   37s] Changes after running `make oldconfig':
   37s] -# CONFIG_DEBUG_INFO_COMPRESSED is not set
   37s] -# CONFIG_DEBUG_INFO_REDUCED is not set
   37s] -# CONFIG_DEBUG_INFO_SPLIT is not set
   37s] -# CONFIG_GDB_SCRIPTS is not set
   37s] +# CONFIG_ION is not set
   37s] -# CONFIG_SUSE_KERNEL_RELEASED is not set
   37s] -CONFIG_DEBUG_INFO_BTF=y
   37s] -CONFIG_DEBUG_INFO_DWARF4=y
   37s] -CONFIG_ION=n
   37s] 
   37s] error: Bad exit status from /var/tmp/rpm-tmp.z2Loil (%prep)
   37s] 
   37s] 
   37s] RPM build errors:
   37s]     line 158: It's not recommended to have unversioned Obsoletes: Obsoletes:      microcode_ctl
   37s]     extra tokens at the end of %endif directive in line 1582:  %endif # %CONFIG_SUSE_KERNEL_SUPPORTED
   37s] 
   37s]     extra tokens at the end of %endif directive in line 1583:  %endif # %CONFIG_MODULES
   37s] 
   37s]     Bad exit status from /var/tmp/rpm-tmp.z2Loil (%prep)

This is the relevant part I believe, do I need to post the full build log?
I’m trying to enable ashmem and binder for anbox, here is my custom *config.addon/x86_64/{debug,default,kvmsmall,syzkaller,vanilla}

CONFIG_ASHMEM=y
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
CONFIG_ANDROID_BINDER_IPC_SELFTEST=y
CONFIG_ION=n

Link to your OBS project would be better.

Here it is: Welcome - openSUSE Build Service

It apparently fails due to CONFIG_ION=n which is interpreted as “change” instead of “addition”. Why do you need it? CONFIG_ION already defaults to “n”.

I’ve reviewed the options and turns out some things were wrong, now it compiles nicely.
Thanks!