Personal tools

VAR-SOM-MX6 Debian R2

From Variscite Wiki

Jump to: navigation, search

VAR-SOM-MX6 - Debian Jessie release 02


1 Overview

This page describes how to assemble and install Linaro ALIP (ARM Linux Internet Platform) distro based on Debian Jessie for Variscite var-som-mx6 SoMs.

This instruction was tested with Debian 8.4 x64 (jessie) and Ubuntu 14.04/16.04 x64! When using other distributions, there may be problems.

2 SW Versions

package
version
U-Boot imx_v2015.04_4.1.15_1.1.0_ga_var01
kernel imx-rel_imx_4.1.15_2.0.0_ga-var01
wilink 8 8.6 SP1
firmware-imx 5.4
imx-vpu 5.4.35
imx-codec 4.1.4
imx-gpu-viv 5.0.11.p8.6
xserver-xorg-video-imx-viv 5.0.11.p8.6
libimxvpu 0.10.3
gstreamer-imx 0.12.3
Linaro Debian ALIP 20161117-32

3 Create build environment

3.1 Installing required packages

3.1.1 Debian jessie x64

If your system does not have "sudo", set the "sudo" using the link: [1]

On your Debian building machine:

$ sudo apt-get install -y binfmt-support qemu qemu-user-static debootstrap kpartx
$ sudo apt-get install -y lvm2 dosfstools gpart binutils git lib32ncurses5-dev python-m2crypto
$ sudo apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev
$ sudo apt-get install -y autoconf libtool libglib2.0-dev libarchive-dev
$ sudo apt-get install -y python-git xterm sed cvs subversion coreutils texi2html bc
$ sudo apt-get install -y docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev
$ sudo apt-get install -y libglu1-mesa-dev mercurial automake groff curl lzop asciidoc u-boot-tools mtd-utils

3.1.2 Ubuntu 14.04/16.04 x64

On your Ubuntu building machine:

$ sudo apt-get install -y binfmt-support qemu qemu-user-static debootstrap kpartx
$ sudo apt-get install -y lvm2 dosfstools gpart binutils git lib32ncurses5-dev python-m2crypto
$ sudo apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev
$ sudo apt-get install -y autoconf libtool libglib2.0-dev libarchive-dev
$ sudo apt-get install -y python-git xterm sed cvs subversion coreutils texi2html bc
$ sudo apt-get install -y docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev
$ sudo apt-get install -y libglu1-mesa-dev mercurial automake groff curl lzop asciidoc u-boot-tools mtd-utils

3.2 Deploy source

Download archive contains the build script and support files for building Debian (Jessie) for this board:

$ cd ~
$ git clone https://github.com/varigit/debian-var.git -b debian_jessie_varsommx6_var02 var_som_mx6_debian

Create environment (Internet connection should be available):

$ cd ~/var_som_mx6_debian
$ ./make_var_som_mx6_debian.sh -c deploy

This environment prepared to build.

4 Make Debian

4.1 Build all

Internet connection should be available

$ cd ~/var_som_mx6_debian
$ sudo ./make_var_som_mx6_debian.sh -c all | tee 2.log

4.2 Build by parts

4.2.1 Build bootloader

$ cd ~/var_som_mx6_debian
$ ./make_var_som_mx6_debian.sh -c bootloader

4.2.2 Build kernel, dtb files and kernel modules

$ cd ~/var_som_mx6_debian
$ ./make_var_som_mx6_debian.sh -c kernel
$ ./make_var_som_mx6_debian.sh -c modules

4.2.3 Build rootfs

Internet connection should be available

$ cd ~/var_som_mx6_debian
$ sudo ./make_var_som_mx6_debian.sh -c rootfs

4.2.4 Pack rootfs

For the create archive root file system (rootfs.tar.bz2) run the following commands:

$ cd ~/var_som_mx6_debian
$ sudo ./make_var_som_mx6_debian.sh -c rtar

5 Create boot SD card

  1. Follow the steps for make bootloader, kernel, rootfs;
  2. Insert the SD card (minimum 4GB required) to card reader connected to a host system;
  3. Run the following commands (Caution! All data on the card will be destroyed):
$ cd ~/var_som_mx6_debian
$ sudo ./make_var_som_mx6_debian.sh -c sdcard -d /dev/sdX

where '/dev/sdX' path to the block SD device in your system.

Successful process log

I: Flashing U-Boot
35+0 records in
35+0 records out
35840 bytes (36 kB) copied, 0.0462534 s, 775 kB/s
309+1 records in
309+1 records out
316836 bytes (317 kB) copied, 0.0288378 s, 11.0 MB/s
I: Flashing "BOOT-VARSOM" partition
I: Flashing "rootfs" partition
I: Copying Debian images to /opt/images/Debian
I: Copying MMC U-Boot to /opt/images/Debian
I: Copying scripts to /opt/images/Debian
I: Sync sdcard...
I: Done make sdcard!
I: 
I: Command: "sdcard" end. Exit code: 0
I: 

6 Build Results

The resulted images are located in ~/var_som_mx6_debian/output/.

