Difference between revisions of "How to use vanilla kernel on APF27"

From ArmadeusWiki
Jump to: navigation, search
(mainline target)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category: kernel]]
+
By default, the stable kernel version generated by the armadeus BSP for APF27 is 2.6.29.6. Migration toward mainline/vanilla kernel [[Kernel-upstream-status | is in progress]] but not finished.
  
By default, the kernel for APF27 is the 2.6.29.6. Migration for the kernel upstream [[Kernel-upstream-status | is in progress]] but not finished, and some features like [[Can | CAN]] or [[GPIOlib]] interrupts management are not available under kernel 2.6.29. This article explain how to use a recent kernel with latest armadeus trunk on APF27.
+
However some features like [[Can | CAN]] or [[GPIOlib]] interrupts management are not available under this 2.6.29 version. This page will explain how to build and use a recent kernel with latest armadeus BSP on APF27, for people wanting more features than 2.6.29 can offer.
  
With recent kernel it is also important to know how to use kernel [[device tree]]
+
With recent kernels it is very important to know how to use kernel [[device tree]] mechanism !
  
== Get the trunk version ==
+
== mainline target ==
  
Get the latest trunk version with command :
+
* Get the latest armadeus BSP development version:
 
<pre class="host">
 
<pre class="host">
$ git clone git://git.code.sf.net/p/armadeus/code apf27
+
$ git clone git://git.code.sf.net/p/armadeus/code armadeus-head
 
</pre>
 
</pre>
  
Configure the view for APF27 :
+
* Configure the BSP for "mainline" APF27:
 
<pre class="host">
 
<pre class="host">
$ make apf27_defconfig
+
$ cd armadeus-head
 +
$ make apf27mainline_defconfig
 
</pre>
 
</pre>
  
On menuconfig select :
+
* Build the BSP:
<pre class="config">
+
Toolchain  --->
+
    Kernel Headers (Linux 2.6 (manually specified version))  --->
+
    (2.6.38.8) linux version
+
[...]
+
System configuration  --->
+
    (ttymxc0) Port to run a getty (login prompt) on
+
[...]
+
Kernel  --->
+
    (2.6.38.8) Kernel version
+
</pre>
+
 
+
Then make :
+
 
<pre class="host">
 
<pre class="host">
 
$ make
 
$ make
 
</pre>
 
</pre>
  
== U-Boot modification ==
+
* Update your board (after having copied BSP generated images in your /tftpboot/):
 
+
First time you migrate from 2.6.29 to 3.1x+ only:
Serial port names have been unified to /dev/ttymxc[0-6]. So if you want to see something on your serial console please do the following before booting:  
+
 
<pre class="apf">
 
<pre class="apf">
BIOS> setenv console console=ttymxc0,115200
+
BIOS> run update_uboot; reset
 +
BIOS> run flash_reset_env; reset
 +
</pre>
 +
Each time you switch from 2.6.29.6 to mainline:
 +
<pre class="apf">
 +
BIOS> run update_dtb
 +
BIOS> run update_kernel
 +
BIOS> run update_rootfs
 +
 
 +
BIOS> setenv fdt_addr_r 0xa1000000
 +
BIOS> setenv consoledev ttymxc0
 +
BIOS> saveenv
 +
 
 
</pre>
 
</pre>
  
* Framebuffer can now support multiple LCDs and so LCD you want to use must be passed as bootparam (like serial port). So you can do (for example):
+
* With recent kernels, framebuffer can support multiple LCDs and so LCD you want to use must be passed as bootargs (like serial port). So you can do (for example):
 +
 
<pre class="apf">
 
<pre class="apf">
BIOS> setenv console console=ttymxc0,115200 video=imxfb:Chimei-LW700AT9003
+
BIOS> setenv extrabootargs video=imxfb:Chimei-LW700AT9003
 +
BIOS> saveenv
 
</pre>
 
</pre>
  
 
== Evolution of migration ==
 
== Evolution of migration ==
  
The evolution of patches migration can be found on [[APF9328_and_APF27_migration_to_Linux_2.6.38#APF27_patches | migration page]].
+
See [[Kernel-upstream-status]] to know the status of kernel migration.
 +
 
 +
[[Category: kernel]]

Latest revision as of 18:27, 25 June 2014

By default, the stable kernel version generated by the armadeus BSP for APF27 is 2.6.29.6. Migration toward mainline/vanilla kernel is in progress but not finished.

However some features like CAN or GPIOlib interrupts management are not available under this 2.6.29 version. This page will explain how to build and use a recent kernel with latest armadeus BSP on APF27, for people wanting more features than 2.6.29 can offer.

With recent kernels it is very important to know how to use kernel device tree mechanism !

mainline target

  • Get the latest armadeus BSP development version:
$ git clone git://git.code.sf.net/p/armadeus/code armadeus-head
  • Configure the BSP for "mainline" APF27:
$ cd armadeus-head
$ make apf27mainline_defconfig
  • Build the BSP:
$ make
  • Update your board (after having copied BSP generated images in your /tftpboot/):

First time you migrate from 2.6.29 to 3.1x+ only:

BIOS> run update_uboot; reset
BIOS> run flash_reset_env; reset

Each time you switch from 2.6.29.6 to mainline:

BIOS> run update_dtb
BIOS> run update_kernel
BIOS> run update_rootfs

BIOS> setenv fdt_addr_r 0xa1000000
BIOS> setenv consoledev ttymxc0
BIOS> saveenv

  • With recent kernels, framebuffer can support multiple LCDs and so LCD you want to use must be passed as bootargs (like serial port). So you can do (for example):
BIOS> setenv extrabootargs video=imxfb:Chimei-LW700AT9003
BIOS> saveenv

Evolution of migration

See Kernel-upstream-status to know the status of kernel migration.