PPC-4107

From Estone Technology Wiki
Jump to: navigation, search

Technical Specification

Compiling PPC-4107 Yocto Image

Setup Yocto Environment

  • Please follow these instructions to setup the yocto environment before compiling the ppc-4107 image

All the following steps have been tested on Ubuntu 16.04.6 LTS. An Internet connection is required to finish this tutorial.

  • Check and install update for Ubuntu by inputing the following commands to shell.
$ sudo apt-get update

Setting up the Ubuntu development host

Open a terminal on host machine(Ubuntu 16.04.6 LTS). Input the following commands to install the pre-required tools:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath
$ sudo apt-get install libsdl1.2-dev xterm 
$ sudo apt-get install curl nano gcc-multilib gettext git lzop bc

Installing and configuring Git

$ sudo apt-get update
$ sudo apt-get install git
$ git config --global user.name "First Last"
$ git config --global user.email "first.last@company.com"

Installing SDK

Download here

Installation

sh poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.3.sh

Compiling Kernel

git clone -b 3.14.52-ppc4107 https://github.com/estonetechnology/imx6qdl-linux-kernel.git
source /opt/poky/2.1.3/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
export ARCH=arm
export CROSS_COMPILE=arm-poky-linux-gnueabi-
cd imx6qdl-linux-kernel/
make hio-imx6dl-ppc4107_defconfig 
make 
make hio-imx6dl-ppc4107.dtb

Files require:

zImage (imx6qdl-linux-kernel/arch/arm/boot/zImage)
hio-imx6dl-ppc4107.dtb (imx6qdl-linux-kernel/arch/arm/boot/dts/hio-imx6dl-ppc4107.dtb)

Compiling U-boot

git clone -b imx_v2015.04_3.14.52_1.1.0_ga https://github.com/estonetechnology/ppc-4510-linux-uboot
source /opt/poky/2.1.3/environment-setup-cortexa9hf-neon-poky-linux-gnueabi 
export ARCH=arm 
export CROSS_COMPILE=arm-poky-linux-gnueabi-
cd ppc-4510-linux-uboot/
make hio-imx6dl-board_spl_defconfig 
make

Files require:

SPL
u-boot.img

Compiling Rootfs


  • Repo utility installation:
$ mkdir ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
  • Getting source code:
$ PATH=${PATH}:~/bin
$ mkdir fsl-community-bsp
$ cd fsl-community-bsp
$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b krogoth
$ repo sync
$ cd sources/
$ git clone -b krogoth https://github.com/meta-qt5/meta-qt5.git
$ git clone -b krogoth https://github.com/estonetechnology/meta-hio.git
$ git clone -b krogoth git://git.yoctoproject.org/meta-mono
$ cd fsl-community-bsp
$ . ./setup-environment build


Note: From the Build choose 1 set of these 3 configurations "bblayers.conf" & "local.conf" to move to conf/ directory depending on the desired configuration

hio-full-cmdline
$ mv ../sources/meta-hio/conf/hio-full-cmdline-example-local.conf conf/local.conf
$ mv ../sources/meta-hio/conf/hio-full-cmdline-example-bblayers.conf conf/bblayers.conf
hio-qt5-fb
$ mv ../sources/meta-hio/conf/hio-qt5-fb-example-local.conf conf/local.conf
$ mv ../sources/meta-hio/conf/hio-qt5-fb-example-bblayers.conf conf/bblayers.conf
hio-x11
$ mv ../sources/meta-hio/conf/hio-x11-example-local.conf conf/local.conf
$ mv ../sources/meta-hio/conf/hio-x11-example-bblayers.conf conf/bblayers.conf

bitbake image

$ bitbake core-image-full-cmdline

Compiled image: core-image-full-cmdline-hio-imx6dl-iob3200.tar.bz2 (fsl-community-bsp/build/tmp/deploy/images/hio-imx6dl-iob3200/core-image-full-cmdline-hio-imx6dl-iob3200.tar.bz2)

Flashing Image

Creating Android Image

Note: The Android Marshmallow 6.0 was mostly tested in the 14.04 x64 Ubuntu.

Requirements

CPU - 2 Core Processors
Memory Size - 4GB
Disk Space - 150GB
Operating System - Ubuntu 14.04 LTS

