help needed for bitbake

Hi All,

I am pretty new for bitbake. But I am really interested in to make it
working for my beagleboard C4.
I have a PC running Ubuntu 9.10. I know that I am not a very good
cook. So I tried to follow the instructions
here very closely.

http://wiki.openembedded.org/index.php/OEandYourDistro

and here

http://wiki.openembedded.org/index.php/Getting_Started

I first did this:

aptitude install sed wget cvs subversion git-core \
   coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \
   gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ \
   desktop-file-utils

apt-get install libxml2-utils xmlto python-psyco

and linked by /bin/sh to bash

So far so good.
But when I type this

update-alternatives --config git

Ubuntu says: "update-alternatives: error: no alternatives for git." It
might only be needed for Debian

Then I try to do this:
$ mkdir -p /stuff/build/conf

Apparently this is not possible. So I do this instead
mkdir -p stuff/build/conf

Hope it would work.

cd stuff
wget http://download.berlios.de/bitbake/bitbake-1.8.18.tar.gz
tar xzf bitbake-1.8.18.tar.gz
I then addit to ./profile for path
vi ~/.profile
add:
export BBPATH=/home/everett/stuff/build:home/everett/stuff/openembedded
export PATH=/home/everett/stuff/bitbake/bin:$PATH
checkout OE:
git clone git://git.openembedded.org/openembedded

cd openembedded
git pull
I also copy and edited my local version of conf file in building/conf/local.conf
added the entries:
BBFILES = "/home/everett/stuff/openembedded/recipes/*/*.bb"
DISTRO = "angstrom-2008.1"
MACHINE = "beagleboard"

The problem happens when I try to bake something:
cd build
bitbake nano

it ran well until it tried to install a man page to my PC:
....
nssl-native-0.9.8m-r11.1/openssl-0.9.8m/apps'

make[1]: Nothing to be done for `all'.
make[1]: Leaving directory

`/home/everett/stuff/build/tmp/work/i686-linux/openssl-native-0.9.8m-r11.1/openssl-0.9.8m/apps'

installing man1/CA.pl.1ssl
/bin/sh: line 6: /usr/share/man/man1/CA.pl.1ssl: Permission denied
make: *** [install_docs] Error 1
FATAL: oe_runmake failed

NOTE: Task failed:
/home/everett/stuff/build/tmp/work/i686-linux/openssl-native-0.9.8m-r11.1/temp/log.do_stage.14319
ERROR: TaskFailed event exception, aborting
ERROR: Build of
/home/everett/stuff/openembedded/recipes/openssl/openssl-native_0.9.8m.bb
do_populate_staging failed
ERROR: Task 450
(/home/everett/stuff/openembedded/recipes/openssl/openssl-native_0.9.8m.bb,
do_populate_staging) failed
NOTE: Tasks Summary: Attempted 137 tasks of which 0 didn't need to be
rerun and 1 failed.
ERROR: '/home/everett/stuff/openembedded/recipes/openssl/openssl-native_0.9.8m.bb'
failed

I also tried to bake something else:
bitbake -b ../openembedded/recipes/u-boot/u-boot_git.bb

It also failed with this
...
NOTE: Running task 7 of 18 (ID: 9,
/home/everett/stuff/openembedded/recipes/u-boot/u-boot_git.bb,
do_compile)
ERROR: function do_compile failed
ERROR: log data follows
(/home/everett/stuff/tmp/work/beagleboard-angstrom-linux-gnueabi/u-boot-2009.11-rc1+r43+gitra5cf522a91ba479d459f8221135bdb3e9ae97479-r43/temp/log.do_compile.20397)

NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- omap3_beagle_config
Configuring for omap3_beagle board...
NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- all
make: arm-angstrom-linux-gnueabi-gcc: Command not found
/bin/sh: arm-angstrom-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.

...

It needs a cross compiler?

Can someone help me here?

Thanks,

Everett

You need to let OE/bitbake do some work here - when you use "-b recipe",
it skips all of the dependency checking. In particular, the dependencies
on the cross compiler, etc.

Try something like this first:
   % bitbake console-image

If you want something stable, but slightly outdated, use http://www.angstrom-distribution.org/building-angstrom

If you want to track the bleeding edge, use http://gitorious.org/angstrom/angstrom-setup-scripts

regards,

Koen

Thanks Gary,

I just tried this:

everett@Quad:~/stuff/build$ bitbake console-image
It has a similar failure mode:

......

make[1]: Nothing to be done for `all'.
make[1]: Leaving directory

`/home/everett/stuff/build/tmp/work/i686-linux/openssl-native-0.9.8m-r11.1/openssl-0.9.8m/ssl'

making all in apps...
make[1]: Entering directory

`/home/everett/stuff/build/tmp/work/i686-linux/openssl-native-0.9.8m-r11.1/openssl-0.9.8m/apps'

make[1]: Nothing to be done for `all'.
make[1]: Leaving directory

