How do I use bitbake to cross compile this simple program for beagleboard? -
i trying understand how compile programs run on beagle board. need compile complex programs run in fedora, understanding how use open embedded , bitbake has proved troublesome. think there have been significant changes openembedded , directory structure of oe installation doesn't match finding elsewhere online far tutorials , how-tos go.
i followed directions here setting oe-core, gave me following directory structure:
[user@localhost ~]$ ls oe-core -al total 52 drwxr-xr-x 9 user user 4096 may 13 13:31 . drwx------. 31 user user 4096 may 13 12:56 .. drwxr-xr-x 9 user user 4096 may 10 11:52 bitbake drwxrwxr-x 8 user user 4096 may 13 13:36 build drwxr-xr-x 8 user user 4096 may 13 13:33 .git -rw-r--r-- 1 user user 165 may 10 11:51 .gitignore -rw-r--r-- 1 user user 545 may 10 11:51 license drwxr-xr-x 21 user user 4096 may 10 11:51 meta drwxr-xr-x 4 user user 4096 may 10 11:51 meta-hob drwxr-xr-x 6 user user 4096 may 10 11:51 meta-skeleton -rwxr-xr-x 1 user user 1592 may 10 11:51 oe-init-build-env -rw-r--r-- 1 user user 495 may 10 11:51 readme drwxr-xr-x 8 user user 4096 may 10 11:51 scripts
i've tried boil down ultra-simplistic start. if can figure out how bitbake simple program leaps , bounds ahead of am.
#include <stdio.h> void main(int argc, char* argv[]) { printf("hello world.\r\n"); }
i'm finding openembedded website immature of use. example, found this page doesn't tell me files should contain contents shown , has nothing more 'todo' marked in of sections.
so if has experience using bitbake, pointers on how cross-compile simple program helpful. recipe files go? how invoke them bitbake? thanks.
i've found yocto project documentation more current openembedded documentation. in particular, recommend:
i created simple recipe test out, , might you. put recipe in own meta layer. in example, new meta layer in oe-core directory (next meta, meta-skeleton, etc.). set meta layer others. recipe's directory structure looks this:
$ ls -al uinput-test/ drwxrwxr-x 2 me me 4096 apr 24 09:45 files -rwxr--r-- 1 me me 321 apr 24 11:33 uinput-test_1.0.bb
the source code (uinput.c) in files directory. recipe looks this:
description = "uinput test" pr = "r0" license = "closed" rm_work_exclude += "uinput-test" src_uri = "file://uinput.c \ " do_compile() { ${cc} ${cflags} ${ldflags} ${workdir}/uinput.c -o uinput-test } do_install() { install -m 0755 -d ${d}${bindir} install -m 0755 ${s}/uinput-test ${d}${bindir} }
Comments
Post a Comment