From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1US7Rt-0007hg-La for ptxdist@pengutronix.de; Tue, 16 Apr 2013 17:05:33 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1US7Rr-000471-IT for ptxdist@pengutronix.de; Tue, 16 Apr 2013 17:05:31 +0200 Date: Tue, 16 Apr 2013 17:05:31 +0200 From: Michael Olbrich Message-ID: <20130416150531.GO13484@pengutronix.de> References: <516D20BB.5000108@optimeas.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <516D20BB.5000108@optimeas.de> Subject: Re: [ptxdist] Kernel headers version in OSELAS toolchain & kernel version in the BSP Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Tue, Apr 16, 2013 at 11:58:19AM +0200, Matthias Klein wrote: > while reading the AppNote "Building Toolchain" I came across the > section about the naming convention: > > The last part (kernel-3.6) defines the kernel header in use for this > toolchain. This is important, as applications > built with this toolchains must be ran at least on this kernel revision. > > That means when I use the toolchain arm-cortexa8-linux-gnueabihf_gcc-4.7.3_glibc-2.16.0_binutils-2.22_kernel-3.6-sanitized > from 2012.12.1 > to build a BSP with a 3.4 kernel is wrong? I have done this without > any problem so far. You can run any kernel starting from 2.6.32. > What is the recommended approach if I run in such a version conflict? > - Use older toolchains which require a different kernel version? > - Or can I simply adjust / create a new config file for e.g. kernel 3.4 ? > > In the ptxconfig file are 2 kernel versions. From the upper > toolchain example: > > PTXCONF_GLIBC_ENABLE_KERNEL="2.6.32" > and > PTXCONF_KERNEL_HEADERS_VERSION="3.6" > > What is the difference ? KERNEL_HEADERS_VERSION is the Version of the installed kernel headers. For the most part, applications don't use those directly, but use the glibc API that wraps this Kernel API. The kernel Headers are usually needed when working directly with the kernel, e.g. when using ioctls. The GLIBC_ENABLE_KERNEL is the oldest kernel version the glibc will run on. So it will include the emulation code for features from newer kernels etc. > What speaks against using a very low kernel version for building the > toolchain ? New kernel headers mean access to the new features for the new kernels. And features are rarely removed. If some API you're actually using got removed then you're doing something wrong, because it was probably deprecated a decade or so ago. The GLIBC_ENABLE_KERNEL version is a trade-off. Supporting old kernel versions means carrying a lot of compatibility code. Which means a larger glibc. When I choose a new version I look at the kernels currently out there. What's the currently stable real-time kernel? Which kernel version do the various Chip vendors use for their vendor kernel? Things like that. Regards, Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de