Hackpads are smart collaborative documents. .
234 days ago
Unfiled. Edited by Shou-Chien Yang 234 days ago
  1. Reboot the AR6MX board and it should boot into Android 5.0.1. To boot from eMMC, please adjust the JP1 header with one jumper on 3-4 and 5-6, JP2 1-2, 5-6, and 7-8.
 
250 days ago
Unfiled. Edited by Shou-Chien Yang , Frodo Lai 250 days ago
Shou-Chien Y How to use and configure mfgtools 
 
Older mfgtools uses cfg.ini to store board configuration. If you have multiple boards or multiple configurations, you need to modify cfg.ini every time when there is a change. Recent mfgtools uses vbs file (VB Script) to specify board configuration and parameters. You can create multiple vbs files for different configurations and simply double click it to execute the flash process.
Frodo L Download and extract the compressed file to see the full example.
 
 
Below is the mfgtool2-android-mx6q-ar6mx-sd.vbs file for AR6MX SD image flashing.
 
Frodo L
  • Set wshShell = CreateObject("WScript.shell")
  • wshShell.run "mfgtool2.exe -c ""linux"" -l ""SDCard-Android-IMX6Q-ar6mx"" -s ""mmc=2"" -s ""data_type="""
  • Set wshShell = Nothing
 
Shou-Chien Y In this case, "SDCard-Android-IMX6Q-ar6mx" is the list name specified in the ucl2.xml file, and "mmc=2" is the parameter for mmcblk number. For current AR6MX device tree setting, mmc2 is for SD card and mmc3 is for eMMC.  
 
Frodo L
  • <LIST name="SDCard-Android-IMX6Q-ar6mx" desc="Choose SD Card as media">
  • .....
  • </LIST>
  
Shou-Chien Y ucl2.xml is the file that describes the flash details such as the flash process and what files to use during the flash process. You can find the ucl2.xml file under mfgtools\Profiles\Linux\OS Firmware\, which all other file paths are related to.
 
The flash process consists of two stages. In the first stage, mfgtools loads necessary MFG files (u-boot, device tree, uImage, and initramfs) from your PC and boot the AR6MX board to kernel.
Frodo L Load Mfg u-boot
  • <LIST name="SDCard-Android-IMX6Q-ar6mx" desc="Choose SD Card as media">
  •     <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx.ar6mxq-mfg" ifdev="MX6Q">Loading U-boot</CMD>
  •     <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx.ar6mxs-mfg" ifdev="MX6D">Loading U-boot</CMD>
Load MFG kernel
  • <CMD state="BootStrap" type="load" file="firmware/uImage" address="0x10800000" 
  •   loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
Load initramfs
  • <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
  •   loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
Load dts
  • <CMD state="BootStrap" type="load" file="firmware/imx6q-ar6mx.dtb" address="0x18000000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
  • <CMD state="BootStrap" type="load" file="firmware/imx6dl-ar6mx.dtb" address="0x18000000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6D">Loading device tree.</CMD>
 
Shou-Chien Y After the board successfully boot into kernel, the initramfs will wait for mfgtools to execute second stage commands, this includes partitioning/formating the storage device (SD/eMMC), flash u-boot and android images.
Frodo L Following the map of storage partitions
Shou-Chien Y u-boot will go to un-partitioned area at 1KB position. boot.img, recovery.img, and system.img will go to partition 1, 2, and 5. You can adjust partition size by modifying script`mksdcard-android.sh.tar`
 
Frodo L Create partition
  • <CMD state="Updater" type="push" body="send" file="mksdcard-android%data_type%.sh.tar">Sending partition shell</CMD>
  • <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
  • <CMD state="Updater" type="push" body="$ sh mksdcard-android%data_type%.sh /dev/mmcblk%mmc%"> Partitioning...</CMD>
  •  
Burn uboot
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/u-boot-6q.imx" ifdev="MX6Q">Sending u-boot.bin</CMD>
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/u-boot-6dl.imx" ifdev="MX6D">Sending u-boot.bin</CMD>
  • <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
  • <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=1k seek=1 conv=fsync">write u-boot.bin to sd card</CMD>
  •  
List Partitions
  • <CMD state="Updater" type="push" body="$ ls -l /dev/mmc* ">Formatting sd partition</CMD>
