Yocto Reference Manual

Add to My manuals
44 Pages

advertisement

Yocto Reference Manual | Manualzz

6 Working with Poky and Bitbake

Working with Poky and Bitbake

6.1 Start the Build

After you downloaded all the meta data with phyLinux init, you have to set up the shell environment variables. This needs to be done every time you open a new shell for starting builds. We use the shell script provided by Poky in its default configuration. From the root of your project directory type: source sources/poky/oe‐init‐build‐env 

The abbreviation for the source command is a single dot.

. sources/poky/oe‐init‐build‐env 

The current working directory of the shell should change to build/ and you are now ready to build your first image. We suggest to start with our hardware bring-up image to see if everything is working correctly. If you want, you can separate the download process from the compile process to identify problems of your internet connection. With bitbake ‐c fetchall phytec‐hwbringup‐image  all external source repositories get pulled into the download directory. With du ‐sh <DL_DIR>  you can see what the download volume was. Now start the compile process. bitbake phytec‐hwbringup‐image 

The first compile process takes about 40 minutes on a modern Intel Core i7. All subsequent builds will use the filled caches and should take about 3 minutes.

6.2 Images

If everything went fine, the images can be found under: cd deploy/images/<MACHINE> 

The easiest way to test your image is to jumper your board for booting from SD card and to flash the build image to the SD card: sudo dd if=phytec‐hwbringup‐image‐<MACHINE>.sdcard  of=/dev/<your_device> bs=1MB conv=fsync 

Here <your_device> could be "sde" for example, depending on your system.

Be very careful when selecting the right drive! Selecting the wrong drive can erase your hard drive!

The parameter conv=fsync forces a data buffer write to the device before dd returns.

© PHYTEC Messtechnik GmbH 2015 L-813e_2 13

advertisement

Related manuals