Linux – What considerations need to be made when choosing the version of kernel for an embedded device

driversembeddedkernellinux-kernel

I have used buildroot to successfully create a kernel, root file system and cross-compilers to enable me to write application code to run on an embedded device. Currently I have no need to write device drivers and currently have no idea how to go about it anyway but it is quite likely that in future I may need to do this. From my research I have come to understand that the kernel API can change between versions and that writing a device driver is specific to a kernel version unlike writing a user level application. Basically I would like to know:

  1. Is the above correct?
  2. What factors need consideration when deciding on a what kernel version to use?

The reason I ask is that from all the literature that I have read on the subject (and the attendance at an embedded linux course) deals with version 2.6.x kernels. I am building by embedded system using a 3.6.11 kernel but I am wondering why the course and literature seems to deal with these older kernels. Are there beneficial aspects to using an older kernel, or are there drawbacks to using newer versions?

Best Answer

3.x is just continuation of 2.x - at one point Linus decided that the "x" part of the version is too big. Generally you probably want reasonably recent kernel, probably one marked as "longterm". A lot also depends on your application as well - while remote security holes in kernel are rather scarce, local problems are much more prevalent.

Related Question