VAR-SOM-MX6 Debian R1: Difference between revisions

From Variscite Wiki
No edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 2: Line 2:


= Overview =
= Overview =
This page describes how to assemble and install Linaro ALIP distro based on Debian Jessie on Variscite var-som-mx6 SoMs.
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.
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.
= SW Versions =
{| class="wikitable"
|-
! scope="col" | package<br/>
! scope="col" | version<br/>
|-
| U-Boot
| imx_v2015.04_4.1.15_1.1.0_ga_var01
|-
| kernel
| imx-rel_imx_4.1.15_1.1.0_ga-var02
|-
| wilink 8
| 8.6 SP1
|-
| firmware-imx
| 5.4
|-
| imx-vpu
| 5.4.33
|-
| imx-codec
| 4.0.9
|-
| imx-gpu-viv
| 5.0.11.p8.4
|-
| xserver-xorg-video-imx-viv
| 5.0.11.p8.4
|-
| libimxvpu
| 0.10.2
|-
| gstreamer-imx
| 0.12.2
|-
| Linaro Debian ALIP
| 20160722-27
|-
|}


= Create build environment =
= Create build environment =
Line 11: Line 53:


=== Debian jessie x64  ===
=== Debian jessie x64  ===
If your system does not have "sudo", set the "sudo" using the link: [https://www.privateinternetaccess.com/forum/discussion/18063/debian-8-1-0-jessie-sudo-fix-not-installed-by-default]
If your system does not have "sudo", set the "sudo" using the link: [https://www.privateinternetaccess.com/forum/discussion/18063/debian-8-1-0-jessie-sudo-fix-not-installed-by-default]


Line 92: Line 133:


= Create boot SD card =
= Create boot SD card =
#Follow the steps for make rootfs, kernel, bootloader;
#Follow the steps for make bootloader, kernel, rootfs;
#Insert the SD card to card reader connected to a host system;
#Insert the SD card (minimum 4GB required) to card reader connected to a host system;
#Run the following commands (Caution! All data on the card will be destroyed):
#Run the following commands (Caution! All data on the card will be destroyed):
<pre>
<pre>
Line 107: Line 148:
35+0 records in
35+0 records in
35+0 records out
35+0 records out
35840 bytes (36 kB) copied, 0.0773679 s, 463 kB/s
35840 bytes (36 kB) copied, 0.0462534 s, 775 kB/s
237+1 records in
309+1 records in
237+1 records out
309+1 records out
243104 bytes (243 kB) copied, 0.720032 s, 338 kB/s
316836 bytes (317 kB) copied, 0.0288378 s, 11.0 MB/s
I: Flashing "BOOT-VARSOM" partition
I: Flashing "BOOT-VARSOM" partition
I: Flashing "rootfs" partition
I: Flashing "rootfs" partition
Line 178: Line 219:


= Linux console access =
= Linux console access =
Standard Linaro Debian ALIP provide 2 user with no password:
Standard Linaro Debian ALIP provide 2 users:
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 185: Line 226:
|-
|-
| root
| root
| system administrator
| system administrator, no password
|-
|-
| linaro
| linaro
| local user belonging to sudoers
| local user belonging to sudoers, password linaro
|-
|-
|}
|}
Please note that for security reasons, root access is not allowed via ssh.
= iMX6 accelerations packages =
To support iMX6 GPU acceleration, libdrm souces have been patched to support Vivante using [https://raw.githubusercontent.com/Freescale/meta-fsl-arm/jethro/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch 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 [https://github.com/Freescale/gstreamer-imx gstreamer-imx] plugins will be used.


= Flash images to eMMC =
= Flash images to eMMC =
If you want to flash images on eMMC, on the device, as '''root''', run the following command:
root@linaro-alip:~# 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 command are located in /usr/sbin folder of uSD card used to boot debian.
Please remember to check/set a valid date in your board before installing debian to eMMC using date command:
root@linaro-alip:~# date -s "Aug 16 2016 15:09:27 CEST"
This will avoid time warning while uncompressing rootfs to eMMC.
= Additional notes =
== 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
== 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 [http://www.variscite.com/support/variscite-customer-portal Variscite Customer Portal] and fill-out a support ticket: we will update the build scripts with upgraded packages.
= How-to: Test and use an Interface =
Please see this section in the [[VAR-SOM-MX6_Yocto_Krogoth|Yocto developer guide page]]. It is the same for Debian.
= How-to: Modify kernel configuration =
To modify kernel configuration (add/remove features and drivers) please follow the steps below:


If you want to flash images on eMMC, on the device, as '''root''', run the following command:
<pre>
<pre>
# debian-emmc.sh
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
</pre>
</pre>
The above command are located in /usr/bin folder of uSD card used to boot debian.

Latest revision as of 17:33, 5 March 2017

VAR-SOM-MX6 - Debian Jessie release

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.

SW Versions

package
version
U-Boot imx_v2015.04_4.1.15_1.1.0_ga_var01
kernel imx-rel_imx_4.1.15_1.1.0_ga-var02
wilink 8 8.6 SP1
firmware-imx 5.4
imx-vpu 5.4.33
imx-codec 4.0.9
imx-gpu-viv 5.0.11.p8.4
xserver-xorg-video-imx-viv 5.0.11.p8.4
libimxvpu 0.10.2
gstreamer-imx 0.12.2
Linaro Debian ALIP 20160722-27

Create build environment

Installing required packages

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

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

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_var01 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.

Make Debian

Build all

Internet connection should be available

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

Build by parts

Build bootloader

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

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

Build rootfs

Internet connection should be available

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

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

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: 

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-solo-vsc.dtb VAR-SOM-MX6 with iMX6D/Q on SOLOCustomBoard with capacitive touch

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.

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.

Flash images to eMMC

If you want to flash images on eMMC, on the device, as root, run the following command:

root@linaro-alip:~# 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 command are located in /usr/sbin folder of uSD card used to boot debian.

Please remember to check/set a valid date in your board before installing debian to eMMC using date command:

root@linaro-alip:~# date -s "Aug 16 2016 15:09:27 CEST"

This will avoid time warning while uncompressing rootfs to eMMC.

Additional notes

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

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.

How-to: Test and use an Interface

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

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