Program Android image
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/boot-6q.img" ifdev="MX6Q">Sending and writting boot.img</CMD>
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/boot-6dl.img" ifdev="MX6D">Sending and writting boot.img</CMD>
  • <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%p1">write boot.img</CMD>
  •  
  • <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p5">Formatting system partition</CMD>
  • <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p6">Formatting cache partition</CMD>
  •  
  • <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p7">Formatting device partition</CMD>
  • <CMD state="Updater" type="push" body="$ mount -o remount,size=512M rootfs /">change size of tmpfs</CMD>
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/system.img">Sending system.img</CMD>
  • <CMD state="Updater" type="push" body="$ simg2img $FILE /dev/mmcblk%mmc%p5">writting sparse system.img</CMD>
  •  
  • <!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->
  • <!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->
  • <!--        <CMD state="Updater" type="push" onError="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.img(optional) </CMD> <CMD state="Updater" type="push" body="frf">flush the memory.</CMD>  -->
  • <CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p2 bs=512" file="files/android/ar6mx/recovery-6q.img" ifdev="MX6Q">Sending and writting recovery.img</CMD>
  • <CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p2 bs=512" file="files/android/ar6mx/recovery-6dl.img" ifdev="MX6D">Sending and writting recovery.img</CMD>
  • <CMD state="Updater" type="push" body="$ sync">Sync file system</CMD>
  • <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
  •  
  • <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
  
Shou-Chien Y If you have your own custom android images that you wish to flash, please place them to mfgtools\Profiles\Linux\OS Firmware\files\android\ar6mx\ directory, and modify the ucl2.xml file accordingly if the image file location or file name is different from the original one states in ucl2.xml file.
 
If you wish to flash images to eMMC device, you will first need to modify the BoardConfig.mk file from android source code and change BUILD_TARGET_DEVICE = sd to BUILD_TARGET_DEVICE = emmc, then rebuild boot.img file. (deleting root folder from out directory may be required) This basically makes fstab look for mmcblk3 instead of mmcblk2.
Second, create another vbs file in mfgtools and change the mmc parameter to mmc=3. It is recommended to create another list name for eMMC flashing.
 
Frodo L
  • Set wshShell = CreateObject("WScript.shell")
  • wshShell.run "mfgtool2.exe -c ""linux"" -l ""eMMC-Android-IMX6Q-ar6mx"" -s ""mmc=3"" -s ""data_type="""
  • Set wshShell = Nothing
 
Shou-Chien Y Flashing android images to eMMC is basically the same as flashing to SD card, but there is one difference while flashing u-boot. eMMC has a write protection bit for the boot sector, so you will need to unlock it before flashing u-boot, then lock it again after u-boot has been flashed.
 
Frodo L
  • <!-- burn uboot -->
  • <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
  • <CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/u-boot-6q.imx" ifdev="MX6Q">Sending u-boot.bin</CMD>
  • <CMD state="Updater" type="push" body="send" file="files/android/ar6mx/u-boot-6dl.imx" ifdev="MX6D">Sending u-boot.bin</CMD>
  • <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%boot0 bs=1k seek=1 conv=fsync">write u-boot.bin to sd card</CMD>
  • <CMD state="Updater" type="push" body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>
  • <CMD state="Updater" type="push" body="$ echo 8 > /sys/block/mmcblk%mmc%/device/boot_config">enable boot partion 1 to boot</CMD>
 
...
263 days ago
Unfiled. Edited by Shou-Chien Yang 263 days ago
OS Image Download Links - Android 5.1.1 released
 
  • Android L5.0.1 (2015.08)
 
Frodo L
  • Android L5.1.1 (2016.08) *new
 
 