Image Name
How to use
rootfs.tar.bz2 Used to create sdcard
uImage Linux kernel image
SPL.mmc SPL built for SD-Card and eMMC boot. The SPL is pre-u-boot SW component, required for DDR initialization
u-boot.bin.mmc u-boot built for SD-Card boot, or eMMC boot in case of DART-MX6UL.
Device Tree Name
Boot Device
imx6dl-var-som-cap.dtb VAR-SOM-MX6 with iMX6S/DL on MX6CustomBoard with capacitive touch
imx6dl-var-som-res.dtb VAR-SOM-MX6 with iMX6S/DL on MX6CustomBoard with resistive touch
imx6dl-var-som-solo-cap.dtb VAR-SOM-SOLO with iMX6S/DL on MX6CustomBoard with capacitive touch
imx6dl-var-som-solo-res.dtb VAR-SOM-SOLO with iMX6S/DL on MX6CustomBoard with resistive touch
imx6dl-var-som-solo-vsc.dtb VAR-SOM-SOLO with iMX6S/DL on SOLOCustomBoard with capacitive touch
imx6dl-var-som-vsc.dtb VAR-SOM-MX6 with iMX6S/DL on SOLOCustomBoard with capacitive touch
imx6q-var-dart.dtb DART-MX6 with iMX6D/Q on DARTCustomBoard with capacitive touch
imx6q-var-som-cap.dtb VAR-SOM-MX6 with iMX6D/Q on MX6CustomBoard with capacitive touch
imx6q-var-som-res.dtb VAR-SOM-MX6 with iMX6D/Q on MX6CustomBoard with resistive touch
imx6q-var-som-vsc.dtb VAR-SOM-MX6 with iMX6D/Q on SOLOCustomBoard with capacitive touch

7 Linux console access

Standard Linaro Debian ALIP provide 2 users:

User name
User descriptor
root system administrator, no password
linaro local user belonging to sudoers, password linaro

Please note that for security reasons, root access is not allowed via ssh.

8 iMX6 accelerations packages

To support iMX6 GPU acceleration, libdrm souces have been patched to support Vivante using drm-update-arm.patch.

Since mesa and xorg-server sources depends on libdrm sources, related deb packages have been rebuilt.

To speed up rootfs generations, all generated deb packages are already part of the git repo and will be installed to substitute official ones. To avoid unwanted substitutions via apt-get upgrade, all those packages will be "set on hold" via apt-mark.

To support iMX6 VPU acceleration and avoid patching standard gstreamer, the new community driven gstreamer-imx plugins will be used.

9 Flash images to eMMC

To install Debian to the on-SOM eMMC, run the following command as root:

# debian-install.sh -b <mx6cb|scb|dart> -t <cap|res>

where the "-b" option provide the carrier board used (MX6CustomBoard/SOLOCustomBoard/DART-MX6) and the "-t" option provide the touch type when using MX6CustomBoard (ignored otherwise)

The above script is located in /usr/sbin in the rootfs of the SD card used to boot Debian.

To avoid have a lot of time warnings when installing Debian to eMMC, please verify/set a valid date using the date command, before calling the installation script:

# date -s "Aug 16 2016 15:09:27 CEST"

10 Additional notes

10.1 WiFi settings

Debian ALIP uses network-manager service: to configure WiFi settings, please use Debian GUI (bottom left network icons) to avoid conflicts with manually configured wpa_supplicant instances.

Please also remember to configure your WiFi firmware to match your WL18XX p/n:

 $ cd /usr/sbin/wlconf/
 $ ./configure-device.sh

10.2 Packages downgrading

Using patched libdrm, if debian repository upgrade the version of these packages, could happen that while installing prebuilt packages (libdrm/mesa/xorg-server) the following warnings/errors could be displayed:

I: installing libdrm with arm patch
...
dpkg: warning: downgrading libdrm-dev:armhf from 2.4.70-1~bpo8+1 to 2.4.68-1~bpo8+1
...
Unpacking libdrm-dev:armhf (2.4.68-1~bpo8+1) over (2.4.70-1~bpo8+1) ...
dpkg: dependency problems prevent configuration of libdrm-dev:armhf:
...
dpkg: error processing package libdrm-dev:armhf (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libdrm-dev:armhf

If you observe such behaviour please login at Variscite Customer Portal and fill-out a support ticket: we will update the build scripts with upgraded packages.

11 How-to: Test and use an Interface

Please see this section in the Yocto developer guide page. It is the same for Debian.

12 How-to: Modify kernel configuration

To modify kernel configuration (add/remove features and drivers) please follow the steps below:

1. cd ~/var_som_mx6_debian/src/kernel
2. Run "sudo make ARCH=arm mrproper"
3. Run "sudo make ARCH=arm imx_v7_var_defconfig"
4. Run "sudo make ARCH=arm menuconfig"
5. Navigate the menu and select the desired kernel functionality
6. Exit the menu and answer "Yes" when asked "Do you wish to save your new configuration?"
7. Run "sudo make ARCH=arm savedefconfig"
8. Run "sudo cp arch/arm/configs/imx_v7_var_defconfig arch/arm/configs/imx_v7_var_defconfig.orig
9. Run "sudo cp defconfig arch/arm/configs/imx_v7_var_defconfig
10. Follow the instructions above to rebuild kernel and modules, repack rootfs images and recreate SD card