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

From ArmadeusWiki
Jump to: navigation, search
(U-Boot modification)
 
(26 intermediate revisions by 5 users not shown)
Line 1: Line 1:
By default, the kernel for APF28 is the 2.6.35.3 version (from Freescale BSP).
+
[[Category: kernel]]
Migration to '''3.4.2''' is in progress but not finished, this article explains how to use (test) these kernels with latest armadeus trunk.
+
  
== Get the trunk version ==
+
By default, the kernel for APF28 is the 2.6.35 version (from Freescale BSP).
 +
Migration to '''Mainline (3.1x+)''' is in progress but not finished, this article explains how to use (test) these kernels with latest armadeus master branch.
  
* Get the latest trunk version with command :
+
Mainline support is done with [[Kernel-with-device-tree|Device Tree]].
 +
 
 +
==Lazy guys instructions==
 +
* Get the latest master version with command :
 +
<pre class="host">
 +
$ git clone git://git.code.sf.net/p/armadeus/code armadeus-master
 +
</pre>
 +
 
 +
* Configure the view for APF28 "mainline" :
 +
<pre class="host">
 +
$ cd armadeus-master
 +
$ make apf28mainline_defconfig
 +
</pre>
 +
 
 +
* Update your board:
 +
<pre class="apf">
 +
BIOS> run update_uboot; reset
 +
BIOS> run flash_reset_env; reset
 +
BIOS> setenv fdt_addr_r 41000000
 +
BIOS> setenv consoledev ttyAMA0
 +
BIOS> saveenv
 +
BIOS> run update_dtb
 +
BIOS> run update_kernel
 +
BIOS> run update_rootfs
 +
</pre>
 +
 
 +
== For the one who wants to know the details ==
 +
 
 +
* Get the latest master branch version with command :
 
<pre class="host">
 
<pre class="host">
$ git clone git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus armadeus-trunk
+
$ git clone git://git.code.sf.net/p/armadeus/code armadeus-master
 
</pre>
 
</pre>
  
 
* Configure the view for APF28 :
 
* Configure the view for APF28 :
 
<pre class="host">
 
<pre class="host">
$ cd armadeus-trunk
+
$ cd armadeus-master
 
$ make apf28_defconfig
 
$ make apf28_defconfig
 
</pre>
 
</pre>
Line 19: Line 47:
 
Toolchain  --->
 
Toolchain  --->
 
     Kernel Headers (Linux 2.6 (manually specified version))  --->
 
     Kernel Headers (Linux 2.6 (manually specified version))  --->
     (3.4.2) linux version
+
     (3.8) linux version
 
...
 
...
 
System configuration  --->
 
System configuration  --->
Line 25: Line 53:
 
...
 
...
 
Kernel  --->
 
Kernel  --->
     (3.4.2) Kernel version
+
     (3.8) Kernel version
 +
    (40008000) load address (for 3.7+ multi-platform image)
 
     (../patches/linux/$(BR2_LINUX_KERNEL_VERSION)) Custom kernel patches
 
     (../patches/linux/$(BR2_LINUX_KERNEL_VERSION)) Custom kernel patches
 +
    (imx28-apf28dev) Device Tree Source file names
 
</pre>
 
</pre>
  
Line 34: Line 64:
 
</pre>
 
</pre>
  
== U-Boot modification ==
+
=== U-Boot modification ===
  
* Serial port used for console has now a different name: ttyAMA0. So if you want to see something on your serial console please do the following before booting:  
+
* Linux nand driver has changed on kernel 3.8, then U-Boot code must be modified to match it (maybe now no more needed, since 3.12 ??).
 +
** Edit file :
 +
<pre class="config">
 +
buildroot/target/device/armadeus/apf28/apf28-u-boot-2013.04.h
 +
</pre>
 +
** And change line 153:
 +
<pre class="config">
 +
#define CONFIG_MTDMAP "gpmi-nand"
 +
</pre>
 +
** Then re-build U-Boot:
 +
<pre class="host">
 +
make uboot-dirclean; make uboot;
 +
</pre>
 +
** you will have to reflash U-Boot on your APF28 and probably cleanup your environment variables:
 
<pre class="apf">
 
<pre class="apf">
BIOS> setenv console console=ttyAMA0,115200n8
+
BIOS> run flash_reset_env
 