Preparation

Install required packages. Open Terminal and type commands below:

$ sudo apt-get update
$ sudo apt-get install uuid uuid-dev zlib1g-dev liblz-dev liblzo2-2 liblzo2-dev lzop
$ sudo apt-get install git-core curl u-boot-tools mtd-utils android-tools-fsutils
$ sudo apt-get install openjdk-7-jdk gnupg flex bison gperf libsdl1.2-dev libesd0-dev
$ sudo apt-get install libwxgtk3.0 squashfs-tools build-essential zip libncurses5-dev
$ sudo apt-get install libncurses5-dev schedtool libxml2 libxml2-utils xsltproc libc6-dev
$ sudo apt-get install schedtool g++-multilib lib32z1-dev lib32readline-gplv2-dev gcc-multilib 
$ sudo apt-get install libswitch-perl gcc-arm-linux-gnueabihf libssl1.0.0 libssl-dev

Configure git account:

$ git config --global user.name "First Last"
$ git config --global user.email "first.last@company.com"

Create repo:

$ cd ~
$ mkdir ppc4107-android
$ cd ppc4107-android
$ mkdir bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/ppc4107-android/bin/repo
$ chmod a+x ~/ppc4107-android/bin/repo
$ export PATH=${PATH}:~/ppc4107-android/bin

Getting Android source code:

Download Android 6.0.1 source code:

$ wget https://www.dropbox.com/s/wtb9y9c3dnxsglz/android-source-imx6-6.0.1-part1.tar.bz2?dl=0
$ wget https://www.dropbox.com/s/1lidgac6svw8qeh/android-source-imx6-6.0.1-part2.tar.bz2?dl=0
$ wget https://www.dropbox.com/s/5ukyd0s8ggrl3xu/android-source-imx6-6.0.1-part3.tar.bz2?dl=0
$ cat android-source-imx6-6.0.1-part* > filedir.tar.gz
$ tar -xvf filedir.tar.gz

Important:

Update all source codes from us for the unit:

$ cd android/
$ repo init -u https://github.com/estonetechnology/ppc-4107-android-bsp-platform
$ repo sync

Compiling images

Setting up build environment:

$ source build/envsetup.sh

Selecting product to build:

$ lunch sabresd_6dq-user

Compiling image:

$ make

Note: If "Make completed successful" appears the compilation is successful

Files require:

boot.img (android/out/target/product/sabresd_6dq)
boot-imx6dl.img (android/out/target/product/sabresd_6dq)
boot-imx6q.img (android/out/target/product/sabresd_6dq)
recovery.img (android/out/target/product/sabresd_6dq)
recovery-imx6dl.img (android/out/target/product/sabresd_6dq)
recovery-imx6q.img (android/out/target/product/sabresd_6dq)
system.img (android/out/target/product/sabresd_6dq)
u-boot-imx6dl.imx (android/out/target/product/sabresd_6dq)
u-boot-imx6q.imx (android/out/target/product/sabresd_6dq)

Flashing Image

Switching boot position to "2".

Opc-4207-boot.jpg

Use a mini USB type B to USB type A cable to connect the unit from OTG port to windows host.

Opc-4207-otg.jpg

Using mfgtools that has been extracted above to flash. Execute the ppc-4107-android.vbs:

Mfgtool-2.png
Click Start to flash the image.
Mfgtool-3.png
The flashing process is done once two processing bars turned to green.
Mfgtool-4.png
Now, click Stop and Exit the tool.

Starting up the unit
Unplug the cable and power. Change the boot selection to "1"
Opc-4207-boot1.jpg
Now, connect to power adapter and power on. The unit will start up.

PPC-4107-MYQ USB update

Update Operation Steps

1.Prepare system usb flash drive for upgrade
2.Plug USB flash disk to the host machine
3.Use tweezers to hold down the upgrade button

Ppc-4107-MYQ update.png

4.Machine is powered on
5.Wait at least 10 seconds to release the button
6.The screen will show running update.sh script on the usb flash drive for system upgrade

Ppc-4107-MYQ update-1.png

Note:USB flash disk must have update.sh script and upgrade files, Otherwise the upgrade will not be performed