I agree it is not trivial to get started with OE, especially for non-developer people. The wiki getting started page - http://www.openembedded.org/wiki/GettingStarted - is an attempt to give the minimal instruction set to get started. If you think there is an error, feel free to ask on the #oe IRC channel or even better if you are sure, update the wiki page yourself :-)

There is basically 3 steps to get started with OE:

1. Installation of bitbake+OE
2. Setting up your configuration file (the local.conf file)
3. Building packages and/or images

Step 1 can be easily done with the little script I wrote and intensively use. (see attachement).
This script is aimed to install bitbake+OE and to uptate bitbake/OE as well.
It basically perform all the step described in the wiki GettingStarted page, ie.:
 - install the bitbake release you need
 - download, check and unzip the OE database file (OE.db)
 - update the OE database and metadata.
To use the script, just run:
./setup.sh

Then, if you run again the script it will just update the OE database and metadata.

Step 2 require you to read and fill the local.conf file (see the documented local.conf.sample provided in org.openembedded/conf) Christopher, I think it is a bad idea to provide one script that try to make the three steps at once. Why setting up variables in a script that set up the local.conf variables ? Why not simply fill the local.conf file directly ? I think it is more flexible to split install/update script (that anyone can use) with the local.conf (user specific) Well, reading my script you might ask: why don't you set the BBPATH and PATH ? Again I want it to be flexible. OE developers often use more than one build directory. What I suggest (and personally use) is a little setup-env.sh script (in the build directory):

#!/bin/sh
export PATH=/home/cyril/OpenEmbedded/bitbake/bin:$PATH
export BBPATH=/home/cyril/OpenEmbedded/build:/home/cyril/OpenEmbedded/org.openembedded.dev/

Step 3 is as easy as 'bitbake nano', 'bitbake bootstrap-image' so I think no script is required to do it. Christopher, if you still want to have one script that do all the steps, then I suggest you to save your local.conf file and just call a little script like:

#!/bin/sh
./setup.sh
cp mylocal.conf build/conf/local.conf
cd build
./setup-env.sh
bitbake bootstrap-image

Hope it help.

 Cyril


Tim Bird wrote:
Christopher Lang wrote:
to simplify the setup of a new OE toolchain (->Getting started...) and to
save some time I wrote a script which automates this process.

I thought that some of you guys might find it useful. It is sure not perfect
but does its job, maybe it is worth to put it in the wiki.

I had a few problems with it.  I'm running on Mandrake 10, behind a corporate
firewall.  Here's what I encountered:

1) I had to strip \r's from the file before it would run:
[]$ ./bootstrap-oe.sh
: bad interpreter: No such file or directory

My solution:
   perl -pi -e 's/\r\n/\n/;' bootstrap-oe.sh

2) There was a problem downloading the OE snapshot:
[]$ ./bootstrap-oe.sh
Started bootstrapping OE at Thu Jun  8 14:23:14 PDT 2006
--14:23:14--  http://ewi546.ewi.utwente.nl/OE/OE-20060522.tar.bz2
           => `OE-20060522.tar.bz2.1'
Resolving www-west.sony.com... 160.33.66.102
Connecting to www-west.sony.com[160.33.66.102]:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: 17,644,366 [application/x-tar]

100%[==========================================>] 17,644,366   101.81K/s    ETA 
00:00

14:26:06 (100.62 KB/s) - `OE-20060522.tar.bz2.1' saved [17644366/17644366]


bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error exit delayed from previous errors
--------------
I tried bootstrap-oe.sh a second time and this time the image appeared to be OK.

 3) I can't use subversion from inside my firewall
svn: Can't connect to host 'svn.berlios.de': Connection refused
--------

After this, the kernel downloaded and configured OK (I think),
but then I got these errors (certainly as cascades from the
above failures):

cp: cannot stat `org.openembedded.dev/conf/local.conf.sample': No such file or 
directory
sed: can't read build/conf/local.conf.original: No such file or directory
ln: creating symbolic link `openembedded/conf/distro/i586-OE-DISTRO.conf' to 
`../../../distro/i586-OE-DISTRO.conf': No such file or directory
ln: creating symbolic link `openembedded/conf/machine/i586-OE-MACHINE.conf' to 
`../../../machine/i586-OE-MACHINE.conf': No such file or directory
ln: `packages/linux': File exists
ln: `packages/file': File exists
./bootstrap-oe.sh: line 337: bitbake: command not found
Done at Thu Jun  8 14:28:15 PDT 2006
--------------------

The following is not directed at you, Christopher.
Thanks for providing this script.
I've been walking through the tutorial and user documentation for OE for
the last day and a half, and it's quite difficult.  Your script looks like
it would help a lot, if it worked (no joke intended).

<rant>
Can anyone tell me why a snapshot of bitbake isn't included in OE?
Or why isn't there a tar release of it lying around?
Is every user of bitbake expected to be a developer of it?
The dependency of OE on subversion, for users, is pretty weird IMHO.

It looks like monotone is no longer required.  This is good.
I spent a frustrating 4 hours yesterday downloading, configuring and installing
boost and monotone, and pre-requisites.  Holy cow is boost a pain!
It doesn't even use makefiles for building, but rather it's own
abomination that you have to build first.  I know I'm on a backward
distro, but sheesh!

One quick note on the tutorial.  It often stops just after some vital
piece of information has left the screen, and it has no 'back' button.
I had to re-run it several times, and copy stuff onto paper quickly
in order to extract information from it that I wanted to think about
or use.
</rant>

Despite my complaining, thanks to those who are working on stuff
like the tutorial and on this bootstrap install program.  Things
are better than they were when I tried OE a year ago and gave up
because it was too difficult.  I'm working on using OE in the
CELF test lab, as the base for the test distribution used there.
A contractor was able to get things working there, but he also
complained about the rather high hurdle to get started with
OE.

I hope the feedback is helpful.  BTW, I have funding I can
throw at the task if someone is willing to do contract work
to create an idiot-proof installer (this script is a good
start but it needs to be a bit more robust).  If anyone is
interested in discussing the details of this, please contact
me.

Regards,
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================

_______________________________________________
Oe mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/oe


Attachment: setup.sh
Description: application/shellscript

_______________________________________________
Oe mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/oe

Reply via email to