crosstool-ng / crosstool-ng

A versatile (cross-)toolchain generator.
Other
2.13k stars 664 forks source link

LINUX_VERSION for vendor/custom repository #2032

Open modbw opened 1 year ago

modbw commented 1 year ago

The kconfig variable LINUX_VERSION can be selected from a list. If I have a vendor repository (in my case e.g. a 5.15.71 based kernel from NXP) I can't specify this exakt version in LINUX_VERSION but I am forced to select 5.15.118.

From what I have seen the only place where the selected LINUX_VERSION is used is in downloading the kernel when the source of the kernel is kernel.org. Maybe it makes sense to only show this option when kernel sources are fetched directly from kernel.org

QBos07 commented 1 year ago

Makes sens

cpackham commented 1 year ago

Once upon a time glibc cared a bit about the kernel version. We still have some old versions that care.

egtvedt commented 1 year ago

Also not that quite a lot of glibc will overflow if minorversion of kernel is larger than 255. At least latest glibc appears to have fixed that. Haven't looked upstream if there are any relevant patches, or if they just removed the check completely.

On boot you will get the libc not compatible with kernel abort.

cpackham commented 1 year ago

They dropped all the kernel-version business in glibc-2.36 https://sourceware.org/pipermail/libc-announce/2022/000034.html

* The Linux kernel version check has been removed along with the
  LD_ASSUME_KERNEL environment variable.  The minimum kernel used to built
  glibc is still provided through NT_GNU_ABI_TAG ELF note and also printed
  when libc.so is issued directly.

We already had code that pins the kernel version parts at 255 https://github.com/crosstool-ng/crosstool-ng/blob/master/scripts/build/libc/glibc.sh#L318 so there shouldn't be any roll-over issues.