{{{#!html
In this section you will find instructions on various ways to boot Android on the Ventana boards.
Developers can get started quickly by purchasing a USB Stick Pre-Loaded with Android 4.3 on the Gateworks Online Shop
You can download a pre-built disk image or build an image yourself from source:
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.
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
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:
setenv usbdevport 0 saveenv boot
setenv usbdevport 1 saveenv 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
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:
setenv panel HDMI setenv display HDMI setenv hdmi 1080p saveenv
setenv panel none setenv display HDMI setenv hdmi 720p saveenv
setenv panel Hannstar-XGA setenv display Hannstar-XGA saveenv
setenv panel DLC700JMGT4 setenv display DLC700JMGT4 saveenv
setenv panel DLC800FIGT3 setenv display DLC800FIGT3 saveenv
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:
setenv video # make sure video var is blank for auto-configuration to work setenv hdmi 720p # set to 1280x720M@60 saveenv
setenv video # make sure video var is blank for auto-configuration to work setenv hdmi 1080p # set to 1920x1080M@60 saveenv
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:
# cat /sys/class/graphics/fb0/mode
D:1680x1050p-59
# cat /sys/class/graphics/fb0/modes
S:1280x1024p-60
S:1152x864p-75
V:1280x1024p-75
V:1024x768p-75
V:1024x768p-60
V:800x600p-75
V:800x600p-60
V:640x480p-75
V:640x480p-60
U:720x400p-70
D:1680x1050p-59
V:640x480p-60
echo "V:1024x768p-60" > /sys/class/graphics/fb0/mode
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:
setenv panel Hannstar-XGA
setenv display "Hannstar-XGA HDMI"
setenv hdmi 1080p
saveenv
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
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:
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:
While you are also in settings you probably also want to:
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.
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):