Blog

Debian buster U-Boot network installation to PC Utilite Pro

This manual explains how to install Debian buster on the internal SSD drive of the “Utilite Pro” device, made by CompuLab. Archived version of the official Utilite website is visible on Archive.org. Wheezy installation for Utilite is described here.

First step is to download Debian armhf CD image, then partition the micro-SD card, upgrade U-boot to newer release, boot with new U-Boot and netinstall Debian buster. Followed by writing/burning the updated U-Boot to internal SPI flash of the Utilite device (carefull with this step), and eventually U-Booting Debian over console from internal SSD drive.

Shell environment to use # for root shell, and $ for user shell. Drive used here is mentioned as /dev/sdb, but can be anything else on your setup /dev/sdX.

Serial console connection
First get serial connection working to be able to connect to Utilite/U-boot console.

screen /dev/ttyUSB0 115200
Device name can also be /dev/ttyS0

Download Debian armhf ISO image
You can download Debian armhf ISO image from Debian cdimage depository. The downloadaded filename used in this installation was debian-10.3.0-armhf-netinst.iso.

Starting
Install required Debian packages. Git clone the U-boot depository and compile cm-fx6 firmware image. Place it on micro-SD card.

apt install -y build-essential gcc-arm-linux-gnueabihf bison flex bc git

$ git clone https://gitlab.denx.de/u-boot/u-boot.git
$ cd u-boot
$ git checkout v2020.01
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ make cm_fx6_defconfig
$ make
$ tools/mkimage -n spl/u-boot-spl.cfgout -T imximage -e 0x908000 -d spl/u-boot-spl.bin spl.img

dd if=/dev/zero of=cm-fx6-firmware bs=64K count=1

dd if=spl.img of=cm-fx6-firmware bs=1K seek=1 conv=notrunc

dd if=u-boot.img of=cm-fx6-firmware bs=1K seek=64 conv=notrunc

Placing U-Boot firmware file on the micro-SD card

dd if=cm-fx6-firmware of=/dev/sdb bs=1K seek=1 skip=1
Create partitions on the micro-SD card
Create a fresh filesystem on first partition. U-Boot will reside between the first partition and the MBR

sfdisk -X dos /dev/sdb << ‘EOF’

2048 – – –
EOF
Create partition on micro-SD card

fdisk /dev/sdb

p

n

1

2048

Choose default until the end of sectors. Choose Linux as partition type.

w

Create an ext2 filesystem on the first partition.

mkfs.ext2 /dev/sdb1

Copy the content of armhf CD ISO to the micro-SD card partition 1

mkdir /mnt/armhfcdiso

mkdir /mnt/sdcard1

mount -o loop /path_to_debian-10.3.0-armhf-netinst.iso /mnt/armhfcdiso

mount /dev/sdb1 /mnt/sdcard1

