All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Cussins <timcussins@eml.cc>
To: poky@pokylinux.org
Subject: Problems creating a new BSP
Date: Wed, 18 May 2011 16:56:14 +0100	[thread overview]
Message-ID: <4DD3EC1E.7090603@eml.cc> (raw)

Hi all,

I've been having trouble getting my own kernel built and it's time to go 
to the list :)

The problem: As part of my bsp I want a kernel that's based on the yocto 
tree, but is built for my machine. Mu current setup fails to build it :(

(1) I've been following the steps outlined here:

   http://www.yoctoproject.org/docs/bsp-guide/bsp-guide.html

(2) I'm tracking the bernard branch of poky.

(3) My new meta directory (meta-tephra) is inside the top-level of my 
poky checkout. Here's what's in there (find):

./recipes-kernel
./recipes-kernel/linux
./recipes-kernel/linux/linux-yocto-stable_git.bbappend
./recipes-kernel/linux/linux-yocto-stable
./recipes-kernel/linux/linux-yocto-stable/defconfig
./conf
./conf/machine
./conf/machine/tephra.conf
./conf/layer.conf
./images
./images/poky-image-tephra-sdk.bb

(4) Contents of tephra.conf

TARGET_ARCH = "arm"
MACHINE_FEATURES = "kernel26"
IMAGE_FSTYPES ?= "tar.bz2 ext3"
ROOT_FLASH_SIZE = "280"
IMAGE_ROOTFS_SIZE_ext2 ?= "280000"
IMAGE_ROOTFS_SIZE_ext3 ?= "280000"
# Don't include kernels in standard images
RDEPENDS_kernel-base = ""
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable"
#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
EXTRA_IMAGEDEPENDS += ""
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
require conf/machine/include/tune-arm1136jf-s.inc
KERNEL_IMAGETYPE = "uImage"
SERIAL_CONSOLE = "115200 ttyS0"

(5) Contents of linux-yocto-stable_git.bbappend

FILESEXTRAPATHS := "${THISDIR}/${PN}"
COMPATIBLE_MACHINE_tephra = "tephra"
KMACHINE_tephra = "arm_versatile_926ejs"
SRC_URI += "file://defconfig"

(6) Contents of defconfig

Same as mx3_defconfig (for freescale iMX 3)

(6b) for completeness here's layer.conf

# We have a conf directory, add to BBPATH
BBPATH := "${BBPATH}:${LAYERDIR}"

# We have a recipes directory containing .bb and .bbappend files, add to 
BBFILES
BBFILES := "${BBFILES} \
             ${LAYERDIR}/recipes*/*/*.bb \
             ${LAYERDIR}/recipes*/*/*.bbappend \
             ${LAYERDIR}/images/*.bb"

BBFILE_COLLECTIONS += "tephra"
BBFILE_PATTERN_tephra := "^${LAYERDIR}/"
BBFILE_PRIORITY_tephra = "5"

(7) Minor confusion - When I invoke

   bitbake virtual/kernel -DDDD -v

The process warns during the start of kernel_do_compile() (from 
kernel.bbclass) that

   "Warning: make dep is unnecessary now."

It's trying to build deps - fair enough, as the value of 
KERNEL_MAJOR_VERSION is 'None' because that information is taken from 
the kernel build output:

   oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"

but this won't generate

   include/generated/utsrelease.h

which is where the kernel version now lives. Changing the line to 
generate this target ensures that utsrelease.h is built, but 
KERNEL_MAJOR_VERSION is still 'None'.

I'm pretty confused by this and need help :)

(8) Major problem - The copying of my defconfig into .config causes the 
kernel build to terminate with:

   linux is not clean, please run 'make mrproper'

Commenting out the defconfig reference in my bbappend:

   #SRC_URI += "file://defconfig"

allows the kernel build to complete, but obviously not with the 
configuration I was after :(

Any insight into what I'm doing wrong (either philosophically or 
technically) would be awesome.

Thanks in advance,

Tim


             reply	other threads:[~2011-05-18 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 15:56 Tim Cussins [this message]
2011-05-18 16:20 ` Problems creating a new BSP Bruce Ashfield
2011-05-18 17:47   ` Tim Cussins
2011-05-18 22:31     ` Robert Berger
2011-05-19  0:15     ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD3EC1E.7090603@eml.cc \
    --to=timcussins@eml.cc \
    --cc=poky@pokylinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.