[Buildroot] [PATCH v2] package/environment-setup: add variable KERNEL_DIR alongside KERNELDIR

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Feb 12 21:59:53 UTC 2024


Hello Nayab,

On Wed, 31 Jan 2024 23:48:28 +0530
Nayab Sayed via buildroot <buildroot at buildroot.org> wrote:

> Update host environment setup helper script to incorporate the variable
> KENREL_DIR alongside the existing KERNELDIR. This adjustment ensures
> consistency, as some projects utilize KERNELDIR while others use KERNEL_DIR.
> 
> Signed-off-by: Nayab Sayed <nayabbasha.sayed at microchip.com>

Thanks for this new iteration, but on my side, I'm tempted to reject
this patch, and actually to remove the support for KERNELDIR as well.

Indeed, even Angelo, who added the environment-setup script was not
able to provide a solid reason for exporting KERNELDIR in the first
place. I don't think there is any standard, or somewhat standard
variable to point to the Linux kernel source directory.

I'm fine with environment-setup exposing CC, LD, CFLAGS, LDFLAGS, or
even CROSS_COMPILE as these are reasonably standardized by various
build systems. But KERNELDIR or KERNEL_DIR are not, and the simple fact
that both would be needed/useful is a clear hint of that. The whole
thing I didn't like in the first place with environment-setup is the
fact that it exports a mixed bag of somewhat random environment
variables, and exposing both KERNELDIR and KERNEL_DIR clearly goes
further into this direction in my opinion.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list