`/home/everett/stuff/build/tmp/work/i686-linux/openssl-native-0.9.8m-r11.1/openssl-0.9.8m/apps'

installing man1/CA.pl.1ssl
/bin/sh: line 6: /usr/share/man/man1/CA.pl.1ssl: Permission denied
make: *** [install_docs] Error 1
FATAL: oe_runmake failed

NOTE: Task failed:
/home/everett/stuff/build/tmp/work/i686-linux/openssl-native-0.9.8m-r11.1/temp/log.do_stage.16382
ERROR: TaskFailed event exception, aborting
ERROR: Build of
/home/everett/stuff/openembedded/recipes/openssl/openssl-native_0.9.8m.bb
do_populate_staging failed
ERROR: Task 729
(/home/everett/stuff/openembedded/recipes/openssl/openssl-native_0.9.8m.bb,
do_populate_staging) failed
NOTE: Tasks Summary: Attempted 129 tasks of which 129 didn't need to
be rerun and 1 failed.
ERROR: '/home/everett/stuff/openembedded/recipes/openssl/openssl-native_0.9.8m.bb'
failed
everett@Quad:~/stuff/build$

I think OE still want to install the compiled application to this PC, instead
make a package for beagleboard.

Everett

why don’t you try stable version of Angstrom? It compiles like 1,2,3…
http://www.angstrom-distribution.org/building-angstrom

2010/3/29 Everett Wang <everteq@gmail.com>

OK. Now I am trying the stable version of the BB. This is the procedure
I used:

export OETREE="${HOME}/OE"
mkdir -p ${OETREE} && cd ${OETREE}
git clone git://git.openembedded.org/openembedded.git openembedded
git checkout origin/stable/2009 -b stable/2009
git pull

downloaded source-me.txt to /home/everett/OE
(${OETREE} = /home/everett/OE for me)
cd OE
mkdir -p build/conf
cp openembedded/contrib/angstrom/local.conf build/conf/
cd build/conf
vi local.conf
add MACHINE = "beagleboard"
cd OE
source source-me.txt
git pull --rebase

Still no problem yet. But when I do

$ bitbake base-image

everett@Quad:~/OE/openembedded$ bitbake base-image
ERROR: Openembedded's config sanity checker detected a potential
misconfiguration.
  Either fix the cause of this error or at your own risk disable the
checker (see sanity.conf).
  Following is the list of potential problems / advisories:

  /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with
qemu so please fix the value (as root).

To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.

Any idea what is the problem?

Everett

Just add vm.mmap_min_addr = 0 at the bottom of /etc/sysctl.conf. and restart your computer.
Then, /proc/sys/vm/mmap_min_addr is going to be set to 0.

$sudo gedit /ect/sysctl.conf

add; vm.mmap_min_addr = 0 and save
Restart
$ source source-me.txt in OE_BASE
$ bitbake base-image

Jooil

2010/3/30 Everett Wang <everteq@gmail.com>

Hi All,

Thanks for the help. Now my OE is cooking, Oh, baking. :smiley:

I issued a "bitbake base-image" in build directory.

It has finished reporting zero failure and I can see it has generated a
rootfs system under my OE/angstrom-dev. So all I have to do is tar it and
mv to my flash and untar, right?

Everett

Hi All,

Thanks for the help. Now my OE is cooking, Oh, baking. :smiley:

I issued a "bitbake base-image" in build directory.

It has finished reporting zero failure and I can see it has generated a
rootfs system under my OE/angstrom-dev. So all I have to do is tar it and
mv to my flash and untar, right?

No, look in tmp (which maybe is angstrom-dev?) for deploy/images ....
I forget the exact path, but you should find a tar ball there that you
can untar onto the SD card. You will need to untar as root to preserve
file ownership and permissions. Be careful when you do this.

Philip

Hi Philip,

Thanks for the help. I think I have looked all the directories and
subdirectories and still can't find a tar ball for my newly baked
base-image. It got to be somewhere right? Can any one tell me
where is it?

Thanks,

Everett

${OETREE}/angstrom-dev/deploy/glibc/images/beagleboard

  • u-boot-beagleboard.bin

  • uImage-beagleboard.bin

  • console-image-beagleboard.tar.bz2

  • x11-image-beagleboard.tar.bz2

  • modules-2.6.XX-XX-beagleboard.tgz

2010/3/31 Everett Wang <everteq@gmail.com>

Hi Maxim,

You are totally correct. Yes, they are all there. :smiley:

Now I want to try something more. I want to change a file
in kernel and redo the process to enable SPI3 on my
daughterboard. I did find the kernel in
~/OE/angstrom-dev/staging/beagleboard-angstrom-linux-gnueabi/kernel/arch/arm
/mach-omap2/mux.c. I suppose after I edited the mux.c file, I
can issue the same command to bitbake my x11-image and
expect BB to use my newly edited mux.c file?

Thanks a lot.

Everett

I don’t think so. Building Angstrom is more complex as it can seem. I’m pretty sure that if you issue any command regarding rebuild bitbake will unpack a kernel again and will simply overwrite your changes. You better create your own patch for the kernel and integrate into bb file. Then it will 100% work

2010/3/31 Everett Wang <everteq@gmail.com>

Maxim Podbereznyi <lisarden@gmail.com> [2010-04-02 11:50:31]:

I don't think so. Building Angstrom is more complex as it can seem. I'm
pretty sure that if you issue any command regarding rebuild bitbake will
unpack a kernel again and will simply overwrite your changes. You better
create your own patch for the kernel and integrate into bb file. Then it
will 100% work

You can run either 'bitbake -f -c compile virtual/kernel' or you can just run
manually run.do_comile* script in your tmp/work/beagle*/kernel/temp/
directory.

-- ynezz