</pre>
 
</pre>
  
* Currently, only [[Network_File_System_configuration#Boot_from_NFS |  NFS boot]] have been tested:
+
* Serial port used for console has now a different name: ttyAMA0. 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 consoledev ttyAMA0
 
BIOS> setenv consoledev ttyAMA0
 +
</pre>
 +
 +
* Kernel 3.8 use [[Kernel-with-device-tree |device tree]], then this paramter must be set too:
 +
<pre class="apf">
 +
BIOS> setenv fdt_addr_r 41000000
 +
BIOS> saveenv
 +
</pre>
 +
 +
* To boot with [[Network_File_System_configuration#Boot_from_NFS |  NFS boot]] use:
 +
<pre class="apf">
 
BIOS> run nfsboot
 
BIOS> run nfsboot
 +
</pre>
 +
 +
* But nand boot work now, just don't forget to update the dtb (if you run update_all it's already done):
 +
<pre class="apf">
 +
BIOS> run update_dtb
 +
BIOS> boot
 
</pre>
 
</pre>
  
 
==Which devices are supported ?==
 
==Which devices are supported ?==
* [[APF28_Linux_kernel_status]]
+
* [[Kernel-upstream-status]]
  
 
==Roadmap==
 
==Roadmap==
# MMC/SDIO -> contact Artemys on IRC
 
# NAND support
 
# PWM
 
# [[Kernel-with-device-tree]]
 
 
# SPI
 
# SPI
 +
# touchscreen

Latest revision as of 16:07, 28 March 2017


By default, the kernel for APF28 is the 2.6.35 version (from Freescale BSP). Migration to Mainline (3.1x+) is in progress but not finished, this article explains how to use (test) these kernels with latest armadeus master branch.

Mainline support is done with Device Tree.

Lazy guys instructions

  • Get the latest master version with command :
$ git clone git://git.code.sf.net/p/armadeus/code armadeus-master
  • Configure the view for APF28 "mainline" :
$ cd armadeus-master
$ make apf28mainline_defconfig
  • Update your board:
BIOS> run update_uboot; reset
BIOS> run flash_reset_env; reset
BIOS> setenv fdt_addr_r 41000000
BIOS> setenv consoledev ttyAMA0
BIOS> saveenv
BIOS> run update_dtb
BIOS> run update_kernel
BIOS> run update_rootfs

For the one who wants to know the details

  • Get the latest master branch version with command :
$ git clone git://git.code.sf.net/p/armadeus/code armadeus-master
  • Configure the view for APF28 :
$ cd armadeus-master
$ make apf28_defconfig
  • On menuconfig select :
Toolchain  --->
    Kernel Headers (Linux 2.6 (manually specified version))  --->
    (3.8) linux version
...
System configuration  --->
    (ttyAMA0) Port to run a getty (login prompt) on
...
Kernel  --->
    (3.8) Kernel version
    (40008000) load address (for 3.7+ multi-platform image)
    (../patches/linux/$(BR2_LINUX_KERNEL_VERSION)) Custom kernel patches
    (imx28-apf28dev) Device Tree Source file names
  • Then build :
$ make

U-Boot modification

  • Linux nand driver has changed on kernel 3.8, then U-Boot code must be modified to match it (maybe now no more needed, since 3.12 ??).
    • Edit file :
buildroot/target/device/armadeus/apf28/apf28-u-boot-2013.04.h
    • And change line 153:
#define CONFIG_MTDMAP			"gpmi-nand"
    • Then re-build U-Boot:
make uboot-dirclean; make uboot;
    • you will have to reflash U-Boot on your APF28 and probably cleanup your environment variables:
BIOS> run flash_reset_env
  • Serial port used for console has now a different name: ttyAMA0. So if you want to see something on your serial console please do the following before booting:
BIOS> setenv consoledev ttyAMA0
  • Kernel 3.8 use device tree, then this paramter must be set too:
BIOS> setenv fdt_addr_r 41000000
BIOS> saveenv
BIOS> run nfsboot
  • But nand boot work now, just don't forget to update the dtb (if you run update_all it's already done):
BIOS> run update_dtb
BIOS> boot

Which devices are supported ?

Roadmap

  1. SPI
  2. touchscreen