Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Building Yocto Linux Image

anilskeshavamurthy edited this page Feb 6, 2014 · 8 revisions

####Prerequisites

  1. A fairly decent build system with latest Linux distribution. I used Ubuntu 12.04.
    • Development tools, GCC compiler, etc are installed. Also you'll also need 7zip utility.

sudo apt-get install build-essential p7zip-full ``` * 100GB or so available space on the hard drive. * Fairly fast Internet connection. It is going to download all the sources required for the image from the Internet.

####Steps for Building Yocto Linux from Sources

  1. Create a directory you'll be using for the build process. Do not use spaces in the directory name. Yocto doesn't like them.
  2. Download "Board Support Package Sources for Intel Quark" from https://communities.intel.com/community/makers/software/drivers. And copy it to your build directory. In my case the file was named Board_Support_Package_Sources_for_Intel_Quark_v0.7.5.7z.
  3. Unzip the file:

7z x Board_Support_Package_Sources_for_Intel_Quark_v0.7.5.7z 4. Unzip meta-clanton_v0.7.5.tar.gz: Shell tar xzvf Board_Support_Package_Sources_for_Intel_Quark_v0.7.5/meta-clanton_v0.7.5.tar.gz ```

  1. Change directory to meta-clanton_v0.7.5:

cd meta-clanton_v0.7.5 6. Run setup.sh: Shell ./setup.sh ```

  1. Source poky/oe-init-build-env script, giving it the build directory (yocto_build) as a parameter:

source poky/oe-init-build-env yocto_build ```

  1. Run bitbake to build the image:

bitbake image-full

       * Note: image-full - SD card image, image-spi - SPI flash image.
9.	Wait several hours, and if everything goes well you'll get your image in tmp/deploy/images/ directory. It will include:
     * The Linux kernel: bzImage--3.8-r0-clanton-YYYYMMDDhhmmss.bin (YYYYMMDDhhmmss - timestamp indicating the build start time)
     * Initial RAM FS: core-image-minimal-initramfs-clanton-YYYYMMDDhhmmss.rootfs.cpio.gz
     * File system image: image-full-clanton-YYYYMMDDhhmmss.rootfs.ext3
     * Kernel modules: modules--3.8-r0-clanton-YYYYMMDDhhmmss.tgz (not really needed, they are already in the file system image)
     * Grub configuration: boot/grub/grub.conf
10.	Copy these files to SD card renaming files as follows (resulting paths are relative to SD card's root):
     * bzImage--3.8-r0-clanton-YYYYMMDDhhmmss.bin -> bzImage
     * core-image-minimal-initramfs-clanton-YYYYMMDDhhmmss.rootfs.cpio.gz -> core-image-minimal-initramfs-clanton.cpio.gz
     * image-full-clanton-YYYYMMDDhhmmss.rootfs.ext3 -> image-full-clanton.ext3
     * boot/grub/grub.conf -> boot/grub/grub.conf
       * Note that you can keep names or use different names for all files except of the image-full-clanton.ext3, and just update grub.conf with the correct names. The file system image must be named image-full-clanton.ext3 (initramfs will look for that) unless you update the configuration.

11.	Insert SD card to your Galileo board, reboot it, and enjoy!
Clone this wiki locally