CONFIG_TARGET_xxx : is there an easier way?

I have a target for a specific x86_64 variant, originally made years ago for 15.05 (and still running to this day). I'm now updating my build for 19.07, which is a non-trivial task as it's highly customized.

Among other things, my target requires quite a few kernel config changes (I see that some of the changes I originally made have found their way into the default x86_64 kernel, but not all of them by any means). Hence why it is a subtarget of x86 rather than just a profile of x86_64.

Now, the problem comes because several of the base system makefiles, for example package/kernel/linux/modules/crypto.mk and package/firmware/intel-microcode/Makefile, specifically check CONFIG_TARGET_x86_64 to do conditional compilation or have a DEPENDS line with TARGET_x86_64 in it.

Which of course is not set in my case, since x86_64 is a subtarget of x86 and the parent of my subtarget is x86, not x86_64

As a result, I need to go and change all of these definitions in various places to add extra checks.

ifdef CONFIG_TARGET_x86_64

This is not a very clean way of doing things.

Is there a way in the target.mk to set the CONFIG_TARGET_x86_64 variable explicitly as well as the one for my subtarget that gets set by the build system?

And if so, is this likely to have any additional ramifications when it comes to kernel compilation (for example, trying to picking up the kernel config from both of these subtargets?

1 Like

No, there is no such way.

1 Like

pm me your email and i'll send you something that might assist.

1 Like