263 days ago
Unfiled. Edited by Shou-Chien Yang 263 days ago
Kernel 3.0.35 Ubuntu 12.04 Kernel 3.10.17 Ubuntu 14.04 Kernel 3.10.17 Yocto Kernel 3.14.28 Ubuntu Kernel 3.14.52 Yocto Comments
CPU Internal
Thermal sensor OK OK OK OK OK
CPU Frequency OK OK OK OK OK
GPU OK OK OK OK OK
VPU OK OK OK OK OK
Displays
HDMI OK OK OK OK OK 1080P
LVDS OK OK OK OK OK
2 Displays OK
3 Displays AR6MXQ only
I/O peripherals
Ethernet(1G LAN) OK OK OK OK OK
SD card OK OK OK OK OK
eMMC AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXS and AR6MXDL do not have eMMC built-in
SATA AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXS and AR6MXDL do not have SATA built-in
USB Host OK OK OK OK OK
USB OTG OK OK OK OK OK
HDMI Audio out OK OK OK OK OK
Codec Audio out OK OK OK OK OK
Mic in OK
COM1 (8 wires) OK OK OK OK OK
COM2 (4 wires) OK OK OK
COM3 (RS-485) OK
COM4 (3.3V) OK OK OK
SPI Flash OK
CAN Bus N/A
GPIO (8-bit) OK
Mini PCIe OK OK OK OK OK
External Devices
Data Image LCD panel(FG100131DNSWAGL1) OK OK OK OK OK 10.1" ; 1024x600
EETI PCAP touch screen
(EXC7700)
OK OK OK OK OK 10.1
Milestone Touch AMT 2534 touch screen 15" ; 4:3 ratio
PenMount 6000 USB touch OK
USB Camera OK
Atheros 9K Mini PCIe WIFI+BT
(DHXA-222)
OK OK OK OK OK
Intel Mini PCIe WIFI
(N100, N105, 6330, 3160)
OK OK OK OK OK Bluetooth still under testing
AR6K SDIO WIFI
(Silex SX-SDCAN)
Bluetooth still under testing
Applications
Video Playback OK OK OK OK OK wmv, mkv, avi, mp4, mpeg4,mov, flv
Hardware Acceleration OK OK OK OK OK
Wireless Display
 
 
Shou-Chien Y Intel Dual Band Wireless AC 3160 (mini-PCIE)
 
 
263 days ago
Unfiled. Edited by Shou-Chien Yang 263 days ago
ICS 4.0.4 JB 4.3.1 KK 4.4.2 L5.0.1 L5.1.1 Comments
Kernel 3.0.35 3.0.35 3.0.35 3.10.17 3.14.52
CPU Internal
Thermal sensor OK OK OK OK OK
CPU Frequency OK OK OK OK OK
GPU OK OK OK OK OK
VPU OK OK OK OK OK
Displays
HDMI OK OK OK OK OK 1920x1080
LVDS OK OK OK OK OK 1024x600
HDMI+LVDS OK OK OK
HDMI+2LVDS AR6MXQ only
I/O Peripherals
Ethernet(Gigabit) OK OK OK OK OK
SD card OK OK OK OK OK
eMMC AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXS and AR6MXDL do not have eMMC built-in
SATA AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXQ only AR6MXS and AR6MXDL do not have SATA built-in
USB Host OK OK OK OK OK
USB OTG OK OK OK OK OK
HDMI Audio out OK OK OK OK OK
Codec Audio out OK OK OK OK OK
Mic in OK OK OK
COM1 (8 wires) OK OK OK OK OK
COM2 (4 wires) OK OK OK
COM3 (RS-485) OK OK OK
COM4 (3.3V) OK OK OK
SPI Flash OK OK OK
CAN Bus N/A N/A
GPIO (8-bit) OK OK OK OK OK
Mini PCIe OK OK OK OK OK
External Devices
Data Image LCD panel(FG100131DNSWAGL1) OK OK OK OK OK 10.1" ; 1024x600
EETI PCAP touch screen
(EXC7700)
OK OK OK OK OK 10.1"
PenMount 6000 USB touch OK WIP
Milestone Touch AMT 2534 touch screen 15" ; 4:3 ratio
USB Camera OK OK WIP OK OK
Intel Mini PCIe WIFI
(N100, N105, 6330, 3160)
OK WIP OK OK OK Bluetooth via Bluez
AR6K SDIO WIFI
(Silex SX-SDCAN)
OK
Applications
Video Playback OK OK wmv, mkv, avi, mp4, mpeg4,mov, flv
Hardware Acceleration OpenGL-ES 1.1/2.0
Superuser access OK OK OK
Wireless Display OK
 
Shou-Chien Y Intel Dual Band Wireless AC 3160 (mini-PCIE)
 
AR6K SDIO WIFI (Silex SX-SDCAN)
 
