Difference between revisions of "Adding a new Machine"

From Openembedded.org
Jump to: navigation, search
(Link to manual added)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== General steps ==
+
{{Outdated}}
 +
 
 +
== Kernel configuration ==
  
 
# Find out which kernel version your custom kernel is (e.g. 2.6.27)
 
# Find out which kernel version your custom kernel is (e.g. 2.6.27)
 
# Extract the diff: <tt>diff -Nurd linux-2.6.27/ linux-2.6.27-mymachine/</tt> (this step is optional if you already have a diff)  
 
# Extract the diff: <tt>diff -Nurd linux-2.6.27/ linux-2.6.27-mymachine/</tt> (this step is optional if you already have a diff)  
 
# Add <tt>DEFAULT_PREFERENCE_mymachine = "1"</tt> and <tt>SRC_URI_append_mymachine = "file://mymachine.diff"</tt> to <tt>linux_2.6.27.bb</tt>
 
# Add <tt>DEFAULT_PREFERENCE_mymachine = "1"</tt> and <tt>SRC_URI_append_mymachine = "file://mymachine.diff"</tt> to <tt>linux_2.6.27.bb</tt>
# Put <tt>defconfig</tt> in <tt>packages/linux/linux-2.6.27/mymachine/defconfig</tt>
+
# Put <tt>defconfig</tt> in <tt>recipes/linux/linux-2.6.27/mymachine/defconfig</tt>
  
 
If you really, really need to be ''special'' (which you really don't need, but companies seem to feel better when their name is plastered all over the place e.g. <tt>linux-mycompany_2.6.27.bb</tt>) you can create your ''own'' kernel recipe with the naming options you mentioned, then please use <tt>linux.inc</tt> to the basics working well. If even that is not ''special'' enough, then well, you are on your own.
 
If you really, really need to be ''special'' (which you really don't need, but companies seem to feel better when their name is plastered all over the place e.g. <tt>linux-mycompany_2.6.27.bb</tt>) you can create your ''own'' kernel recipe with the naming options you mentioned, then please use <tt>linux.inc</tt> to the basics working well. If even that is not ''special'' enough, then well, you are on your own.
  
 
By reusing a <tt>linux_2.6.xx</tt> recipe you can easily see what kind of patches other machines are applying and how issues with that kernel get solved.
 
By reusing a <tt>linux_2.6.xx</tt> recipe you can easily see what kind of patches other machines are applying and how issues with that kernel get solved.
 +
 +
== General steps and traps ==
  
 
Most of the time people that add new hardware to OE go through something like this (ARM example):
 
Most of the time people that add new hardware to OE go through something like this (ARM example):
  
# Add <tt>mymachine.conf</tt>, <tt>linux-mymachine_2.6.xx.bb</tt>, <tt>openmymachine.conf<tt> distro
+
# Add <tt>mymachine.conf</tt>, <tt>linux-mymachine_2.6.xx.bb</tt>, <tt>openmymachine.conf</tt> distro
 
# Complain toolchain doesn't build, copy over versions from angstrom to get it fixed
 
# Complain toolchain doesn't build, copy over versions from angstrom to get it fixed
 
# Complain their device doesn't boot, change defconfig to support EABI to get it fixed
 
# Complain their device doesn't boot, change defconfig to support EABI to get it fixed
Line 21: Line 25:
 
So people, please start by reusing existing things and creating your own stuff '''when need arises''', not when NIH arises.
 
So people, please start by reusing existing things and creating your own stuff '''when need arises''', not when NIH arises.
  
== See also ==
+
== Further comments and information ==
  
* [http://bec-systems.com/oe/html/commonuse_new_machine.html Adding a new Machine], Chapter 5. Common Use-cases/tasks, OpenEmbedded User Manual
+
* [http://docs.openembedded.org/usermanual/usermanual.html#commonuse_new_machine Adding a new Machine], Chapter 5. Common Use-cases/tasks, OpenEmbedded User Manual
 +
* where available, don't forget to provide an URL to the machine's homepage in the machine configs for those who want to know more about it.
  
 
[[Category:Dev]]
 
[[Category:Dev]]
 +
[[Category:Machine]]

Latest revision as of 17:14, 3 November 2012

NOTE: This page has been identified as having content that is significantly out-of-date, usually because it refers to OpenEmbedded-Classic - for new projects, you should use OpenEmbedded-Core.

See OpenEmbedded Wiki Update Project for more details.

Kernel configuration

  1. Find out which kernel version your custom kernel is (e.g. 2.6.27)
  2. Extract the diff: diff -Nurd linux-2.6.27/ linux-2.6.27-mymachine/ (this step is optional if you already have a diff)
  3. Add DEFAULT_PREFERENCE_mymachine = "1" and SRC_URI_append_mymachine = "file://mymachine.diff" to linux_2.6.27.bb
  4. Put defconfig in recipes/linux/linux-2.6.27/mymachine/defconfig

If you really, really need to be special (which you really don't need, but companies seem to feel better when their name is plastered all over the place e.g. linux-mycompany_2.6.27.bb) you can create your own kernel recipe with the naming options you mentioned, then please use linux.inc to the basics working well. If even that is not special enough, then well, you are on your own.

By reusing a linux_2.6.xx recipe you can easily see what kind of patches other machines are applying and how issues with that kernel get solved.

General steps and traps

Most of the time people that add new hardware to OE go through something like this (ARM example):

  1. Add mymachine.conf, linux-mymachine_2.6.xx.bb, openmymachine.conf distro
  2. Complain toolchain doesn't build, copy over versions from angstrom to get it fixed
  3. Complain their device doesn't boot, change defconfig to support EABI to get it fixed
  4. Complain NFS doesn't work, change defconfig to get that fixed

The toolchain problems wouldn't have been there if people had used an existing, working distro like angstrom, the kernel issues mentioned above are all handled automagically by linux.inc.

So people, please start by reusing existing things and creating your own stuff when need arises, not when NIH arises.

Further comments and information

  • Adding a new Machine, Chapter 5. Common Use-cases/tasks, OpenEmbedded User Manual
  • where available, don't forget to provide an URL to the machine's homepage in the machine configs for those who want to know more about it.