To bring my Digilent Arty board to life I had to install “Vivado Lab 2016.2”, a software to program Xilinx FPGA’s. Specifically I used to follow the SiFive Freedom U500 Arty FPGA Getting Started Guide. While installing Vivado Lab succeeded, I had some trouble running it on my Arch Linux. The Shortcut did not show anything, but when running it from console I could see the following error:
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libncurses.so.5: cannot open shared object file: No such file or directory
It turned out that just linking the new ncurses library makes it working
$ sudo ln -s /usr/lib/libncursesw.so /usr/lib/libncurses.so.5
This is part two of my blog post about Kernel-Virtual Machine (KVM) on a 32-Bit ARM architecture. The post is meant as a starting point for those who want to play with KVM and provide a useful collection of Qemu commands for virtualization.
Virtualization host setup
The Kernel configuration I used for my platforms Host kernel can be found here. Since I run my experiments on a Toradex Colibri iMX7D module, I started with the v4.1 configuration of the BSP kernel and updated that to v4.8 plus enabled KVM as well as KSM (Kernel same-page merging).
As root file system I use a slightly modified version of the Ångström distributions “development-image”, version 2015.12 (built from scratch with OpenEmbedded). Any recent ARM root file system should do it. I let Qemu v2.6.0 preinstall (by just adding “qemu” to the image and specifying ANGSTROM_QEMU_VERSION = “2.6.0” in conf/distro/angstrom-v2015.12.conf).
Virtualization guest setup
For the virtualization guest setup I was looking for something minimalistic. I uploaded the compiled binary of the Kernel (as tared zImage) and initramfs (as cpio.gz).
I built a custom kernel directly using v4.7 sources and a modified/stripped down version of the vexpress_defconfig (virt_guest_defconfig). I found it useful to look into Qemu’s “virt” machine setup code (hw/arm/virt.c) to understand what peripherals are actually emulated (and hence what drivers are actually required). Read more »
Given two systems, both with a Cortex-A5 CPU, one clocked at 396MHz without L2 cache and one clocked at 500 MHz with 512kB L2 cache. How big is the impact of the L2 cache? Since the clock frequency is different, a simple CPU time comparison of a given program does not answer the question… I tried to answer this question using perf. perf is often used to profile software, but in this case it also proved to be useful to compare two different hardware implementations.
Most CPU’s nowadays have internal counters which count various events (e.g. executed instructions, cache misses, executed branches and branch misses etc…). Other hardware, e.g. cache controllers, might expose performance counters too, but this article focuses on the hardware counters exposed by the CPU. Read more »
This article shows how to use a recent mainline/upstream Linux kernel on Toradex Colibri T20. Although Toradex provides a Linux BSP (based on L4T Kernel 3.1), there are reasons to use a mainline Linux kernel. Most prominent is to get a recent version of the Kernel itself, along with updated and new drivers. Having mainline support also might lead to having Distribution support in future, such as Debian or Fedora.
However, the mainline Linux kernel for Tegra 2 is not feature complete, especially proper DFVS (dynamic frequency and voltage scaling), NAND flash driver and a hardware accelerated 3D driver are missing. There are efforts reverse engineering the Tegra 2/3 graphic stack (see grate).
This how-to wipes the whole module, including the configuration block which contains serial number and MAC address. Its possible to restore those information using Toradex BSP and the create_configblock.sh utility. Since Toradex Tegra modules are not locked by a manufacturer key, one can use nvflash or tegrarcm to access the Boot ROM and reflash the device (see also this Blog post about that topic). The modules are, from a flashing perspective, unbrickable!
Ok, lets get started. Make sure you have a Linux cross compile toolchain for ARM ready (e.g. from Linaro) along with a device tree compiler (DTC). Read more »
This blog post provides a big picture of the Linux Tegra OSS world. The Wikipedia article about Tegra serves well to get an overview of the Tegra SoC in general, especially from the hardware side.
Linux/Android software provided from NVidia for the Tegra processors are generally known as Linux for Tegra (L4T). Beside the Kernel and its sources, this includes proprietary driver binaries and utilities.
On the other side, today, open source projects such as Linux or U-Boot have a fairly well upstream support for Tegra too. Also thanks to the effort of NVidia providing open source code and documentation as well as pushing things upstream.
This article should provide a big picture about the boot process, available boot software and the state of upstream implementation. Its not a complete view of things, but it would have helped me learning about the Tegra world, so it might help others too :-).
Read more »
In order to extend the amount of SATA disk in my server I decided to use the Adaptec 6805H single Host Bus Adapter (which converts from PCI-E bus to SAS/SATA bus :-)). The device uses a PMC PM80xx chipset. SAS is backward compatible to SATA, one can connect up to 4 devices on a SAS port on this device. The BIOS is not very fast, however my four SATA disks were recognized without any problem. Also, the Ubuntu 13.04 Linux Kernel detected the card with the PCI-ID 9005:8081 using the module pm80xx. Rebuilding of a RAID5 consisting of 4 WD Red 3TB disks went reasonable fast with approximately 130MB/sec. So far, I can recommend that controller for Linux users! Read more »
This short tutorial shows how to resize a ext4 root filesystem online. Most people use gparted from a recovery system for this task, and I also recommend that for if you are not familiar with the tools used in this guide. Also, make sure you have a backup of the data (I did this myself on a system I just installed, so I would not mind if anything goes wrong). Generally this is not different from doing a manual MBR/fdisk resize, except that we need to treat the unique partition GUID specially since we should maintain it (for boot loaders/boot managers).
So, here is how I resized my ext4 root partition (sda2) using gdisk and resize2fs: Read more »
My digital camera Canon PowerShot S100 was not detected by Arch Linux automatically despite i’ve installed the required libgphoto2 package. Googling around I found a fix: It looks like GPhoto2 tries to load the wrong driver due to the ambiguous camera name (Canon released two cameras with the same name). The easiest way fixing this is disabling the old driver:
# mkdir /usr/lib/libgphoto2/2.5.2/disabled/
# mv /usr/lib/libgphoto2/2.5.2/canon* /usr/lib/libgphoto2/2.5.2/disabled/
Read more »
This guide shows how to install Arch Linux using a USB-Stick. A running U-Boot installation is required, in my case this was U-Boot 2013.04 which came with the original image. Next, I created a memory stick. I followed the documentation of Arch Linux ARM, I just used a USB stick instead of a Micro SD-Card. Now, plug the USB stick into your Beagle Bone Black and press a key to get the U-Boot prompt. U-Boot has the ability to boot from a USB stick, but some custom commands are required. First you need to scan the USB bus system.
U-Boot# usb reset
USB0: scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Read more »
In order to use the Linaro ARM cross-toolchain on Arch Linux, some 32-Bit Libraries need to be available. Arch Linux supports multiarch too, just enable the packages in your /etc/pacman.conf:
Include = /etc/pacman.d/mirrorlist
Update your packages
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib 104.5 KiB 148K/s 00:01 [##################################] 100%
Unlike in Debian based distribution the GNU C Library package is called lib32-glibc. Additionally needed libraries by GCC (such as libstdc++6) are included in the package lib32-gcc-libs.
pacman -S lib32-glibc lib32-gcc-libs lib32-zlib