Changes between Version 1 and Version 2 of ventana/third_party_linux


Ignore:
Timestamp:
10/30/2017 10:39:33 PM (6 years ago)
Author:
Tim Harvey
Comment:

convert restored html to wiki markup

Legend:

Unmodified
Added
Removed
Modified
  • ventana/third_party_linux

    v1 v2  
    1 {{{#!html
    2           <div id="wikipage" class="trac-content"><p>
    3 </p><div class="wiki-toc">
    4 <ol>
    5   <li>
    6     <a href="#ThirdPartyLinux">Third Party Linux</a>
    7     <ol>
    8       <li>
    9         <a href="#BuildingGateworksVentanakernel">Building Gateworks Ventana kernel</a>
    10         <ol>
    11           <li>
    12             <a href="#Sources">Sources</a>
    13           </li>
    14           <li>
    15             <a href="#Building">Building</a>
    16           </li>
    17         </ol>
    18       </li>
    19       <li>
    20         <a href="#RootfilesystemSources">Root filesystem Sources</a>
    21       </li>
    22       <li>
    23         <a href="#CreatingabootableblockdevicemSATAUSBuSD">Creating a bootable block device (mSATA/USB/uSD)</a>
    24       </li>
    25     </ol>
    26   </li>
    27 </ol>
    28 </div><p>
    29 </p>
    30 <h1 id="ThirdPartyLinux">Third Party Linux</h1>
    31 <p>
     1[[PageOutline]]
     2
     3= Third Party Linux =
    324While Gateworks cannot fully support all Linux distros, it is relatively simple to overlay a Gateworks Ventana kernel onto any non-Gateworks third party Linux distro rootfs image.
    33 </p>
    34 <h2 id="BuildingGateworksVentanakernel">Building Gateworks Ventana kernel</h2>
    35 <h3 id="Sources">Sources</h3>
    36 <p>
    37 Gateworks has several kernel tree's to choose from hosted on Github <a class="ext-link" href="https://github.com/Gateworks/linux-imx6/branches"><span class="icon">​</span>here</a>
    38 </p>
    39 <ul><li>Freescale Vendor Kernels with patches for Gateworks Ventana: These kernels contain many patches from Freescale to support hardware features that are not yet in Mainline linux:
    40 <ul><li><strong>gateworks_3.10.17_1.0.0_ga - latest vendor kernel supporting device-tree (recommended)</strong>
    41 </li><li>gateworks_3.0.35_4.0.0 - latest non device-tree vendor kernel
    42 </li><li>gateworks_jb4.3_1.0.0-ga - latest Android Jellybean vendor kernel
    43 </li></ul></li><li>Mainline linux kernel with patches for Gateworks Ventana: Missing some Freescale hardware support such as Video input/output, codec support and crypto support:
    44 <ul><li>gateworks_3.15
    45 </li><li>gateworks_3.14
    46 </li><li>gateworks_3.13
    47 </li><li>gateworks_3.12
    48 </li></ul></li></ul><p>
     5
     6== Building Gateworks Ventana kernel ==
     7
     8[=#kernel]
     9=== Sources ===
     10Gateworks has several kernel tree's to choose from hosted on Github ​[https://github.com/Gateworks/linux-imx6/branches here]
     11
     12* Freescale Vendor Kernels with patches for Gateworks Ventana: These kernels contain many patches from Freescale to support hardware features that are not yet in Mainline linux:
     13 - '''gateworks_3.10.17_1.0.0_ga - latest vendor kernel supporting device-tree (recommended)'''
     14 - gateworks_3.0.35_4.0.0 - latest non device-tree vendor kernel
     15 - gateworks_jb4.3_1.0.0-ga - latest Android Jellybean vendor kernel
     16* Mainline linux kernel with patches for Gateworks Ventana: Missing some Freescale hardware support such as Video input/output, codec support and crypto support:
     17 - gateworks_3.15
     18 - gateworks_3.14
     19 - gateworks_3.13
     20 - gateworks_3.12
     21
    4922Checking out source (for example, the gateworks_3.10.17_1.0.0_ga kernel):
    50 </p>
    51 <pre class="wiki">git clone https://github.com/Gateworks/linux-imx6.git gateworks_3.10.17_1.0.0_ga
     23{{{#!bash
     24git clone https://github.com/Gateworks/linux-imx6.git gateworks_3.10.17_1.0.0_ga
    5225cd gateworks_3.10.17_1.0.0_ga
    53 </pre><h3 id="Building">Building</h3>
    54 <p>
    55 To build a kernel using an external toolchain (for example, an <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> toolchain built in /usr/src/openwrt-gw-trunk):
    56 </p>
    57 <pre class="wiki"># setup toolchain
     26}}}
     27
     28
     29[=#build]
     30=== Building ===
     31To build a kernel using an external toolchain (for example, an OpenWrt toolchain built in /usr/src/openwrt-gw-trunk):
     32{{{#!bash
     33# setup toolchain
    5834export STAGING_DIR=/usr/src/openwrt/gw-trunk/trunk/staging_dir
    5935export TOOLCHAIN=toolchain-arm_cortex-a9+neon_gcc-4.8-linaro_uClibc-0.9.33.2_eabi
     
    6743# build standard targets (uImage modules dtbs)
    6844CROSS_COMPILE=arm-openwrt-linux- ARCH=arm make uImage modules dtbs
    69 </pre><ul><li>Notes:
    70 <ul><li>you can download a pre-built <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> toolchain for Ventana <a class="ext-link" href="http://dev.gateworks.com/openwrt/14.08/imx6/OpenWrt-Toolchain-imx6-for-arm_cortex-a9+neon-gcc-4.8-linaro_uClibc-0.9.33.2_eabi.tar.bz2"><span class="icon">​</span>here</a>
    71 </li><li>if you are using the 3.0.35 non-device-tree kernel do not include <strong>dtbs</strong> in the make targets above
    72 </li></ul></li></ul><p>
     45}}}
     46* Notes:
     47 - you can download a pre-built OpenWrt toolchain for Ventana [http://dev.gateworks.com/openwrt/14.08/imx6/OpenWrt-Toolchain-imx6-for-arm_cortex-a9+neon-gcc-4.8-linaro_uClibc-0.9.33.2_eabi.tar.bz2 ​here]
     48 - if you are using the 3.0.35 non-device-tree kernel do not include '''dtbs''' in the make targets above
     49
     50
    7351To create a tarball of uImage, modules and dtbs (suitable to un-tar on top of a rootfs):
    74 </p>
    75 <pre class="wiki">KERNEL_VER=$(cat include/config/kernel.release)
     52{{{#!bash
     53KERNEL_VER=$(cat include/config/kernel.release)
    7654TARBALL=linux-$KERNEL_VER.tar
    7755# create tarball containing kernel modules
     
    8563# gzip it
    8664gzip -f $TARBALL
    87 </pre><ul><li>Notes:
    88 <ul><li>the <strong>transform</strong> argument to tar above renames paths and the example above places the kernel and dtbs in the /boot directory where the default Ventana bootloader expects to find them on the first partition of type ext2/3/4
    89 </li></ul></li></ul><h2 id="RootfilesystemSources">Root filesystem Sources</h2>
    90 <p>
     65}}}
     66* Notes:
     67 - the transform argument to tar above renames paths and the example above places the kernel and dtbs in the /boot directory where the default Ventana bootloader expects to find them on the first partition of type ext2/3/4
     68
     69
     70[=#rootfs]
     71== Root filesystem Sources ==
    9172There are several sources of pre-built root filesystems that are compatible with Ventana. As Ventana uses an i.MX6 SoC, you need to use something that is compatible with an ARMv7 instruction set. Many pre-built distributions will reference 'armhf' which means 'ARM hard-float' which is appropriate for the i.MX6 as it has hardware floating-point.
    92 </p>
    93 <p>
     73
    9474Some popular third-party sources:
    95 </p>
    96 <ul><li><a class="ext-link" href="http://cdimage.ubuntu.com/ubuntu-core/releases/"><span class="icon">​</span>Ubuntu Core</a> - this is a minimal filesystem that you can build off of at runtime by adding packages from various repositories:
    97 </li><li><a class="ext-link" href="https://releases.linaro.org/"><span class="icon">​</span>Linaro</a> - Linaro has several root filesystems including server, nano, developer, core, and ALIP.  Each root filesystem will have different things installed for different purposes.  Choose carefully which will work for you.
    98 </li></ul><p>
    99 Note that Gateworks has a pre-built disk image of Ubuntu for Ventana. See <a class="ext-link" href="http://trac.gateworks.com/wiki/ventana/ubuntu"><span class="icon">​</span>here</a> for details about it and more details on building Ubuntu root filesystems
    100 </p>
    101 <h2 id="CreatingabootableblockdevicemSATAUSBuSD">Creating a bootable block device (mSATA/USB/uSD)</h2>
    102 <p>
     75* ​[http://cdimage.ubuntu.com/ubuntu-core/releases/ Ubuntu Core] - this is a minimal filesystem that you can build off of at runtime by adding packages from various repositories:
     76​* [https://releases.linaro.org/ Linaro] - Linaro has several root filesystems including server, nano, developer, core, and ALIP. Each root filesystem will have different things installed for different purposes. Choose carefully which will work for you.
     77
     78Note that Gateworks has a pre-built disk image of Ubuntu for Ventana. See ​here for details about it and more details on building Ubuntu root filesystems
     79
     80
     81[=#blockdev]
     82== Creating a bootable block device (mSATA/USB/uSD) ==
    10383The following procedure will for virtually all Linux distributions:
    104 </p>
    105 <ol><li>Download Root Filesystem (see above)
    106 </li><li>Download or build Ventana rootfs containing a Kernel, device-tree dtbs, and kernel modules:
    107 <ul><li>pre-built root filesystems:
    108 <ul><li><a class="wiki" href="/wiki/Yocto/Building#yocto_prebuilt_binaries">Yocto BSP (Video in/out support)</a>
    109 </li><li><a class="ext-link" href="http://dev.gateworks.com/openwrt/latest/imx6/openwrt-imx6-ventana-rootfs.tar.gz"><span class="icon">​</span>OpenWrt</a>
    110 </li></ul></li></ul></li><li>Create image on block storage device.  For example, using /dev/sdc:
    111 <pre class="wiki">DEVICE=/dev/sdc
     841. Download Root Filesystem (see above)
     851. Download or build Ventana rootfs containing a Kernel, device-tree dtbs, and kernel modules:
     86 * pre-built root filesystems:
     87  - [wiki:Yocto/Building#yocto_prebuilt_binaries Yocto BSP]  (Video in/out support)
     88​  - [http://dev.gateworks.com/openwrt/latest/imx6/openwrt-imx6-ventana-rootfs.tar.gz OpenWrt]
     891. Create image on block storage device. For example, using /dev/sdc:
     90{{{#!bash
     91DEVICE=/dev/sdc
    11292# unmount all auto-mounted partitions for this device
    11393sudo umount ${DEVICE}?
     
    124104# unmount the disk
    125105sudo umount ${DEVICE}1
    126 </pre></li></ol><p>
     106}}}
     107
    127108Notes:
    128 </p>
    129 <ul><li>some root filesystems may require you to manually add a user before booting (ie Ubuntu Core)
    130 </li><li>the default Ventana bootloader expects to find the uImage and dtbs in the /boot directory on the first partition of type ext2/3/4
    131 </li></ul
    132 }}}
     109- some root filesystems may require you to manually add a user before booting (ie Ubuntu Core)
     110- the default Ventana bootloader expects to find the uImage and dtbs in the /boot directory on the first partition of type ext2/3/4