I’m making a device which does a job and will then push the results down the OTG (acting as device). The idea is that the board boots up when the usb is connected to I need a fast boot. So I looked at a project which boots the board in about 5 seconds (http://code.google.com/p/swiftbeagle/) - this works fine but the system is a little lightweight (I thin kit is running Angstrom but I’m not sure). After this I’m a bit stuck; my idea is as follows:
Prep up a card with big fat Ubuntu on it
Compile all the code I need on this
Move all this code onto the lightweight system
Does this make sense here or am I barking up the wrong tree. I need to compile things like OpenCV and I’ll need Python on the lightweight system.
Reposes such as ‘no you idiot’ or ‘that’ll work’ would be appreciated - thanks ;).
Hello,
I'm making a device which does a job and will then push the results
down the OTG (acting as device). The idea is that the board boots up when
the usb is connected to I need a fast boot. So I looked at a project which
boots the board in about 5 seconds (Google Code Archive - Long-term storage for Google Code Project Hosting.) -
this works fine but the system is a little lightweight (I thin kit is
running Angstrom but I'm not sure). After this I'm a bit stuck; my idea is
as follows:
Prep up a card with big fat Ubuntu on it
Just a note, if your going to use the big fat Ubuntu, I'd really use
Maverick over Lucid on it.. (visual benchmark: my beagle's seem to
boot faster with maverick.. power on -> login prompt)
Compile all the code I need on this
Move all this code onto the lightweight system
Does this make sense here or am I barking up the wrong tree. I need to
compile things like OpenCV and I'll need Python on the lightweight system.
Reposes such as 'no you idiot' or 'that'll work' would be appreciated -
thanks ;).
I'm making a device which does a job and will then push the
results down the OTG (acting as device). The idea is that the board
boots up when the usb is connected to I need a fast boot. So I looked
at a project which boots the board in about 5 seconds
(Google Code Archive - Long-term storage for Google Code Project Hosting.) - this works fine but the system
is a little lightweight (I thin kit is running Angstrom but I'm not
sure). After this I'm a bit stuck; my idea is as follows:
* Prep up a card with big fat Ubuntu on it
* Compile all the code I need on this
* Move all this code onto the lightweight system
Does this make sense here or am I barking up the wrong tree. I need
to compile things like OpenCV and I'll need Python on the lightweight
system.
you should be able to cross-compile all that you need on your PC using
oe/angstrom. then you can start to make a stripped down image for your
fast booting sdcard.
IMPORTANT NOTICE: This message, including any attached documents, is
intended only for the use of the individual or entity to which it is
addressed, and may contain information that is privileged, confidential
and exempt from disclosure under applicable law. If the reader of this
message is not the intended recipient, or the employee or agent
responsible for delivering the message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify Ziath Ltd immediately by email at
info@ziath.com <mailto:info@ziath.com>. Thank you.
Does this make sense here or am I barking up the wrong tree. I need
to compile things like OpenCV and I’ll need Python on the lightweight
system.
you should be able to cross-compile all that you need on your PC using
oe/angstrom. then you can start to make a stripped down image for your
fast booting sdcard.
Yeah - I tried for about a week to cross compile OpenCV and Tesseract OCR and in the end gave up as it did things like statically point to the linker (which I had to hack in the make file) and so on. I’m not a Linux/C expert and am still learning - cross compiling seemed really difficult though I am learning more daily. On the other hand I compiled on the beagelboard and had that running in about 30 mins!
Just a note, if your going to use the big fat Ubuntu, I’d really use
Maverick over Lucid on it… (visual benchmark: my beagle’s seem to
boot faster with maverick… power on → login prompt)
Out of interest what is your boot time to the shell with Maverick; if I can use Ubuntu and it boots quickly it saves me needing to compile python on the minimal boot with all the libraries that I need.
you should be able to cross-compile all that you need on your PC using
oe/angstrom. then you can start to make a stripped down image for your
fast booting sdcard.
I’m stuck as to where to start here - the swift image looks good and simply stripping down an existing image doesn’t seem to work as there are CRC checks and so on. The swift image is really quick but anything I try to compile does not execute on the beagleboard - I think it is using a normal OpenEmbedded OS. Can I download build_essentials modules and just copy them across?
Does this make sense here or am I barking up the wrong tree. I need
to compile things like OpenCV and I'll need Python on the lightweight
system.
you should be able to cross-compile all that you need on your PC using
oe/angstrom. then you can start to make a stripped down image for your
fast booting sdcard.
Yeah - I tried for about a week to cross compile OpenCV and Tesseract OCR
and in the end gave up as it did things like statically point to the linker
(which I had to hack in the make file) and so on. I'm not a Linux/C expert
and am still learning - cross compiling seemed really difficult though I am
learning more daily. On the other hand I compiled on the beagelboard and
had that running in about 30 mins!
Cross-compiling is definitely the fastest way to build, but it makes
sense to me that you need more familiarity before you are ready to
take it on---and much of the experience of understanding
cross-compiling and embedded development in general will serve you
well in optimizing boot time. That said, I think there is a lot of
value to you and to other people in your circumstances to walk through
some experiments to improve your boot time and learn about the
behavior of your system.
What I'd encourage you to do is to *not* attempt to mix your build
flows. If you want to build natively, use something like Ubuntu and
work within their build flow to optimize what they build, simply
applying the *principles* of what is applied to other systems.
For example, swiftbeagle uses uclibc. Most of your Ubuntu
applications simply won't run with uclibc. If you start with trying
to get python running on uclibc, that will take you a while.
When it comes to applying the principles to improve boot time, be sure
to apply the Pareto principle
(Pareto principle - Wikipedia) first and foremost.
In other words, look for where you are wasting the most time in your
current boot process and spend your effort optimizing that. So, a
good profile is *always* your first step to optimization.
'dmesg' with kernel timestamps will give you a *lot* of information.
Connect up your serial port to capture the 'printk' statements. Look
for the largest delta times start asking questions (perhaps within
this thread) with posts of your kernel logs and asking why certain
activities take longer than others. Once you get those answers and
find out why, then you can strip them down.
What this will certainly miss is things like making the right choice
in tool chain and build settings that would impact most all
operations. Still, you have to go through the effort of getting rid
of the biggest time wasters at some point, so it doesn't hurt you to
hold off on some of those riskier changes until you've gotten rid of
the fluff first.