Support #618
Updated by Daniel Curtis over 9 years ago
{{>toc}} This is a guide for creating a Yocto linux image on Ubuntu 12.04. h2. Prepare the Environment * Make sure the system is up to date: <pre> sudo apt-get update && sudo apt-get upgade </pre> * Install a few prerequisite packages: <pre> sudo apt-get install apt-get install gawk wget git bitbake diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm parted </pre> h2. Download the Source Code * Create a directory for the source code: <pre> mkdir ~/git && cd ~/git </pre> * Get the latest IoT Yocto Development Kit: <pre> git clone -b devkit-daisy git://git.yoctoproject.org/meta-intel-iot-devkit iotdk cd iotdk </pre> * Source the @iot-devkit-init-build-env@ script: <pre> source iot-devkit-init-build-env </pre> h2. Build the Yocto Image * Run bitbake to build iot-devkit-image: <pre> bitbake iot-devkit-image </pre> #* *NOTE*: There are many types of image targets for bitbake to use, such as: <pre> iot-devkit-image iot-devkit-prof-dev-image iot-devkit-prof-image iot-devkit-spi-image </pre> *# *iot-devkit-image*: A fully functional image to be placed on an SD card *# *iot-devkit-prof-dev-image*: A fully functional image to be placed on an SD card with full profiling and dev tools *# *iot-devkit-prof-image*: A fully functional image to be placed on an SD card with full profiling *# *iot-devkit-spi-image*: A small image capable of fitting into the on-board SPI flash * Fix the grub bitbake source: <pre> nano ~/git/iotdk/meta-quark-bsp/recipes-bsp/grub/grub_0.97.bb </pre> #* And the SRC_URI to the following: <pre> SRC_URI = "git://github.com/intel-iot-devkit/grub-fedora.git" </pre> * (Optional) To use the Hob GUI to assist in building, run: <pre> bitbake -u hob </pre> h3. Deploy the Yocto Image * Use wic to create a bootable micro SD image: <pre> ~/git/iotdk/scripts/wic create -e iot-devkit-image ~/git/iotdk/scripts/lib/image/canned-wks/iot-devkit.wks </pre> * Write the image using dd: <pre> sudo dd if=/var/tmp/wic/build/iot-devkit-201506161028-mmcblkp0.direct of=/dev/mmcblk0 bs=1M sudo sync </pre> *NOTE*: Make sure to update the timestamp for the image in @/var/tmp/wic/build/@ h2. Connect Over Ethernet * Once the micro SD card is inserted into the Galileo, plug a network cable to a network with DHCP and look for the host named "quark". Log in as root: <pre> ssh root@quark </pre> #* *NOTE*: Make sure to set a root password: <pre> passwd </pre> h2. Resources * https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board-using-split-layers * http://www.yoctoproject.org/docs/1.7.1/mega-manual/mega-manual.html * http://www.yoctoproject.org/docs/1.7.1/bsp-guide/bsp-guide.html * http://www.yoctoproject.org/docs/1.7.1/bitbake-user-manual/bitbake-user-manual.html * http://wiki.ros.org/IntelGalileo/HydroGalileoInitialInstall * http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage * https://www.yoctoproject.org/downloads * http://layers.openembedded.org/layerindex/branch/master/layer/meta-intel-iot-devkit/