The following information covers an experimental version of live-build 3. Please keep that in mind!
This guide is meant to quickly get you started building your own linaro arm images. Unlike the normal live build, this new version allows you to use some other hardware architecture such as intel on which to run the build. This can be advantageous since intel hardware tends to have better IO than arm boards with SD.
This new version of live helper will run natively on intel and produce arm images which when combined with linaro-media-create to copy onto SD or whatever might be appropriate. In a future version, I do plan to be able to create a DD'able image.
Builds take time and storage, you'll want plenty of storage and a reasonable net connection. My lenovo laptop will produce a build in about 1/2 the time it would take to do the same build on my Panda board. Questions? firstname.lastname@example.org or seek out tgall_foo or Dr_Who on irc.linaro.org or irc.freenode.net.
Live Build 3
You want the experimental Linaro version of live-build3. Other versions will NOT work at this time. Eventually this tool will be found in ppa:linaro-maintainers/tools but not yet.
- Obtain the debs via ppa:linaro-foundations/cross-build-tools
- or get the source directly from bzr:~tom-gall/live-build/live-build-cross
Live Build Config Part 1
Once you have live-build installed, you'll need a config. The cross configs are NOT the same as the native configs. While these two might merge in time, this is not the case currently. You'll want to put this somewhere you have plenty of disk space since your image building will occur there.
There are several configs already available at : http://code.launchpad.net/~tom-gall
- (does not work yet) lp:~tom-gall/linaro/live-build.crossconfig.natty.ubuntu-desktop
Make a build directory
mkdir bld ; cd bld
bzr branch lp:~tom-gall/linaro/live-build.crossconfig.natty.alip config
Seeds + Meta Packages
These next two steps, linaro.natty and Linaro-meta are optional.
You may want to modify the collection of packages that are installed as part of the build. This is a two step process.
First download the seeds bzr branch lp:linaro-seeds linaro.natty. cd into the linaro.natty directory and edit the seed that you're interested in. Remember that packages without parens ( ) around them are required packages and packages names with ( foomatic-package ) around them are recommended.
Seeds list the named packages you want in your image. Seeds can include other seeds.
You can test your seed with germinate.
germinate -S file:///path-to-your-linaro.natty-dir/ -s linaro.natty -m http://ports.ubuntu.com/ubuntu-ports/ -d natty,natty-updates -a armel -c main,universe
If germinate indicates there are no issues, commit your change with bzr commit -m "your commit message about what you added"
Now we're going to create the meta package. The meta package is a .deb when installs causes all of the named packages to be installed.
First if you don't have it already obtain the latest linaro-meta package from the linaro-maintainers overlay PPA on launchpad.
Visit http://launchpad.net/~linaro-maintainers/. Click on the Linaro Overlay PPA. Click on view package details link which at the beginning of the package list, right. Click to expand Linaro-meta. Download the .dsc and the tar.gz file for linaro-meta.
untar/compress and then edit update.cfg. Look for the instance of "seed_base:" in the "[natty/bzr]" section. Change this to point to where you linaro.natty directory is located so something like: seed_base: file:///path-to-your-linaro.natty-dir/ then save and exit your editor.
Then run ./update.
Presuming there's no error messages you need to deal with, time to build the meta package.
Live Build Config Setup Part 2
Ok nearly there.
cp config/conf_create.sh .
cp -r config/chroot_sources .
- If there are .debs that you need to include in your build (such as the ones might have created in the optional Linaro-meta step) you'll put a copy of them into the config/chroot_local-packages directory.
- If you would like to run a script to customize the image in some fashion, you can put that script into config/chroot_local-hooks. Be careful that any tools you might need will be part of the image install.
If you change anything in conf_create.sh rerun it. sh ./conf_create.sh # (Feel free to look at it ahead of time and potentially change something, most things are fairly obvious)
Now you're ready.
lb clean --all; lb clean --cache; lb build
If the build falls over for some reason after you've fixed whatever it is that went ker-blewey, be sure to do both clean steps.
If the build succeeds, you'll end up with a binary-tar.tar.gz file in the topmost directory. This is the file that linaro-media-create uses for image creation. See http://wiki.linaro.org/Source/ImageInstallation
LiveHelper/Cross (last modified 2011-10-13 18:48:51)