263 days ago
Unfiled. Edited by Frodo Lai 263 days ago
Frodo L Rotate 180 degrees in Android
 
We can set default orientation to 0, 90 and 270 by changing ro.sf.hwrotation in Android build but not 180. The stock Android didn't implement this but we can apply a small patch to enable it.
Take Android 5.1.1 as an example. Just modify the following two files:
frameworks/native/services/surfaceflinger/DisplayDevice.cpp
frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp
 
  • [~/L5.1.1_2.1.0/frameworks/native] (imx_L5.1.1_2.1.0-ga) 7605h43m $ git diff
  • index 39270b6..d1fcb6a 100644
  • --- a/services/surfaceflinger/DisplayDevice.cpp
  • +++ b/services/surfaceflinger/DisplayDevice.cpp
  • @@ -455,6 +455,9 @@ void DisplayDevice::setProjection(int orientation,
  •                  case 90:
  •                      displayOrientation = DisplayState::eOrientation90;
  •                      break;
  • +                case 180:
  • +                    displayOrientation = DisplayState::eOrientation180;
  • +                    break;
  •                  case 270:
  •                      displayOrientation = DisplayState::eOrientation270;
  •                      break;
  • diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
  • index 97b231e..ceae746 100755
  • --- a/services/surfaceflinger/SurfaceFlinger.cpp
  • +++ b/services/surfaceflinger/SurfaceFlinger.cpp
  • @@ -595,6 +595,9 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
  •                      case 90:
  •                          displayOrientation = DisplayState::eOrientation90;
  •                          break;
  • +                    case 180:
  • +                        displayOrientation = DisplayState::eOrientation180;
  • +                        break;
  •                      case 270:
  •                          displayOrientation = DisplayState::eOrientation270;
  •                          break;
  •  
Then, change desired orientation in init.rc
  • diff --git a/ar6mx/init.rc b/ar6mx/init.rc
  • index 4362d44..8adfaee 100755
  • --- a/ar6mx/init.rc
  • +++ b/ar6mx/init.rc
  • @@ -64,7 +67,7 @@ on boot
  •      setprop ro.opengles.version 131072
  •      # Set rotation to 270 to cofigure as portrait mode
  • -    setprop ro.sf.hwrotation 0
  • +    setprop ro.sf.hwrotation 180
  •  
 
PS. Freescale only implements IPU_ROTATE_VERT_FLIP in driver level.
  • drivers/video/mxc/mxc_ipuv3_fb.c
  • 1602
  • 1603     if (var->rotate > IPU_ROTATE_VERT_FLIP)
  • 1604         var->rotate = IPU_ROTATE_NONE;
  • 1605
  •  
In this thread, a 3rd party patch can rotate the screen up to resolution 1024x1024 for kernel 3.10.17~3.14.28
 
 
328 days ago
Unfiled. Edited by Frodo Lai 328 days ago
Frodo L Intel 3160/7260 wifi support for Android 5.0
 
Method I: Backports 3.19-rc1-1 + Android-ia hostap_wcs
1. Get the files from GitHub
1.1 backports + firmware
  • cd /path/to/Android/root
  • git clone git@github.com:bcmadvancedresearch/android_vendor.git vendor
  • cd vendor
  • git checkout l5.1.1_2.1.0
  •  
1.2 hostap_wcs
  • cd /path/to/Android/root
  • git clone git@github.com:android-ia/vendor_intel_common.git device/intel/common
  • cd device/intel/common
  • git checkout release/android-5.1.1_r16-ia0
  •  
Remove CONFIG_TDLS_AUTO_MODE=y from cht/wpa_supplicant/.config & cht/wpa_supplicant/android.config
 
1.3 AR6MX device files
  • cd /path/to/Android/root
  • git clone git@github.com:bcmadvancedresearch/android_device_bcm.git device/bcm
  • cd device/bcm
  • git checkout l5.1.1_2.1.0-ga-iwlwifi
 
2. Include firmware files (changes included in AR6MX device files)
device/bcm/ar6mx/ar6mx.mk
  • # include firmware binaries for Wifi adapters
  • $(call inherit-product,$(LOCAL_PATH)/firmware.mk)
  •  
device/bcm/ar6mx/firmware.mk
  • # Copyright (C) 2012 The Android-x86 Open Source Project
  • #
  • # Licensed under the Apache License, Version 2.0 (the "License");
  • # you may not use this file except in compliance with the License.
  • # You may obtain a copy of the License at
  • #
  • #
  •  
  • LOCAL_FIRMWARES_DIR ?= vendor/linux-firmware
  • LOCAL_FIRMWARES ?= $(filter-out %.mk,$(subst $(LOCAL_FIRMWARES_DIR)/,,$(shell find              $(LOCAL_FIRMWARES_DIR) -type f)))
  •  
  • PRODUCT_COPY_FILES := \
  •     $(foreach f,$(LOCAL_FIRMWARES),$(LOCAL_FIRMWARES_DIR)/$(f):system/etc/firmware/$(f))
  •     
 
3. Include IWLWIFI related settings (changes included in AR6MX device files)
3.1 device/bcm/ar6mx/ar6mx.mk
  • PRODUCT_PACKAGES += \
  •     hostapd \
  •     hostapd_cli \
  •     wpa_supplicant \
  •     wpa_cli
  •  
  • # iwlwifi USC
  • PRODUCT_PACKAGES += \
  •     wifi_intel_usc
  •  
  • #copy iwlwifi wpa config files
  • PRODUCT_COPY_FILES += \
  •         device/bcm/common/wlan/wpa_supplicant-common.conf:system/etc/wifi/wpa_supplicant.conf \         device/bcm/common/wlan/iwlwifi/wpa_supplicant_overlay.conf:system/etc/wifi/             wpa_supplicant_overlay.conf \                                                                   
  • PRODUCT_COPY_FILES += \
  •         device/bcm/common/wlan/iwlwifi/load_iwlwifi.sh:system/bin/load_iwlwifi.sh
  •  
  • # Add Manufacturing tool
  • PRODUCT_PACKAGES += \
  •     wlan_intel_restore.sh
  •  
3.2 device/bcm/BoardConfig.mk
  • # This enables the wpa wireless driver
  • BOARD_HOSTAPD_DRIVER := NL80211
  • BOARD_WPA_SUPPLICANT_DRIVER := NL80211
  • WPA_SUPPLICANT_VERSION := VER_2_1_DEVEL_WCS
  •  
  • # Enabling iwlwifi
  • BOARD_USING_INTEL_IWL := true
  • INTEL_IWL_MODULE_SUB_FOLDER := cht
  •  
  • COMBO_CHIP_VENDOR := intel
  • COMBO_CHIP := lnp
  •  
  • # SoftAp FW reload definitions.
  • # we don't really need this, it's to avoid error when the framework
  • # will trigger the fwReloadSoftap function, what will lead to an error
  • # enabling the SoftAp.
  • # so we set up this for letting the function execute gracefully.
  • WIFI_DRIVER_FW_PATH_STA := "/system/vendor/firmware/iwlwifi-softap-dummy.ucode"
  • WIFI_DRIVER_FW_PATH_AP  := "/system/vendor/firmware/iwlwifi-softap-dummy.ucode"
  • WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/firmware/iwlwifi-softap-dummy.ucode"
  • WIFI_DRIVER_FW_PATH_PARAM := "/dev/null"
  •  
  • # config_wifi_background_scan_support=true:
  • DEVICE_PACKAGE_OVERLAYS += device/bcm/common/wlan/overlay-pno
  •  
  • DEVICE_PACKAGE_OVERLAYS += device/bcm/common/wlan/overlay-tcp-buffers
  •  
 
4. Update device/bcm/ar6mx/init.rc
  • setprop wifi.interface wlan0
  •  
...
Members (19)
Shou-Chien Yang Doge Huang Frodo Lai sagar pdiarm Jason Overmier Sagar Heroorkar Jesus Villalpando James Martinez garga3 彥瑾 李 Jr. Baron qwerasdfzxcv Sean LeCrone Muhammad Shameen wang xbing Saurabh Sen Glenn Neidermeier Russel Ross qwerasdfzxcv

Create a New Collection

Cancel

Move XXX to XXX


XXX will be invited to the XXX on XXX.

Cancel

Contact Support



Please check out our How-to Guide and FAQ first to see if your question is already answered! :)

If you have a feature request, please add it to this pad. Thanks!


Log in / Sign up