2.6.39 kernel and poky


Maxwell Bottiger
 

I have a custom kernel and drivers I built for an Atmel AT91SAM9x5ek system on a chip, and I'd like to use them with yocto to build a distribution.

The original documentation, support CD, etc are all based around an open embedded build from 2011, which doesn't seem to work any longer.  Yocto looks like a great alternative, but wants to build the 3.10 kernel, which I don't think supports this SoC any longer.  So, is there a straight forward method of building a standard Poky root filesystem, but with a custom recipe for the 2.6.39 kernel instead of the stock one?

Thanks for your help.


S?ren Holm
 

You could try to copy the 3.10 recipe and just fixc the revision to point to
the old version. the kernels buildsystem have not changes dramatically since
then I think/hope :)

Fredag den 1. november 2013 11:21:39 skrev Maxwell Bottiger:

I have a custom kernel and drivers I built for an Atmel AT91SAM9x5ek system
on a chip, and I'd like to use them with yocto to build a distribution.

The original documentation, support CD, etc are all based around an open
embedded build from 2011, which doesn't seem to work any longer. Yocto
looks like a great alternative, but wants to build the 3.10 kernel, which I
don't think supports this SoC any longer. So, is there a straight forward
method of building a standard Poky root filesystem, but with a custom
recipe for the 2.6.39 kernel instead of the stock one?

Thanks for your help.
--
Søren Holm


Karl Hiramoto <karl@...>
 

On 11/01/2013 04:21 PM, Maxwell Bottiger wrote:
I have a custom kernel and drivers I built for an Atmel AT91SAM9x5ek system on a chip, and I'd like to use them with yocto to build a distribution.

The original documentation, support CD, etc are all based around an open embedded build from 2011, which doesn't seem to work any longer. Yocto looks like a great alternative, but wants to build the 3.10 kernel, which I don't think supports this SoC any longer. So, is there a straight forward method of building a standard Poky root filesystem, but with a custom recipe for the 2.6.39 kernel instead of the stock one?

I use a 2.6.35 kernel on my own overlay. One thing i ran into with an older kernel and new toolchain is the need for the -mno-unaligned-access compile flag.


My example:

recipies-kernel/linux/linux-yocto-custom_2.6.35.12.bb


inherit kernel
#require recipes-kernel/linux/linux-yocto.inc

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
DEFAULT_PREFERENCE = "-1"


LINUX_VERSION = "2.6.35.12"
LINUX_VERSION_EXTENSION ?= "-custom"
KBRANCH = "master"
META = "meta"

SRC_URI = "git://my_url/linux-2.6.35.12.git;branch=${KBRANCH};branch=master;protocol=ssh;user=git"


SRC_URI += "file://defconfig"
SRC_URI += "file://extra-cflags-override.patch"

KERNEL_EXTRA_ARGS="LOADADDR=0x2000000 V=1 KCFLAGS=-mno-unaligned-access"


UBOOT_ENTRYPOINT="2000000"

SRCREV="master"


PV = "${LINUX_VERSION}"

PR = "r1"

S = "${WORKDIR}/git"
EXTRA_OEMAKE = "${PARALLEL_MAKE}"

# Override COMPATIBLE_MACHINE to include your machine in a bbappend
# file. Leaving it empty here ensures an early explicit build failure.
COMPATIBLE_MACHINE = "(xo1-mvs)"



kernel_do_configure() {
# fixes extra + in /lib/modules/2.6.37+
# $ scripts/setlocalversion . => +
# $ make kernelversion => 2.6.37
# $ make kernelrelease => 2.6.37+
touch ${B}/.scmversion ${S}/.scmversion

cp ${WORKDIR}/defconfig ${B}/.config

if [ ! -z "${INITRAMFS_IMAGE}" ]; then
for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do
if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
fi
done
fi
}


Bryan Evenson
 

Maxwell,

 

Atmel has a Yocto meta layer over at http://www.github.com/linux4sam/meta-atmel.  Their layer was originally focused on the SAMA5 chipset, but has been since modified to include the SAM9x5 chipset.  I have a fork over at http://www.github.com/evensonbryan/meta-atmel that I’ve been using for my SAM9G25 board.  There is one kernel recipe that is using Atmel’s 3.6.9 kernel and another that uses Atmel’s 3.9 kernel.  The 3.6.9 kernel in my testing is the most stable and has the highest level of peripheral support, but I’ve been able to get both to run on the SAM9G25 evaluation board and our custom hardware.  Feel free to fork my layer or Atmel’s layer and add support for the 2.6.39 kernel.  Atmel has been accepting pull requests on additional features.

 

-Bryan Evenson

 

From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Maxwell Bottiger
Sent: Friday, November 01, 2013 11:22 AM
To: yocto@...
Subject: [yocto] 2.6.39 kernel and poky

 

I have a custom kernel and drivers I built for an Atmel AT91SAM9x5ek system on a chip, and I'd like to use them with yocto to build a distribution.

The original documentation, support CD, etc are all based around an open embedded build from 2011, which doesn't seem to work any longer.  Yocto looks like a great alternative, but wants to build the 3.10 kernel, which I don't think supports this SoC any longer.  So, is there a straight forward method of building a standard Poky root filesystem, but with a custom recipe for the 2.6.39 kernel instead of the stock one?

Thanks for your help.


Maxwell Bottiger
 

Thank you all for the replies!  I nearly have the 2.6 kernel built and I'll fork the meta-atmel for the 3.9 kernel.  I'll post my final bb recipe when it's finished.

-Max


On Mon, Nov 4, 2013 at 10:09 AM, Bryan Evenson <bevenson@...> wrote:

Maxwell,

 

Atmel has a Yocto meta layer over at http://www.github.com/linux4sam/meta-atmel.  Their layer was originally focused on the SAMA5 chipset, but has been since modified to include the SAM9x5 chipset.  I have a fork over at http://www.github.com/evensonbryan/meta-atmel that I’ve been using for my SAM9G25 board.  There is one kernel recipe that is using Atmel’s 3.6.9 kernel and another that uses Atmel’s 3.9 kernel.  The 3.6.9 kernel in my testing is the most stable and has the highest level of peripheral support, but I’ve been able to get both to run on the SAM9G25 evaluation board and our custom hardware.  Feel free to fork my layer or Atmel’s layer and add support for the 2.6.39 kernel.  Atmel has been accepting pull requests on additional features.

 

-Bryan Evenson

 

From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Maxwell Bottiger
Sent: Friday, November 01, 2013 11:22 AM
To: yocto@...
Subject: [yocto] 2.6.39 kernel and poky

 

I have a custom kernel and drivers I built for an Atmel AT91SAM9x5ek system on a chip, and I'd like to use them with yocto to build a distribution.

The original documentation, support CD, etc are all based around an open embedded build from 2011, which doesn't seem to work any longer.  Yocto looks like a great alternative, but wants to build the 3.10 kernel, which I don't think supports this SoC any longer.  So, is there a straight forward method of building a standard Poky root filesystem, but with a custom recipe for the 2.6.39 kernel instead of the stock one?

Thanks for your help.