cp -rv /mnt/armhfcdiso/* /mnt/sdcard1/

sync

umount /mnt/sdcard1

umount /mnt/armhfcdiso

Debian U-Boot, kernel netboot
Netboot initrd kernel image. Plug in the ethernet cable into one of the Utilite ethernet’s ports, to continue with the installation.

load mmc 2:1 0x12000000 install.ahf/vmlinuz

load mmc 2:1 0x13000000 install.ahf/netboot/initrd.gz

load mmc 2:1 0x18000000 install.ahf/device-tree/imx6q-utilite-pro.dtb

setenv bootargs console=ttymxc3,115200 ${video}

bootz 0x12000000 0x13000000:0x164707d 0x18000000

Continue with the Debian installer, after successfull boot. These steps aren’t described. When the installer finishes, reboot and test boot SSD drive.

Testing SSD drive boot

sata init

load sata 0:1 0x12000000 vmlinuz

load sata 0:1 0x13000000 initrd.img

load sata 0:2 0x18000000 usr/lib/linux-image-4.19.0-8-armmp/imx6q-utilite-pro.dtb

setenv bootargs console=ttymxc3,115200 root=/dev/sda2 ro rootwait ${video}

bootz 0x12000000 0x13000000:0x139535e 0x18000000

Writing new U-boot version on the internal SPI flash
Be carefull here, this can result into a bricked SPI flash (bricked Utilite) !!! This step is not obligatory, because you can always U-boot with micro-SD card

load mmc 2:1 0x12000000 cm-fx6-firmware

613110 bytes read in 67 ms (8.7 MiB/s)

sf probe 0

SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB

sf erase 0x0 0xc0000

SF: 786432 bytes @ 0x0 Erased: OK

sf write 0x12000000 0x0 0x95af6

evice 0 offset 0x0, size 0x95af6 SF: 613110 bytes @ 0x0 Written: OK

Power off / Power on the Utilite
Resetting the U-boot parameters

env default -a

setenv bootdelay 60

saveenv

Final SSD drive boot
Connect serial console, when you want to boot the operating system, and type in the commands below.

sata init

load sata 0:1 0x12000000 vmlinuz

load sata 0:1 0x13000000 initrd.img

load sata 0:2 0x18000000 usr/lib/linux-image-4.19.0-8-armmp/imx6q-utilite-pro.dtb

setenv bootargs console=ttymxc3,115200 root=/dev/sda2 ro rootwait ${video}

bootz 0x12000000 0x13000000:0x139535e 0x18000000

Possible Errors
There is a repeated dmesg USB error message, repeated every 2 seconds. I don’t know how to fix or ignore that. It’s not affecting the functionality of the device.

[ 701.247913] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 703.255691] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 705.263478] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 707.271264] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 709.279065] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 711.286845] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 713.294632] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 715.302429] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 717.310218] usb 1-1: reset high-speed USB device number 2 using ci_hdrc

Coreboot installation on Chromebook ASUS C201PA

Goal

In this manual I will try to explain how to install Coreboot (2018 year version) on the Chromebook ASUS C201PA (later referred in the manual simply as C201) with the Paper build system. At the time of writing up this manual (Q1 2018), Libreboot didn’t have any updated sources for this laptop, so I decided it would be better to use Coreboot.

Introduction

There exists a Libreboot Chromebook ASUS C201 installation guide, and I would suggest you to read that first for easier understanding and detailed insight about what we’ll be trying to achieve through this manual. The steps are not identical, you will actually be installing Coreboot, which is a different project, but it might give you some ideas first about similar hardware and software being used here. I suggest that you read more about the Coreboot project, before proceeding with the installation. First of all before proceeding with anything you should already have a working GNU/Linux operating system on the C201. This manual does not explain how to install a GNU/Linux distribution on the C201, so you will need to find this information elsewhere. At the time of trying out this Coreboot installation I had a working GNU/Linux Debian 9 Stretch operating system on the SD card and Chrome operating system on the eMMC internal flash drive. This is my review of the summary by Paul Kocialkowski’s sets of instructions. Paul is a Libreboot and Coreboot developer who was willing to assist me getting this properly installed on my computer. The summary of all performed commands is written into a text file, so make sure to double check that, because this website wrongly renders and displays some of the characters.

Requirements

  • Secondary laptop (the same laptop could also be used)
  • USB key
  • Thin piece of plastic (guitar pick) for laptop disassembly
  • Installation of additional programs “apt-get install flashrom gnupg”

Laptop disassembly instructions

First step that you need to do is removing the write protect screw, which is inside the laptop. Refer to the similar Libreboot manual to read more about it. First you need to unscrew 8 screws which are holding the laptop together. Two of them are below the plastic caps/stands. Use something like a sharp piece of plastic to slide below them and remove them. You will need to open up the chasis of the C201. Best thing that can help you with that is by using some very thin piece of plastic, something like a guitar pick would be good. I did not have that and have used a credit card which was already a bit too thick to slide inside. You need to divide the shiny silver upper part and the lower blue part of the C201 by placing a piece of plastic in between and sliding it all around the lower part of the laptop. Beware that inside the laptop are the plastic clips which are holding the two parts together so don’t go too deep with the piece of plastic, not to break those clips. When you manage to divide the bottom and upper part of the laptop you need to beware not to divide those two parts up completelly, because inside there are two striped connectors (one black wider one for keyboard and one white thin one for touchpad), so be carefull when detaching those straps not to tear them apart (you don’t really need to detach them, you can also line up the parts). When you have opened up the laptop put it into such position. Then you unscrew the inner screw which is being marked inside of the white circle on the photo. That screw is the write protection screw for Coreboot, so without it you will be able to install Coreboot. When that is done, just assemble the laptop back together by pushing both parts (shiny silver upper part and bottom blue part) and save the screw.

Installation

Boot into Chrome OS. You will need some storage to transfer the files from Chrome OS to your other computer, an USB key is fine. You need to be in Chrome OS developer mode. Log in as root user into Chrome OS. This is done with Ctrl + Alt + F1 (top right arrow). Sometimes the root doesn’t have the password set, so just use the enter key to bypass password. You should see a visible # as a prompt. Insert the USB key. It will probably automatically mount itself, in my case it has mounted under /media/removable/USBDRIVE . If the USB key doesn’t automatically mount, you will need to perform the mounting commands. You need to put a file (flash.img) on the USB key. Go to the USB key directory.

  • # cd /media/removable/USBDRIVE
  • # flashrom -p host -r flash.img

Copy file flash.img to USB key. Power off the computer and stick the USB key into another computer. Boot into your favourite GNU/Linux distribution. Install Paul Kocialkowski’s gnupg public key (fingerprint 01B7 0C5D 940C B63D 5FA6 12C2 84FD C1EA 8FEE 950C) for verifying the installer. Create a directory on the PC and copy file flash.img from USB key there. Run the following commands as normal user (non-root) on another computer:

  • gpg –recv-keys 8FEE950C
  • export DOWNLOAD_URL=http://jp.si/C201/paper-release-20180102/
  • wget “$DOWNLOAD_URL/tools/x86_64/libreboot-release/libreboot-release”
  • chmod a+x libreboot-release
  • ./libreboot-release prepare cros-scripts vboot-tools coreboot-depthcharge-veyron-speedy

You should see an output similar to this. Then continue with the following commands:

  • VBOOT_TOOLS_PATH=tools/x86_64/vboot/vboot-tools tools/x86_64/cros-scripts/cros-scripts/cros-firmware-prepare vpd flash.img extract vpd.bin
  • VBOOT_TOOLS_PATH=tools/x86_64/vboot/vboot-tools tools/x86_64/cros-scripts/cros-scripts/cros-firmware-prepare vpd images/coreboot/coreboot-depthcharge-veyron-speedy/coreboot.rom replace vpd.bin
  • cp images/coreboot/coreboot-depthcharge-veyron-speedy/coreboot.rom .

You should see an output similar to this. Copy coreboot.rom file to the USB key. Power up C201 again and boot into Chrome OS. Insert the USB key and go into USB key directory, then type as root:

  • # flashrom -p host -w coreboot.rom

You should see a message like this:

erasing and writing flash chip…..Verifying flash….VERIFIED

SUCCESS

Then check the output of the crossystem command

  • # crossystem | grep dev_boot

If you see:

dev_boot_usb=1 , dev_boot_legacy=0 , dev_boot_signed_only=0

Then it is OK to reboot the C201. And that’s it. Commands that can be used during the Coreboot boot menu are:

  • Ctrl+h = Pauses the screen
  • Ctrl+u = Boots the GNU/Linux distribution (default is ChromeOS)

Disclaimer

Be sure to read the disclaimer before proceeding with the installation.

Setting up Qrator EBGP multihop session

In this post I am going to explain how to setup a (Qrator) EBGP multihop session on quagga. Qrator radar is the Autonomous System monitoring service and provides several monitoring tools inside their interface. They offer free and payable services. Some of their services are available for public view and there is also access for AS maintainers, who can sign up for an account. First open the Qrator EBGP multihop configuration menu. This menu asks about the IP address of your router and password for protecting the EBGP multihop session. Password entry is not obligatory, so it is possible to leave that field empty. Proceed configuring your router (quagga) next. Enter into enabled mode on quagga with “enable” command.

  1. First go into configuration mode on quagga.
  2. Define the AS of your router
  3. Define Qrator neighbor and their AS
  4. Define your router’s source IP address
  5. Define the number of ttl hops (50 should suffice)
  6. Activate the neighbor
  1. # conf t
  2. # router bgp <your AS here>
  3. # nei 178.248.237.29 remote-as 197068
  4. # nei 178.248.237.29 update-source <your router’s IP here>
  5. # nei 178.248.237.29 ebgp-multihop 50
  6. # nei 178.248.237.29 activate

The Qrator’s router IP could be different in your case, check their notification system for the information. Additionally you can also check the Qrator FAQ.

Setting up ALSA on Chromebook Asus C201 Debian

ALSA – Advanced Linux Sound Architecture

After initial preparation of the bootable Debian images, I managed to boot into Debian from the SD card and run system upgrade and migrate the Operating System from Debian Jessie to Debian Stretch (current Debian testing release). The migration was successful. There are a few things that still require tuning on this laptop, one of them is the ALSA (Advanced Linux Sound Architecture) system. Before proceeding with ALSA settings, there are a few things worth mentioning. The default installation doesn’t provide the working ALSA subsystem, and it can be “unsafe” (see disclaimer on the bottom of this article) if you try using the sound system without the correct system configuration, as you might even damage or ruin the speakers. So to begin with the settings:

First we will install the base of the ALSA packages, alsamixer for tuning the settings and pavucontrol monitor for setting additonal pulseaudio values:

  • aptitude install alsa-utils alsamixergui pulseaudio pulseaudio-utils pavucontrol

We start with configuration of the ALSA values by using the “amixer” entries. It’s advisable to copy all these values inside the script, so they can be executed after reboot in case of configuration loss. We will be using program “amixer” with “-Dhw” parameter and “ROCKCHIPI2S” is the device name we’re setting up. You can ignore the error “shared memfd open() failed: Function not implemented” if it appears. It is something related to the Linux kernel settings, which cannot be alternated inside the current running kernel. Apply the settings below as root or use “sudo” from the user account.

amixer -Dhw:ROCKCHIPI2S cset name=’Left Speaker Mixer Left DAC Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Right Speaker Mixer Right DAC Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Headphone Left Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Headphone Right Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Digital EQ 3 Band Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Digital EQ 5 Band Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Digital EQ 7 Band Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Biquad Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Filter Mode’ Music
amixer -Dhw:ROCKCHIPI2S cset name=’ADC Oversampling Rate’ 0
amixer -Dhw:ROCKCHIPI2S cset name=’DMIC Mux’ DMIC
amixer -Dhw:ROCKCHIPI2S cset name=’MIC2 Mux’ IN34
amixer -Dhw:ROCKCHIPI2S cset name=’Right ADC Mixer MIC2 Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Left ADC Mixer MIC2 Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’MIC2 Volume’ 20
amixer -Dhw:ROCKCHIPI2S cset name=’Headset Mic Switch’ off
amixer -Dhw:ROCKCHIPI2S cset name=’Int Mic Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’ADCR Boost Volume’ 4
amixer -Dhw:ROCKCHIPI2S cset name=’ADCL Boost Volume’ 4
amixer -Dhw:ROCKCHIPI2S cset name=’ADCR Volume’ 11
amixer -Dhw:ROCKCHIPI2S cset name=’ADCL Volume’ 11
amixer -Dhw:ROCKCHIPI2S cset name=’Left Speaker Mixer Left DAC Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Right Speaker Mixer Right DAC Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Speaker Left Mixer Volume’ 2
amixer -Dhw:ROCKCHIPI2S cset name=’Speaker Right Mixer Volume’ 2
amixer -Dhw:ROCKCHIPI2S cset name=’Record Path DC Blocking’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Playback Path DC Blocking’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Speaker Left Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Speaker Right Switch’ on
amixer -Dhw:ROCKCHIPI2S cset name=’Speaker Switch’ on

After implementing these values, the sound system should be ready. Test if there is any sound coming from the speakers by playing a .wav file on your computer. You can do this with the program “aplay”. There is a short manual for soundcard testing.

  • aplay -vv soundfile.wav

If this command gives you a visualisation of playing graphics inside the terminal but not producing the actual sound from the speakers, you can continue with sound test outside of “pulseaudio” mode with:

  • pasuspender — speaker-test -c2 -twav -l3 -Dhw:ROCKCHIPI2S

This should produce the sound in your speakers by a voice saying “Front left (on the left speaker) and front right (on the right speaker)”. You should probably hear this. This means that the hardware itself works and it could also mean that the pulseaudio is doing something strange not to hear the sound by using “aplay”. Next thing you could try is using pavucontrol GUI, which is the main pulseaudio configuration tool. Look at the picture below and match your settings similar to it, focus on the “Output devices” section and make sure the output device is selected as your fallback device and that it is not muted. Start “pavucontrol” as root and a GUI will open a similar image like the one below:

Select the bottom output device where it says “ROCKCHIP-I2S Analog Stereo” click on the speaker button to mute it and then again to unmute the device (just to be sure) and click the green button on the right side where is the setting for setting default output device. This worked for me and I was able to hear the sound coming out from the speakers.

The last thing which you need to apply is storing the ALSA values permanently into the system which will also work after reboot.

You can do this as root just type:

  • alsactl store

Alternative thing if “alsactl store” doesn’t save the values for you, you can still save the settings for ALSA inside the script with:

  • alsactl –file ~/.config/asound.state store

Which you reload after reboot with:

  • alsactl –file ~/.config/asound.state restore

That’s about it.

Disclaimer

Be sure to read the disclaimer before proceeding with the installation.

Huawei E3372 LTE modem on Ubuntu

I have purchased Huawei E3372 LTE modem for the purpose of using it as a backup link for my home Internet connection. I have found a good option with Telemach mobile carrier that offers pay-per-use access to their LTE network with NET2GO mobile data package. You only pay when you actually need to access the Internet. So let’s see how to configure this thing on Ubuntu ARM computer.

When first inserting the USB dongle with the SIM card into computer, this is what “dmesg” will reveal:

# dmesg

  • usb 1-1.4: new high-speed USB device number 3 using ci_hdrc
  • usb-storage 1-1.4:1.0: USB Mass Storage device detected
  • scsi1 : usb-storage 1-1.4:1.0 scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
  • scsi 1:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
  • sd 1:0:0:1: [sdb] Attached SCSI removable disk
  • usb 1-1.4: USB disconnect, device number 3
  • usb 1-1.4: new high-speed USB device number 4 using ci_hdrc
  • usb-storage 1-1.4:1.2: USB Mass Storage device detected
  • scsi2 : usb-storage 1-1.4:1.2
  • scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
  • sd 2:0:0:0: [sdb] Attached SCSI removable disk

# lsusb

  • Bus 001 Device 004: ID 12d1:14dc Huawei Technologies Co., Ltd.

For things to work you need several usb modules compiled already in the kernel. Since I have an ARM machine I don’t have the required modules (usbnet, usbcore, cdc_ether) compiled, therefore I was unable to continue from here, without kernel recompilation. It is suggested that you have all the required usb packages installed to further continue with the setup.

# aptitude install libusb++-0.1-4c2 libusb++-dev libusb-1.0-0-dev libusb-dev

There is a tool called “usb_modeswitch” that I used to detect the modem. Next packages to be installed are “usb-modeswitch usb-modeswitch-data”.

# aptitude install usb-modeswitch usb-modeswitch-data

# usb_modeswitch -J -v 0x12d1 -p 0x14dc

From this point on I was out of luck to continue with the setup. Here is a list of related links from where you should find the additional information.

  • http://www.gnuton.org/blog/2015/07/huawei-e3372/
  • http://kernelreloaded.com/huwaei-e3372h-hilink-awesome-lte-modem/
  • http://www.gnuton.org/blog/2015/07/huawei-e3372/https://johnlewis.ie/mobile-broadband-from-the-command-line-in-ubuntu/
  • https://trick77.com/setting-up-huawei-e3276-150-4g-lte-usb-modem-ubuntu-server-desktop/
  • http://www.linux-usb.org/usbnhttp://nvdcstuff.blogspot.com/2015/04/huawei-e3372-in-linux-raspberry-pi.htmlet/
  • http://askubuntu.com/questionshttp://ernstagn.home.xs4all.nl/GPRS-HOWTO/GPRS-HOWTO-6.html/755570/how-to-enable-broadband-connection-with-huawei-e3372h-on-ubuntu-server
  • http://nvdcstuff.blogspot.com/2015/04/huawei-e3372-in-linux-raspberry-pi.html
  • http://askubuntu.com/questionshttp://wiki.openmoko.org/wiki/USB_Networking/615302/modem-usb-serial-mode
  • http://forums.debian.net/viewtopic.php?f=5&t=124007
  • https://trick77.com/setting-up-huawei-e3276-150-4g-lte-usb-modem-ubuntu-server-desktop/
  • https://johnlewis.ie/mobile-broadband-from-the-command-line-in-ubuntu/
  • http://askubuntu.com/questions/755570/how-to-enable-broadband-connection-with-huawei-e3372h-on-ubuntu-server

Libreboot with Debian on Chromebook C201

libreboot logo
Libreboot logo made by Marcus Moeller (2014) – Creative Commons license CC0 1.0 Universal

A few months back I obtained a Google Chromebook Asus C201. It arrived preinstalled with Chrome OS as default operating system. This laptop was listed as one of the possible laptop models that can use Libreboot. Free Software developer Paul Kocialkowski has ported Libreboot to this Chromebook. Libreboot is a free BIOS or UEFI replacement (free as in freedom); libre boot firmware that initializes the hardware and starts a bootloader for your operating system. It’s also an open source BIOS, but open source fails to promote freedom; please call libreboot free software. Since I know Paul K. from the Internet, he helped me with the guidelines about creating bootable Debian image to be used on this laptop. In my next blog post I plan to describe how to successfully create these bootable Debian images. This laptop has three possibilities about using a secondary operating system.

  • First possibility is to install the system on internal storage and replace the default Chrome OS.
  • Second possibility is to use an external USB key and have it stored there and the
  • third possibility (which I have chosen) was to install Debian on the Micro-SD card.

With my current setup I prefer to keep Chrome OS on internal storage and I can select secondary booting method to boot up Debian from Micro-SD card. I used Debian stable (Jessie) image and afterwards I have upgraded to Debian testing (stretch) to use more recent Debian packages. Just a short info for people that don’t know about Debian. Debian has one of the best designed release methods amongst GNU/Linux distributions, and their “main” software pool contains only free software. The “main” pool is also the only software pool that I will use on this laptop. Currently there are no other suitable FSF authorised distributions that would run on this laptop, next possible ports will include the Guix system distribution and Paul Kocialkowski is working on porting the Parabola GNU/Linux-libre distribution. My goal is to use only free software on this laptop, but there are some limitations. First the BIOS needs to be replaced with Libreboot, and the integrated Wi-Fi chipset would only work with proprietary software. Therefore for this purpose I have purchased a free hardware replacement – Qualcomm Atheros external USB Wi-Fi card, that uses AR9271 chipset, which is known to operate with free software. The model of this access point card is Sophos AP 5 Rev. 1. More about the recommended steps will follow up soon …

GNU is 33 years old

heckert_gnu-small
GNU logo made by Aurelio A. Hackert – Creative Commons Attribution-ShareAlike 2.0 license

GNU is an operating system and an extensive collection of computer software. GNU is composed wholly of free software, most of which is licensed under GNU’s own GPL.

GNU is a recursive acronym for “GNU’s Not Unix!”, chosen because GNU’s design is Unix-like, but differs from Unix by being free software and containing no Unix code. The GNU project includes an operating system kernel, GNU HURD, which was the original focus of the Free Software Foundation (FSF). However, non-GNU kernels, most famously Linux, can also be used with GNU software; and since the kernel is the least mature part of GNU, this is how it is usually used. The combination of GNU software and the Linux kernel is commonly known as Linux (or less frequently GNU/Linux; see GNU/Linux naming controversy).

Development of the GNU operating system was initiated by Richard Stallman at the Massachusetts Institute of Technology (MIT) Artificial Intelligence Laboratory as a project called the GNU Project which was publicly announced on September 27, 1983, on the net.unix-wizards and net.usoft newsgroups by Richard Stallman.

More about GNU in the links below:

Upgrading U-boot to 2015.07 on Compulab Utilite

Utilitie-introThis manual is about upgrading U-boot on Utilite Standard / Pro device.

Originally the default U-boot on Utilite has version U-Boot 2009.08-cm-fx6-0.87+tools (Oct 06 2013 – 13:46:27). Here we try to flash the chip to U-Boot 2015.07-cm-fx6-3 (Sep 02 2015 – 13:30:11 +0300). This is how you proceed.

  • Have the Micro SD card ready and partitioned with “vfat” on the first /dev/sdb1 partition. Your partition name can be different than /dev/sdb1, put in the Micro SD card into the PC slot and run “dmesg” it will reveal which device it is at the end. Run the “mkfs” command with filesystem un-mounted to create vfat partition.
  • # mkfs -t vfat /dev/sdb1
  • Download the latest U-boot release from Compulab Utilite website or from this alternative location.
  • Ensure the integrity of the file with md5sum utility.
  • # md5sum utilite-updater.tar.bz2
  • bf0d453aeb61a680e15e263eb3ff31bb utilite-updater.tar.bz2
  • Untar the archive on PC to get the firmware image (cm-fx6-firmware file) and update script.
  • # mkdir utilite-updater
  • # tar -xvf utilite-updater.tar.bz2 -C utilite-updater
  • Copy the “cm-fx6-firmware” file onto first partition example /mnt/sdcard1 of the Micro SD card.
  • # cp utilite-updater/cm-fx6-firmware /mnt/sdcard1
  • Insert the Micro SD card into Utilite and boot Utilite, your old U-boot will appear.
  • Perform these commands
  • CM-FX6 # mmc dev 2
  • mmc2 is current device
  • CM-FX6 # mmc rescan
  • CM-FX6 # fatls mmc 2
  • 512000 cm-fx6-firmware 1 file(s), 0 dir(s)
  • CM-FX6 # fatload mmc 2 10800000 cm-fx6-firmware
  • reading cm-fx6-firmware
  • 512000 bytes read
  • From here on we will flash the U-boot (be aware that anything above this step is dangerous and can break your device, make sure you keep it powered until you finish all the other steps !)
  • CM-FX6 # sf probe 0
  • JEDEC ID: 0xbf:0x25:0x41 2048 KiB SST25VF016B – 2MB at 0:0 is now current device
  • CM-FX6 # sf erase 0 80000
  • Erasing SPI NOR flash 0x0 [0x80000 bytes] ………………………………………………………………………………………………………………..SUCCESS
  • CM-FX6 # sf write 10800000 0 80000
  • Writing SPI NOR flash 0x0 [0x80000 bytes] <- ram 0x10800000 …….SUCCESS

This is all, you can disconnect Utilite and replug it back to power. You should see the new U-boot on it.

If you upgrade from a more recent U-boot like U-Boot 2014.04-cm-fx6-1.3 (Sep 16 2014 – 16:11:56), then your messages will appear like this:

  • CM-FX6 # fatload mmc 2 10800000 cm-fx6-firmware
    reading cm-fx6-firmware
    512000 bytes read in 58 ms (8.4 MiB/s)
  • CM-FX6 # sf probe 0
    SF: Detected M25PX16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB
  • CM-FX6 # sf erase 0 80000
    SF: 524288 bytes @ 0x0 Erased: OK
  • CM-FX6 # sf write 10800000 0 80000
    SF: 524288 bytes @ 0x0 Written: OK

Links used for this manual:

I take no responsibility if you damage your Utilite device, this is not an official manual !

Compulab Utilite image with Ubuntu 14.04 LTS (Trusty Tahr)

Utilitie-introA new image for Utilite devices is available. Default Utilite images were based on Ubuntu 12.04 LTS (Precise Pangolin) now there is a new image with Ubuntu 14.04 LTS (Trusty Tahr). You can download it from here or from alternative download location. Once you have it on your hard drive, you can extract it to the Micro SD card. This is a 5 GB bootable image with lots of desktop applications, make sure you have at least 6 GB of available space on your Micro SD card. You can use this command to put the content of the file on your Micro SD card (be aware that it will erase all existing content on your SD card).

# xz -dc armhf-trusty-vpu-gpu.img.5G.xz | sudo dd of=/dev/<sdcard device node> bs=1M

After you are done, insert the Micro SD card into Utilite SD card slot and boot the device.

How to monitor Bind with Munin on Debian Jessie

Munin is a networked resource monitoring tool for monitoring your servers. Bind is most widely used open source software that implements the Domain Name System (DNS) protocols for the Internet. This manual doesn’t cover Munin or Bind installation, only the manual how to sync those two together to display queries from Bind inside Munin, here is how you do it :

1. Set some logging permissions for bind

# mkdir /var/log/bind9
# chown bind:bind /var/log/bind9
# service bind9 restart

2. Edit /etc/bind/named.conf.options and add these settings:
logging {
         channel b_log {
                 file "/var/log/bind9/bind.log" versions 30 size 1m;
                 print-time yes;
                 print-category yes;
                 print-severity yes;
                 severity info;
         };
 
         channel b_debug {
                 file "/var/log/bind9/debug.log" versions 2 size 1m;
                 print-time yes;
                 print-category yes;
                 print-severity yes;
                 severity dynamic;
         };
 
         channel b_query {
                 file "/var/log/bind9/query.log" versions 2 size 1m;
                 print-time yes;
                 severity info;
         };
 
         category default { b_log; b_debug; };
         category config { b_log; b_debug; };
         category queries { b_query; };
   };

3. Restart bind
# service bind9 restart

4. Configure munin-node plugin
# ln -s /usr/share/munin/plugins/bind9 /etc/munin/plugins/bind9

5. In /etc/munin/plugin-conf.d/munin-node make sure you have declared bind9 plugin: 
[bind9]
user root

6. Restart munin-node
# service munin-node restart

7. Enable rndc statistics in bind. Add a context inside /etc/bind/named.conf.options
statistics-file "/etc/bind/zones/statistics";
zone-statistics yes;

8. Create zones directory and statistics file
# mkdir /etc/bind/zones
# chown bind.bind /etc/bind/zones
# touch /etc/bind/zones/statistics
# chown bind.bind /etc/bind/zones/statistics

9. Restart bind
# service bind9 restart

10. Run rndc statistics
# rndc stats

11. Enable bind9_rndc plugin in munin
# ln -s /usr/share/munin/plugins/bind9_rndc /etc/munin/plugins/bind9_rndc

12. In /etc/munin/plugin-conf.d/munin-node make sure you have declared bind9_rndc plugin
[bind9_rndc]
user root
env.querystats /etc/bind/zones/statistics

13. Restart munin-node
# service munin-node restart

14. Create /etc/apparmor.d/local/usr.sbin.named and add this content:
/var/log/bind9/** rw,
/var/log/bind9/ rw,

This should be all. Wait about 10 minutes that Munin 
graphs become visible and they will look like this:
MonitorBindWithMunin_1_originalMonitorBindWithMunin_2_original