Main Linux kernel vs Ubuntu kernel

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Main Linux kernel vs Ubuntu kernel

Subhashini Rao Beerisetty

[ Please keep me in CC as I'm not subscribed to the list]


Hi All,


Apologies for the dull questions, I’m noob, need to learn lot more stuff.

 

Ubuntu distro has LTS, non-LTS, GA, HWE kernels, what’s the difference between these? Which one should be the best choice for development& validating the hardware?


We’ve a bunch of hardware & test systems, we started this project by opting ubuntu distro 16.04 LTS v4.4 kernel for development of device drivers, test utilities.


I’d like to know, what are the differences between the main Linux kernel and the kernel being used by Ubuntu?


If I need to upgrade our drivers to latest kernel v4.17, what are the best possible ways? In future, is it possible for us to use the current installed 16.04 LTS by just upgrading the Linux kernel version?


Are all the Linux kernel releases are backward compatible?



Can someone clarify me on this?



Thanks


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: Main Linux kernel vs Ubuntu kernel

Seth Forshee
On Sat, Jun 09, 2018 at 12:07:12AM +0530, Subhashini Rao Beerisetty wrote:

> [ Please keep me in CC as I'm not subscribed to the list]
>
>
> Hi All,
>
>
> Apologies for the dull questions, I’m noob, need to learn lot more stuff.
>
>
> Ubuntu distro has LTS, non-LTS, GA, HWE kernels, what’s the difference
> between these?

GA: The kernel that originally ships with a given Ubuntu release.

LTS kernel: The GA kernel for an LTS release (not to be confused with
upstream LTS stable kernels - an Ubuntu LTS kernel may or may not also
be an upstream LTS kernel).

HWE kernel: A kernel backported from a non-LTS release to an LTS
release.

> Which one should be the best choice for development& validating the
> hardware?
>
>
> We’ve a bunch of hardware & test systems, we started this project by opting
> ubuntu distro 16.04 LTS v4.4 kernel for development of device drivers, test
> utilities.

It's difficult to answer your question without more information about
what you're hoping to accomplish. If you want to get new hardware
support into Ubuntu, usually that would land in the upstream kernel
first.

> I’d like to know, what are the differences between the main Linux kernel
> and the kernel being used by Ubuntu?

A given version of Ubuntu takes a specific upstream kernel version and
adds various extras, which may include extra drivers and backported
features from later kernel versions.

> If I need to upgrade our drivers to latest kernel v4.17, what are the best
> possible ways? In future, is it possible for us to use the current
> installed 16.04 LTS by just upgrading the Linux kernel version?

The easiest way to install the latest kernel version onto Ubuntu is to
use our mainline builds [1]. Understand though that these builds are
only for testing and will not receive support as far as fixing bugs,
etc.

> Are all the Linux kernel releases are backward compatible?

In broad strokes yes, as there is a pretty strict policy upstream about
not introducing regressions to userspace. However sometimes issues do
slip in, and you might also see problems if you try to install kernel
packages from a newer Ubuntu release into an older release. The only
supported way to run newer kernels is through the hwe packages, and
those are only provided for LTS releases.

Seth


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: Main Linux kernel vs Ubuntu kernel

Subhashini Rao Beerisetty


On Wed, Jun 13, 2018 at 12:02 AM, Seth Forshee <[hidden email]> wrote:
On Sat, Jun 09, 2018 at 12:07:12AM +0530, Subhashini Rao Beerisetty wrote:
> [ Please keep me in CC as I'm not subscribed to the list]
>
>
> Hi All,
>
>
> Apologies for the dull questions, I’m noob, need to learn lot more stuff.
>
>
> Ubuntu distro has LTS, non-LTS, GA, HWE kernels, what’s the difference
> between these?

GA: The kernel that originally ships with a given Ubuntu release.

LTS kernel: The GA kernel for an LTS release (not to be confused with
upstream LTS stable kernels - an Ubuntu LTS kernel may or may not also
be an upstream LTS kernel).

HWE kernel: A kernel backported from a non-LTS release to an LTS
release.

> Which one should be the best choice for development& validating the
> hardware?
>
>
> We’ve a bunch of hardware & test systems, we started this project by opting
> ubuntu distro 16.04 LTS v4.4 kernel for development of device drivers, test
> utilities.

It's difficult to answer your question without more information about
what you're hoping to accomplish. If you want to get new hardware
support into Ubuntu, usually that would land in the upstream kernel
first.

Thank you very much for the clarification.

We developed few out-of-tree linux kernel modules(we don’t distribute drivers to external customers) to validate our silicon chip.  For this we started with Ubuntu 16.04 LTS v4.4 kernel.

Now all the test boxes which started with 16.04 installation are been automatically moved on to a 4.13 kernel. With v4.13 kernel, I see the below mentioned build error, it is due to sigpending method moved from <linux/sched.h> into <linux/sched/signal.h>

 

error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]

 

The below mentioned patch fixes the build issue:

 

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)

#include <linux/sched/signal.h>

#endif

 

Basically i’m looking for ubuntu disto with N years of  security support\updates along with supporting\developing our out-of-tree module for new kernel versions. What would be the best strategy?

 

> I’d like to know, what are the differences between the main Linux kernel
> and the kernel being used by Ubuntu?

A given version of Ubuntu takes a specific upstream kernel version and
adds various extras, which may include extra drivers and backported
features from later kernel versions.

> If I need to upgrade our drivers to latest kernel v4.17, what are the best
> possible ways? In future, is it possible for us to use the current
> installed 16.04 LTS by just upgrading the Linux kernel version?

The easiest way to install the latest kernel version onto Ubuntu is to
use our mainline builds [1]. Understand though that these builds are
only for testing and will not receive support as far as fixing bugs,
etc.

> Are all the Linux kernel releases are backward compatible?

In broad strokes yes, as there is a pretty strict policy upstream about
not introducing regressions to userspace. However sometimes issues do
slip in, and you might also see problems if you try to install kernel
packages from a newer Ubuntu release into an older release. The only
supported way to run newer kernels is through the hwe packages, and
those are only provided for LTS releases.

Seth



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: Main Linux kernel vs Ubuntu kernel

Seth Forshee
On Fri, Jun 15, 2018 at 04:55:38PM +0530, Subhashini Rao Beerisetty wrote:

> On Wed, Jun 13, 2018 at 12:02 AM, Seth Forshee <[hidden email]>
> wrote:
>
> > On Sat, Jun 09, 2018 at 12:07:12AM +0530, Subhashini Rao Beerisetty wrote:
> > > [ Please keep me in CC as I'm not subscribed to the list]
> > >
> > >
> > > Hi All,
> > >
> > >
> > > Apologies for the dull questions, I’m noob, need to learn lot more stuff.
> > >
> > >
> > > Ubuntu distro has LTS, non-LTS, GA, HWE kernels, what’s the difference
> > > between these?
> >
> > GA: The kernel that originally ships with a given Ubuntu release.
> >
> > LTS kernel: The GA kernel for an LTS release (not to be confused with
> > upstream LTS stable kernels - an Ubuntu LTS kernel may or may not also
> > be an upstream LTS kernel).
> >
> > HWE kernel: A kernel backported from a non-LTS release to an LTS
> > release.
> >
> > > Which one should be the best choice for development& validating the
> > > hardware?
> > >
> > >
> > > We’ve a bunch of hardware & test systems, we started this project by
> > opting
> > > ubuntu distro 16.04 LTS v4.4 kernel for development of device drivers,
> > test
> > > utilities.
> >
> > It's difficult to answer your question without more information about
> > what you're hoping to accomplish. If you want to get new hardware
> > support into Ubuntu, usually that would land in the upstream kernel
> > first.
> >
> Thank you very much for the clarification.
>
> We developed few out-of-tree linux kernel modules(we don’t distribute
> drivers to external customers) to validate our silicon chip.  For this we
> started with Ubuntu 16.04 LTS v4.4 kernel.
>
> Now all the test boxes which started with 16.04 installation are been
> automatically moved on to a 4.13 kernel. With v4.13 kernel, I see the below
> mentioned build error, it is due to sigpending method moved from
> <linux/sched.h> into <linux/sched/signal.h>

A system installed with a 4.4 kernel should not get upgraded to a 4.13
kernel automatically. The 4.4 kernel would have been installed using one
of our non-hwe meta packages (linux-generic, linux-virtual, etc.)
whereas the 4.13 kernel would have been installed using a hwe meta
package (linux-generic-hwe-16.04, linux-virtual-hwe-16.04, etc.). It
sounds like someone must have installed one of the hwe kernels at some
point.

> error: implicit declaration of function ‘signal_pending’
> [-Werror=implicit-function-declaration]
>
>
>
> The below mentioned patch fixes the build issue:
>
>
>
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
>
> #include <linux/sched/signal.h>
>
> #endif
>
>
>
> Basically i’m looking for ubuntu disto with N years of  security
> support\updates along with supporting\developing our out-of-tree module for
> new kernel versions. What would be the best strategy?

The LTS releases are your best bet, each of those comes with 5 years of
support. 16.04 will be supported until April 2021 and 18.04 until April
2023. As long as you don't install any hwe kernel packages your system
should remain with the GA kernel version.

>
>
> >
> > > I’d like to know, what are the differences between the main Linux kernel
> > > and the kernel being used by Ubuntu?
> >
> > A given version of Ubuntu takes a specific upstream kernel version and
> > adds various extras, which may include extra drivers and backported
> > features from later kernel versions.
> >
> > > If I need to upgrade our drivers to latest kernel v4.17, what are the
> > best
> > > possible ways? In future, is it possible for us to use the current
> > > installed 16.04 LTS by just upgrading the Linux kernel version?
> >
> > The easiest way to install the latest kernel version onto Ubuntu is to
> > use our mainline builds [1]. Understand though that these builds are
> > only for testing and will not receive support as far as fixing bugs,
> > etc.
> >
> > > Are all the Linux kernel releases are backward compatible?
> >
> > In broad strokes yes, as there is a pretty strict policy upstream about
> > not introducing regressions to userspace. However sometimes issues do
> > slip in, and you might also see problems if you try to install kernel
> > packages from a newer Ubuntu release into an older release. The only
> > supported way to run newer kernels is through the hwe packages, and
> > those are only provided for LTS releases.

Just to clarify this -- the "no regressions" policy applies to
userspace, not to kernel modules. There's no guarantee about internal
kernel interfaces remaining backwards compatible.

Seth

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: Main Linux kernel vs Ubuntu kernel

Thadeu Lima de Souza Cascardo-3
On Fri, Jun 15, 2018 at 07:43:55AM -0500, Seth Forshee wrote:
> On Fri, Jun 15, 2018 at 04:55:38PM +0530, Subhashini Rao Beerisetty wrote:
[...]
> > Basically i’m looking for ubuntu disto with N years of  security
> > support\updates along with supporting\developing our out-of-tree module for
> > new kernel versions. What would be the best strategy?
>
> The LTS releases are your best bet, each of those comes with 5 years of
> support. 16.04 will be supported until April 2021 and 18.04 until April
> 2023. As long as you don't install any hwe kernel packages your system
> should remain with the GA kernel version.
>
[...]

> > > In broad strokes yes, as there is a pretty strict policy upstream about
> > > not introducing regressions to userspace. However sometimes issues do
> > > slip in, and you might also see problems if you try to install kernel
> > > packages from a newer Ubuntu release into an older release. The only
> > > supported way to run newer kernels is through the hwe packages, and
> > > those are only provided for LTS releases.
>
> Just to clarify this -- the "no regressions" policy applies to
> userspace, not to kernel modules. There's no guarantee about internal
> kernel interfaces remaining backwards compatible.
>
> Seth

And they also break between stable (4.4.y) releases, and we also apply fixes
that break this internal ABI. In fact, we do not go through the effort of
trying not to break them, and require all DKMS modules to rebuild after each
Ubuntu release. As kernels go into -proposed, we have ourselves the chance to
fix any DKMS module that breaks before those go into -updates.

But there is no guarantee that an out-of-tree module won't need any updates
even if they stick to the LTS security updates. Still, there should be much
less changes between an Ubuntu-4.4.0-90 and Ubuntu-4.4.0-120 kernel, then say,
between an Ubuntu-4.4.0-90 and Ubuntu-4.13.0-30 kernel. So, sticking to the LTS
kernels is still the best strategy here.

Better yet, you should try to follow the proposed kernels on developer/testing
systems. That gives you the chance to fix anything that breaks before deploying
those.

Cascardo.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team