Changes between Version 3 and Version 4 of Yocto/SDK


Ignore:
Timestamp:
01/15/2018 05:54:41 PM (7 years ago)
Author:
Tim Harvey
Comment:

convert restored html to wiki markup

Legend:

Unmodified
Added
Removed
Modified
  • Yocto/SDK

    v3 v4  
    1 {{{#!html
    2        
    3           <div id="wikipage" class="trac-content"><p>
    4 </p><div class="wiki-toc">
    5 <ol>
    6   <li>
    7     <a href="#YoctoSoftwareDevelopmentKitSDK">Yocto Software Development Kit (SDK)</a>
    8     <ol>
    9       <li>
    10         <a href="#UsingtheSDK">Using the SDK</a>
    11       </li>
    12     </ol>
    13   </li>
    14 </ol>
    15 </div><p>
    16 </p>
    17 <h1 id="YoctoSoftwareDevelopmentKitSDK">Yocto Software Development Kit (SDK)</h1>
    18 <p>
    19 Gateworks provides a Software Development Kit (SDK) compatible with the Yocto Board Support Package (BSP).  This SDK provides a cross-toolchain and libraries compatible with the gateworks-gui-image that we provide as a pre-built downloadable disk image so that you can build applications that will run on top of Yocto installed on a Ventana board without having to have build the entire BSP yourself.
    20 </p>
    21 <ul><li><strong>Note</strong> - <em>for compiling on the Ventana SBC itself, follow instructions here: <a class="wiki" href="/wiki/Yocto/NativeCompile">Native Compiling - SDK</a></em>
    22 </li></ul><p>
     1[[PageOutline]]
     2
     3= Yocto Software Development Kit (SDK) =
     4Gateworks provides a Software Development Kit (SDK) compatible with the Yocto Board Support Package (BSP). This SDK provides a cross-toolchain and libraries compatible with the gateworks-gui-image that we provide as a pre-built downloadable disk image so that you can build applications that will run on top of Yocto installed on a Ventana board without having to have build the entire BSP yourself.
     5 * Note - for compiling on the Ventana SBC itself, follow instructions here: [wiki:Yocto/NativeCompile Native Compiling - SDK]
     6
    237Cross Compile SDK Downloads:
    24 </p>
    25 <ul><li><a class="ext-link" href="http://blog.gateworks.com/?wpdmpro=ventana-yocto-2-3-1-sdk-20170830-sh"><span class="icon">​</span>Yocto 2.3.1 SDK</a> - (sha256sum: b60308cdb1653727054cdb09ef06300d163c283a4128ab57953f69a5dcdae509)
    26 </li><li><a class="ext-link" href="http://blog.gateworks.com/?wpdmpro=ventana-yocto-1-8-2-sdk-20160328-1730-sh"><span class="icon">​</span>Yocto 1.8.2 SDK</a> - (sha256sum: 9dd9b5a2174ad139ccd566596e5ede83071665b5c00d47c9cfab9fa88d88ba8f)
    27 </li></ul><p>
    28 You can build your own SDK compatible with a filesystem image of your choice using information <a class="wiki" href="/wiki/Yocto/Building#BuildingatoolchainandorSDK">here</a>.
    29 </p>
    30 <h2 id="UsingtheSDK">Using the SDK</h2>
    31 <p>
     8 * ​[http://blog.gateworks.com/?wpdmpro=ventana-yocto-2-3-1-sdk-20170830-sh Yocto 2.3.1 SDK] - (sha256sum: b60308cdb1653727054cdb09ef06300d163c283a4128ab57953f69a5dcdae509)
     9 * ​[http://blog.gateworks.com/?wpdmpro=ventana-yocto-1-8-2-sdk-20160328-1730-sh Yocto 1.8.2] SDK - (sha256sum: 9dd9b5a2174ad139ccd566596e5ede83071665b5c00d47c9cfab9fa88d88ba8f)
     10
     11You can build your own SDK compatible with a filesystem image of your choice using information [wiki:Yocto/Building#BuildingatoolchainandorSDK here].
     12
     13
     14== Using the SDK ==
    3215To use the SDK you need to source the setup-environment* script in the installation directory. This script will augment your path and set several env variables useful for cross-compiling:
    33 </p>
    34 <ul><li>PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_PATH (for pkg-config)
    35 </li><li>CC CXX CPP AS LD GDB STRIP RANLIB OBJCOPY OBJDUMP AR NM CFLAGS CXXFLAGS LDFLAGS CPPFLAGS ARCH CROSS_COMPILE (for make and cmdline use)
    36 </li><li>M4 CONFIGURE_FLAGS (for aclocal/autoconf/autoheader/automake/autoreconf/autoupdate use)
    37 </li></ul><ol><li>Run the downloaded/built <tt>.sh</tt> file and specify an install path:
    38 <div class="code"><pre>/bin/sh ventana-yocto-2.3-sdk-*.sh -d ~/sdk
    39 </pre></div><ul><li>Note that you need write access to the directory you wish to install to. By default this is <tt>/opt/poky/</tt> but you can change it when prompted or via the <tt>-d &lt;dir&gt;</tt> parameter
    40 </li><li>do not run the install script as root - if you do, you will need to adjust some directory permissions
    41 </li></ul></li></ol><ol start="2"><li>cd into extracted toolchain:
    42 <div class="code"><pre><span class="nb">cd</span> ~/sdk
    43 </pre></div></li></ol><ol start="3"><li>Activate the environment:
    44 <div class="code"><pre><span class="nb">source </span>environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
    45 </pre></div><ul><li><strong>You will need to do this per new shell</strong>
    46 </li><li>The toolchain executables and various support apps will be in your path, but you need to make sure you are using them by using the env vars above in your build instructions and Makefiles.
    47 </li><li>pkg-config is in the SDK path and will provide valid results based on PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_PATH env vars
    48 </li><li>autoconf/automake etc are in the SDK path and will provide valid results based on M4 CONFIGURE_FLAGS env vars
    49 </li></ul></li></ol><ol start="5"><li>Build:
    50 <ul><li>to build a standalone single source app (ie <tt>hellowworld.c</tt>) use variables defined by the environment such as CC, LD, AR, etc:
    51 <div class="code"><pre>cat <span class="s">&lt;&lt; EOF &gt;&gt; helloworld.c
    52 #include &lt;stdio.h&gt;
     16 * PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_PATH (for pkg-config)
     17 * CC CXX CPP AS LD GDB STRIP RANLIB OBJCOPY OBJDUMP AR NM CFLAGS CXXFLAGS LDFLAGS CPPFLAGS ARCH  CROSS_COMPILE (for make and cmdline use)
     18 * M4 CONFIGURE_FLAGS (for aclocal/autoconf/autoheader/automake/autoreconf/autoupdate use)
     19
     20Instructions:
     211. Run the downloaded/built .sh file and specify an install path:
     22{{{#!bash
     23/bin/sh ventana-yocto-2.3-sdk-*.sh -d ~/sdk
     24}}}
     25 * Note that you need write access to the directory you wish to install to. By default this is /opt/poky/ but you can change it when prompted or via the -d <dir> parameter
     26 * do not run the install script as root - if you do, you will need to adjust some directory permissions
     272. cd into extracted toolchain:
     28{{{#!bash
     29cd ~/sdk
     30}}}
     313. Activate the environment:
     32{{{#!bash
     33source environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
     34}}}
     35 * **You will need to do this per new shell**
     36 * The toolchain executables and various support apps will be in your path, but you need to make sure you are using them by using the env vars above in your build instructions and Makefiles.
     37 * pkg-config is in the SDK path and will provide valid results based on PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_PATH env vars
     38 * autoconf/automake etc are in the SDK path and will provide valid results based on M4 CONFIGURE_FLAGS env vars
     394. Build:
     40 * to build a standalone single source app (ie hellowworld.c) use variables defined by the environment such as CC, LD, AR, etc:
     41{{{#!bash
     42cat << EOF >> helloworld.c
     43#include <stdio.h>
    5344
    5445int main (int argc, char** argv)
     
    5748   return 0;
    5849}
    59 EOF</span>
    60 </pre></div><div class="code"><pre><span class="nv">$ </span><span class="k">${</span><span class="nv">CC</span><span class="k">}</span> helloworld.c -o helloworld
    61 <span class="nv">$ </span>file helloworld
    62 helloworld: ELF 32-bit LSB executable, ARM, EABI5 version 1 <span class="o">(</span>SYSV<span class="o">)</span>, dynamically linked, interpreter /lib/ld-linux-armhf.so.3, <span class="k">for </span>GNU/Linux 3.2.0, BuildID<span class="o">[</span>sha1<span class="o">]=</span>6f867176027322dff8c2fbd469cdff804547e2d7, not stripped
    63 </pre></div></li><li>to build using a Makefile which properly uses CC/CFLAGS/LDFLAGS/LIBS etc:
    64 <div class="code"><pre>make
    65 </pre></div></li></ul></li></ol><p>
     50EOF
     51$ ${CC} helloworld.c -o helloworld
     52$ file helloworld
     53helloworld: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=6f867176027322dff8c2fbd469cdff804547e2d7, not stripped
     54}}}
     55 * to build using a Makefile which properly uses CC/CFLAGS/LDFLAGS/LIBS etc:
     56{{{#!bash
     57make
     58}}}
     59
    6660For more complete examples see:
    67 </p>
    68 <ul><li><a class="ext-link" href="http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html"><span class="icon">​</span>Yocto SDK manual</a>
    69 </li></ul>
    70 }}}
     61 * ​[http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html Yocto SDK manual]