mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Kernel headers version in OSELAS toolchain & kernel version in the BSP
Date: Tue, 16 Apr 2013 17:05:31 +0200	[thread overview]
Message-ID: <20130416150531.GO13484@pengutronix.de> (raw)
In-Reply-To: <516D20BB.5000108@optimeas.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

      reply	other threads:[~2013-04-16 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16  9:58 Matthias Klein
2013-04-16 15:05 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130416150531.GO13484@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox