[oe] support another hardware
Koen Kooi
k.kooi at student.utwente.nl
Tue Oct 21 07:37:59 UTC 2008
On 21-10-2008 08:49, Sledz, Steffen wrote:
>> There is really not much more to it than create a machine conf, and a
>> kernel configuration. For the kernel, the preferred approach seems to
>> be to use a generic linux-2.6.xx.bb recipe, and add your machine to
>> the version you support. Occasionally, other packages will have
>> machine specific tweaks, but that is not required.
>
> Are there conventions in naming of the kernel recipes? If i look into the relevant directories i can see various methods:
>
> 1. "${MACHINE}-kernel" (e.g. mx21ads.conf)
> 2. "linux-${MACHINE}" (e.g. magicbox.conf)
> 3. fix names like "linux-wrap-geode" for wrap.conf
>
> Is one of them preferred?
None of the above. As Cliff said in his earlier mail:
"For the kernel, the preferred approach seems to be to use a generic
linux-2.6.xx.bb recipe, and add your machine to the version you support."
So:
a) find out which kernel version your custom kernel is (e.g 2.6.27)
b) extract the diff (diff -Nurd linux-2.6.27/ linux-2.6.27-mymachine/)
c) add SRC_URI_append_mymachine = "file://mymachine.diff" to linux_2.6.27.bb
d) put defconfig in packages/linux/linux-2.6.27/mymachine/defconfig
Step b) is optional if you already have a diff.
If you really, really need to be 'special'[1][2] 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.
Most of the time people that add new hardware to OE go through something
like this (ARM example):
- add mymachine.conf, linux-mymachine_2.6.xx.bb, openmymachine.conf distro
- 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 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.
</rant>
regards,
Koen
[1] 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.
[2] No, I'm not a native English speaker, but yes, I do understand the
special-between-quotes connotation.
More information about the Openembedded-devel
mailing list