{{{#!html

    1. Booting Android
      1. 4GB USB Flash Drive Pre-Loaded with Android
      2. Installing Pre-built image onto boot media
      3. Boot Devices
        1. Setting USB Delay
        2. Booting from USB OTG (Android Jellybean only)
      4. Display Output Selection
        1. HDMI Resolutions Supported
        2. Dual Display (Mirrored Display)
      5. Serial Console
      6. Memory Requirements
      7. Booting Tips
      8. Troubleshooting
    2. Boot Speed / Speeding Up

Booting Android

In this section you will find instructions on various ways to boot Android on the Ventana boards.

4GB USB Flash Drive Pre-Loaded with Android

Developers can get started quickly by purchasing a USB Stick Pre-Loaded with Android 4.3 on the Gateworks Online Shop

Installing Pre-built image onto boot media

You can download a pre-built disk image or build an image yourself from source:

Boot Devices

The Gateworks Android bootloader script will boot by default from a USB stick, micro-SD, mSata, Flash, in that order (checking for /boot/uImage on the 1st (ext2 in the case of all but Flash) partition) therefore simply powering the board with a storage device created with one of the methods described on this page will boot to Android.

If you are not booting from USB you can change the uboot 'bootdevs' env variable to specify the boot device which can save a few seconds during boot depending on your configuration.

Setting USB Delay

If using a USB flash storage device, some USB storage devices need a longer than typical delay to properly initialize. Please see the following link for setting this delay: Setting USB Delay

Booting from USB OTG (Android Jellybean only)

By default, The Android boot script is configured to boot from a USB Mass Storage device on the EHCI host port and auto-detection of which port was used is not currently possible.

To change the Android USB boot device set the 'usbdevport' env variable in u-boot:

You do not need to do this when booting from SATA or micro-SD or if using Android KitKat or beyond - the Android boot script will auto-detect

Display Output Selection

The Gateworks Android BSP supports various LVDS touchscreen displays as well as HDMI output and Dual-Display by mirroring the two.

The Gateworks bootloader will display a splash-screen on boot based on the panel env variable. The bootloader splash will be a Gateworks logo for the most recent bootloader or a Linux tux for earlier bootloader versions. If you wish to disable the bootloader splash you can set this to none. See ventana/bootloader for more details.

The Gateworks bootloader will configure display timings and the Gateworks Android bootloader script will configure kernel parameters for specific displays based on the display bootloader env variable. This can be one of the following:

Examples:

HDMI Resolutions Supported

The mxc_hdmi driver by default supports the following progressive CEA modes:

Out of the above list of supported modes only those present in the monitor's Extended Display Identification Data (EDID) are considered.

If your monitor supports a non-CEA mode or mode not listed above you can set the only_cea=0 kernel commandline parameter to allow it, however you may find that this disables HDMI audio output. This can be set in the bootloader for example:

setenv extra 'mxc_hdmi.only_cea=0'
saveenv

The default mode is specified in the kernel device-tree (for example, here for the GW52xx) as '1920x1080M@60' for 1080p@60Hz. This can be overridden with a video= kernel parameter (see above). For example, if you monitor is defaulting to 1920x1080p@60Hz and you want it instead to be 1680x1050@59Hz from a matching mode of 'D:1680x1050p-59' in /sys/class/graphics/fb0/modes you could use:

setenv video 'video=mxcfb0:dev=hdmi,1680x1050M@59 video=mxcfb1:off'
saveenv

Note that the Android BSP has a bootloader script which will set the kernel commandline (unless the video bootloader env variable is set to override it). The script will use the hdmi env variable (and defaults to 1080p if not set) to determine the resolution and use this for HDMI if an HDMI monitor is connected at bootup. For example:

Note that if you specify a video mode that the monitor's EDID does not support (or supports per the EDID but doesn't appear in /sys/class/graphics/fb0/modes because only_cea=1) the mxc_hdmi driver will try to find the nearest supported resolution to what you specified.

Once booted, you can see the list of available video modes via /sys/class/graphics:

Dual Display (Mirrored Display)

To mirror the Android OS to both HDMI and LVDS displays you can set the display env variable to multiple options described above.

The Android OS will use the resolution of the first display specified therefore you should typically specify the LVDS display first and HDMI after if you have a lower resolution LVDS display than the HDMI monitor. In this case the HDMI monitor will show a letter-boxed display of what is present on the LVDS touch-screen. The bootloader does not support dual-display so if you want to show the bootloader splashscreen you must specify one display argument.

Examples:

Serial Console

When using Android 5.x (Lollipop) serial console "input" is disabled by default as a requirement for passing Android Certification Test Suite (CTS). To use serial console input you must disable selinux by adding the 'androidboot.selinux=disabled' to the kernel command line. You can do this by using the extra env variable in the bootloader as such:

setenv extra 'androidboot.selinux=disabled'; saveenv

Memory Requirements

Android on Gateworks Ventana boards requires 512MB of DRAM but 1GB+ is highly recommended. In low memory situations you will find that tasks are constantly being killed and re-started and/or are slow to start.

A certain amount of DRAM is carved out using the Linux Contiguous Memory Allocator (CMA) for VPU and GPU based on the amount of system memory available. This is done automatically by the Android boot scripts based on the mem_mb U-Boot env variable.

Please ensure you have a bootloader built from 2015 or later to ensure the mem_mb env variable is set automatically by the bootloader.

You can override the allocation manually if you desire however it is not clear what the overall effect would be if you limit this beyond the Freescale recommended values. See the bootloader script for examples.

References:

Booting Tips

Once booted you will likely want to disable the screen-blanking right away (as there is no 'power button' configured to wake the device).

To do this for Android Jellybean 4.3 / KitKat 4.4.3:

  1. Launch 'Settings' application
  2. Select 'Developer options' menu and select 'Stay awake'
    • if you are using a 'user' build you need to head to 'Settings' -> 'About tablet' and click on 'Build number' 6 times to enable the 'Settings' -> 'Developer options' menu.

While you are also in settings you probably also want to:

Troubleshooting

Android may have issues booting up if there is no video source connected or the video source has not been defined in the bootloader. Please confirm that the bootloader has been configured for the proper display device.

Boot Speed / Speeding Up

It typically requires 30 to 40 seconds to boot to the lock screen but to achieve this you need to do a bit of uboot environment tuning (such as setting bootdevs to just your boot device, minimizing or eliminating bootdelay, and disabling kernel console):