kernel configuration question

191 views
Skip to first unread message

Brett Kuehner

unread,
Nov 19, 2008, 3:58:48 PM11/19/08
to beagl...@googlegroups.com
I have successfully built various angstrom kernel and root filesystem images using bitbake, but I still feel like I'm not fully understanding things. I've been reading the various documents and wikis, but so far I haven't found the answer to the following questions. If anyone could provide an answer or a lead to finding the answer, I'd appreciate it.

1) As far as I can tell, after I do a bitbake, like "bitbake console-image", the results are left in directories under the "tmp" subdir, and they appear to be intermixed with lots of intermediate build files. Is there a way to extract just the final product into a clean tree, or am I just not looking in the right place?

2) If I am building a different kernel (like MontaVista), using 'make' instead of 'bitbake', I can configure the kernel using "make gconfig" to edit the .config file. Is there a similar mechanism using bitbake, or do I need to edit the config files (which I think are stored as 'defconfig') by hand?

3) Is there an automatic way to extract the kernel source from bitbake into a tree that is buildable via the standard kernel build tools using "make", or is that not something that is designed to be possible?

I apologize if any of this stuff is obvious and I'm just missing it, but after days of reading, I haven't found the answers.

Thanks again for any help,
Brett

JustinLove

unread,
Nov 20, 2008, 9:32:09 AM11/20/08
to beagl...@googlegroups.com
Brett Kuehner wrote:
> 1) As far as I can tell, after I do a bitbake, like "bitbake
> console-image", the results are left in directories under the "tmp"
> subdir, and they appear to be intermixed with lots of intermediate build
> files. Is there a way to extract just the final product into a clean
> tree, or am I just not looking in the right place?

You can get rid of most of the disk usage by deleting the work directory (but
see below) I suspect that if you are done, stamps, pkgdata, and probably cache
are also unnecessary. You'll only need cross and staging if you want to build
things for it, and rootfs is is probably tar.gz'ed (or something) under deploy.
To simply use the files you only need deploy, to compile you need cross and
staging. So far as I understand it, anyway.

> 2) If I am building a different kernel (like MontaVista), using 'make'
> instead of 'bitbake', I can configure the kernel using "make gconfig" to
> edit the .config file. Is there a similar mechanism using bitbake, or do
> I need to edit the config files (which I think are stored as
> 'defconfig') by hand?
>
> 3) Is there an automatic way to extract the kernel source from bitbake
> into a tree that is buildable via the standard kernel build tools using
> "make", or is that not something that is designed to be possible?

Bitbake ends up using the standard kernel build process, it just copies a
completed .config file shipped along with the build recipe. My kernel files
are found under tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-*/git

In principal you can modify the config file as you normally would and rebuild.
You can use

bitbake -c compile -f linux
bitbake linux (or bitbake console-image to rebuild the whole thing)

Or if you want to build yourself, you can bitbake devshell to get a shell
script that can be source'd to provide OE environment variables and macros.
The result is in tmp/deploy/glibc/addons.

--
Justin Love

Creative Electronics & Software
650 Sundown Road
South Elgin, IL 60177

Phone (847) 695-0023
FAX (847) 695-0483

Brett Kuehner

unread,
Nov 20, 2008, 6:09:43 PM11/20/08
to beagl...@googlegroups.com
That was extremely helpful, thank you. I figured there must be a
kernel directory in there somewhere, but there was so much other
stuff that I wasn't able to find it. But the path you gave is just
what I needed.

Brett
--
Brett Kuehner
b...@pobox.com
http://www.bvk.nu

Reply all
Reply to author
Forward
0 new messages