Build the image - alan-mushi/meta-opencpn GitHub Wiki

It's about time to build ! Don't worry if the first build is extremely long it's perfectly normal. Start to go in your "build target" directory. To build i will expose the walk-through with bitbake, this program runs in the command line, but you can do it also with hob which has a graphical interface. There is more about hob here.

You may need to adapt the keymap_layout variable in meta-opencpn/recipes-opencpn/config/config-image-opencpn/weston.ini to suits your needs : the default layout is french.

Fetch source code

Let's start by retrieve all sources (you won't need internet anymore after this) :

poky/thinkpad$ bitbake -k -c fetchall core-image-opencpn

This command does the following :

  • -k Continues as much as possible after an error
  • -c Executes only the specified task (in this case fetchall)
  • core-image-opencpn The image of which we retrieve the source code. An image is the recipe to make our distribution basically. You can find the details about how an image is built in the next pages of this wiki.

You can find all bibake's options with this command within the "build target" directory : bitbake -c listtasks core-image-opencpn.

Build time !

When you have all your sources it's time to build :

poky/thinkpad$ time bitbake -k core-image-opencpn
Loading cache: 100% |###################################################################| ETA:  00:00:00
Loaded 1182 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.19.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "openSUSE-project-12.3"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "chiefriver"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4+snapshot-20130705"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:8a186a6b3853fc1a7dcf342d421c8926c38949c9"
meta-intel        
meta-chiefriver   = "master:e7f77e4dc4490a10a597d3da7e85d6650ccb6fc3"
meta-opencpn      = "master:7bc0df45d0191d6636731fe16acad0e0ff0dd6b2"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: validating kernel config, see log.do_kernel_configcheck for details
NOTE: Tasks Summary: Attempted 4181 tasks of which 777 didn't need to be rerun and all succeeded.

real	73m55.660s
user	430m0.997s
sys	45m29.614s

If this operation causes you warnings or errors, you probably can find a solution with a quick search on a search engine or asking on IRC.

Try out the image


The following commands will overwrite the content of your USB key. Do this before : You may need to change the image name or path. You also have to be very careful about the USB key's name. To detect what is the name of the USB key you just plugged in :

$ dmesg |tail
[21875.267310] sd 7:0:0:0: [sdb] Write Protect is off
[21875.267314] sd 7:0:0:0: [sdb] Mode Sense: 21 00 00 00
...

You can read the name of the USB between the square brackets. Some distributions auto mount devices, if this is your case, you will have to unmount the device.


To test the image generated by the previous step you need a usb key.th We will write the .hddimg onto the USB key with this command :

poky/thinkpad$ sudo dd if=tmp/deploy/images/core-image-opencpn-chiefriver.hddimg of=/dev/sdb

This method will also work with the .ext3 and the .iso files (among much more).

You now have to boot on the USB key of your target and that's it... (You should see a minimal Weston session). If you want to try out the examples of weston (the wayland compositor), reach the terminal (top left) and type one of theses commands :

flowers
smoke
dnd
image /usr/share/weston/pattern.png
...

Want some details ?

Now that you have a basic image working, let's give details about how it works...


Previous step : Requirements
Next step : meta-opencpn in details

⚠️ **GitHub.com Fallback** ⚠️