Slackware On Gumstix Overo
Contents
20 April 2014
Both Slackware 13.37 and 14.1 have been successfully installed on Gumstix Overo Products, and used for application development, web service and more.
The Caspa camera unit is working along with at least one USB WiFi device in Host Mode with hostapd. WiFi generally works in non-host mode for several devices.
This is a preliminary report. How To actually accomplish all of the above will be posted here in this work in progress. Prerequisites
In order to take full advantage of Slackware on Gumstix, at the current time, you will need to know how to build your own Kernel for Gumstix products, or at least obtain a pre-built one from them, and install it on an SD card. Likewise for the Kernel modules.
You can obtain each of these from their website, or from the NAND of the device. As this work progresses, pre-built Kernels and modules will be posted here.
Likewise it is assumed that you have experience with Slackware, on some other Architecture.
Software will need to be installed using "configure" and "make", but so far lots of software tested installs just fine as such. That information will likewise be posted here.
Basic Installation Strategy:
1) Use a 2.6 series kernel for Slackware 13.37.
2) Use a 3.x Series kernel for Slackware 14.1
3) Set u-boot variables as needed. (console, mmcroot, mmcrootfstype)
4) Modify scripts under /etc/rc.d for fastest boot. This and the Kernel is where most of the changes are made to get Slackware working on Gumstix.
5) Arrange module loading for best stability (mt9v032, Wifi).
6) Re-Compile kernel to meet your particular setup.
The Kernel and Modules from Gumstix distros, or that is used in NAND, can be used to boot a Slackware install.
The miniroot that is provided by Slackware works with Gumstix Kernel and Modules.
You can “cross-install” that is, use an x86 based PC to run “installpkg” to install Slackware ARM packages to an SD card used as the rootfs of your device for most but not all Slackware Packages.
Some Slackware packages run scripts that call binaries that will not work because of CPU mismatch. The Slackware packages that only run shell commands, or just extract the files, do “cross-install” successfully.
You can install Slackware packages when booted into your Gumstix Device, using “installpkg”. It works fine. “pkgtool” also works, but may not work when using the miniroot unless a few more packages are installed. The miniroot has some but not all the “a” series packages installed.
After Slackware is installed on a Gumstix Overo, it can be used very much like Slackware on any PC. GCC and Make work to install software, you can run Apache, Asterisk, FFMPEG and more.
Building Your Own Kernel
The instructions for building a 3.5 series kernel for Gumstix Overo, using the Yocto Project, are Here:
https://github.com/gumstix/Gumstix-YoctoProject-Repo
An overview of the BitBake Setup for Gumstix is here:
http://gumstix.org/software-development/yocto-project.html
Getting The Kernel Source For Building Custom Kernels on Gumstix Overo
1) Use the Yocto Setup explained above. Its not too difficult.
Probably the most important things to know are:
a) Do not use it as root.
b) Make your life easy. Set up a separate user account to build using the yocto project. Yocto relies on a custom-set environment. When a repo is set up in a directory, if the directory name is changed it will break build scripts. Figure out a naming convention to manage multiple “repo” downloads. Running bitbake will notify you of any missing dependencies that you may need to install. They can be installed from source on your build system, or possibly installed form Slackware Packages.
c) Under your build directory is a conf directory where you can place an empty “sanity.conf” file to tell the build system that you passed.
After you run BitBake to build a kernel, the patched kernel source will be under the build directory. The patches themselves will also be there. Look under the build/work directory for various source used. The kernel source that is used to build the kernel can be found under:
build/tmp/sysroots/overo/usr/src/kernel
Look for the kernel's .config file. You can use the source under this directory to cross-compile using your own setup to build bootable kernels like those used in the Gumstix NAND, but with your own customizations.
The kernel source under this directory has the patches from under the build/work directory applied.
Once you have a bootable system, you can use “installpkg”, “removepkg” and “pkgtool” to install individual packages.
The miniroot currently published does not have all the packages from the “a” series installed. You can manually install the rest.
In the installed system images that will be published for 13.37 and 14.1, packages from the “a”, “ap”, “d”, “l”, “n” and “x” sets are installed.
Kernel source is obtained as per above, and packages for emacs, faq, KDE Tex, TCL and Games can be installed if you like.
This HowTo will attempt at least to use the X Windows system, but not with KDE. FVWM and XFCE will be attempted. Best of luck to anyone on KDE.
As you use your Slackware on a Gumstix Overo Based Device to build code natively, you may have to install various library dependencies from source. If there is a Slackware package for the same library, you can uninstall that package with "removepkg" or "pkgtool" then install from the source to get the particular version you like.
Devices Tested So Far
Below is a short list of devices tested with a Gumstix Overo based system running Slackware.
Caspa Camera Unit / MT9V032 Sensor and Kernel Driver
Using Caspa With 2.6.34 Kernel
Start with the Gumstix User Wiki page here:
http://wiki.gumstix.org/index.php?title=Caspa_camera_boards
This setup works with FFMPEG, using /dev/video0.
In order to build the 2.6.34 kernel from source for use with the Caspa, the Kernel Source tree has to come from Sakoman.com
At http://www.Sakoman.com, select “Download” to get to the Git repo.
Under "projects/", select linux.git
Under the "heads" section, click the ellipsis at the bottom of the page to expand the list. Click on "omap3-2.6.34" to browse the source tree.
This code can be checked out in a manner similar to the Gumstix git repo:
1) First clone the “linux.git” repo located at http://www.sakoman.com/git/
git clone git://www.sakoman.com/git/linux.git
This will create a “linux” directory.
2) Then checkout the “omap3-2.6.34” branch, from within the “linux” directory:
cd linux git checkout omap3-2.6.34
You can then apply the patch and defconfig to this source tree to build the kernel per the instructions on the Gumstix Wiki page for the Caspa.
Using Caspa With 3.5.x Kernel
Use Yocto per the Gumstix Instructions, or if you have a very recent device from them, it may have a 3.5.x Kernel in NAND.
The Instructions posted on the various forums regarding using media-ctl do work. Basically and most important is to understand that /dev/video6 is the device to get your video from, and that its "Pixel Format", or "Color Space" will be what is referred to as UYVY.
The instructions for using “yavta” also work. “yavta” is simply: “Yet Another Video4linux Test Application”
This program will capture an image successfully from the Caspa and save it as a raw UYVY image. FFMPEG can then be used to convert this to other formats. use the ”-pix_fmt” option to ffmpeg.
MPlayer also works to play live video. If you are using a graphical desktop, it should work as in any other. You can use the HDMI on a Gumstix Tobi to drive your monitor.
You can also export the display of MPLayer across a network, make sure to export the “DISPLAY” option correctly, and use “xhost +” on your desktop.
MPlayer may show black video the first time it is called for some reason, but it does ultimately display live streaming video.
You may need to set the “LD_PRELOAD” environment variable in the MPLayer command line. See the various forums on the Internet regarding this.
P54USB WiFi
P54USB WiFi – Prism54 USB Wifi Dongle. Works with HostAPD. 5 Volts Only.
WRL-11713 PCDuino WiFi Dongle
From SparkFun.com – rt2800usb
https://www.sparkfun.com/products/11713
This works in Kernel 3.5.x
echo '148f 5370' > /sys/bus/usb/drivers/rt2800usb/new_id
Must be used to bring up the interface. Make sure to get the firmware from the Ralink website. Tested with 5 Volts and 3.3 Volts.
LIS-331 Accelerometer
LIS-331 Accelerometer. Works with I2C. Typically 3.3 Volts, or 5 Volts with level shifters on SDA/SCL lines.
MPU-6050 Accelerometer
MPU-6050 Accelerometer. Works with I2C. Typically 3.3 Volts, or 5 Volts with level shifters on SDA/SCL lines.
Resources will be posted here:
http://slackware.org.uk/slackwarearm/people/ballcam/
Gumstix publishes its Kernel source here:
http://gumstix.org/access-source-code.html
You can also browse their GitHub repo. Look under “meta-gumstix”, and “linux”.