This document contains a collection of the answers to the most common questions people ask about ST Linux.
Why do I need a new Linux distribution?
ST delivers a professionally packaged and tested version of the Linux operating system and cross development environment that is specifically tailored and adapted for ST's SoCs.
Which kind of products are supported?
The full list of Target boards supported by STLinux can be found at:
boards
Do I have to pay for the software licence or support?
The software is licenced under LDDE for "free of charge"
licence
Technical support is freely provided through Bugzilla. For more details on Linux support:
info-support
What information should go in a bug report?
Please follow general bug reporting guidelines: the developers do not have access to your system, and they are not mind readers. Try to find a simple way to describe the problem. If you get a kernel "oops" message, collect the symbolic information.
In addition, read REPORTING-BUGS from the kernel source tree prior to reporting a bug.
I have downloaded the STLinux ISO image and now I want to install it. How do I do that?
The following links show some examples how to install STLinux under the most common Linux distributions:
I need to add new support to the kernel. I do not know how to change ".config" in the kernel and build it.
To change kernel configuration, run:
host% make ARCH=<your_arch> CROSS_COMPILE=<cross_compiler> xconfighost% make ARCH=<your_arch> CROSS_COMPILE=<cross_compiler> menuconfig host% make ARCH=<your_arch> CROSS_COMPILE=<cross_compiler> vmlinux How can I debug the kernel?
It is possible to do a hardware or software debug through JTAG and KGDB respectively. Moreover, you could use STWorkbench. KGDB debugging can be useful when ST Micro Connect JTAG is not available. For more detailed information see:
debug
During boot, I had the following error:
"Kernel panic: no init found. Try passing init= option to kernel"
This could be caused by a broken or incomplete STLinux distribution installation. Try reinstalling the distribution.
Is splash screen supported on U-boot ?
Splash screens are not currently supported under U-Boot. But they can be displayed during the Linux kernel boot, where there are all the necessary tools and plenty of support.
Useful info can be found at: splash-screen
How do I write my own loadable Kernel Module?
See the following official page:
tldp.org/HOWTO/Module-HOWTO/index
I need to set up a bootloader for STLinux.
STLinux supports U-boot. See: U-boot pages and denx.de/wiki/DULG/Faq
The second link is the U-boot FAQ in the official project homepage.
I want to add some debug prints such as Thread Name, Allocated Stack size, and so on. What are the steps have I to follow?
You need re-build your RPM package. To do it, download the SRPM package (provided by STLinux). For example:
How do I capture an Oops?
If an Oops is recoverable, it will appear in both the serial tty minicom console and in the kernel message buffer (/proc/kmsg). See also the dmesg, klogd and syslogd commands. However, an Oops is sometimes so bad that the kernel hangs and cannot be recovered.
What is this major/minor device number thing?
Device numbers are the traditional Unix way of providing a mapping between the filesystem and device drivers. Obviously, there must be agreement between device driver numbers and the files in /dev. The kernel source has the file documentation/devices.tex which lists all the official major and minor numbers.
How efficient are threads under Linux?
Threads are extremely efficient under Linux. Compared with all the other kernel-based thread implementations, Linux is one of the fastest. Each thread takes only 8 kiB of kernel memory, and context switching is very fast. However, the Linux scheduler is designed to work well with a small number of running threads. The common request to modify the Linux scheduler to better handle large numbers of running threads or processes. It is always rejected by the community because: "it's wrong". Linux is not a good computer science project, but it is very good engineering.
What is the System.map file?
The file system.map contains symbol names and addresses of the linux kernel binary, vmlinux. Its primary use is for debugging. If a kernel "oops" message appears, the utility ksymoops can help to decode the messages.
I would like to learn more about the Linux kernel
You can find interesting information at kernelnewbies FAQ page:
kernelnewbies-FAQ. You may also find the Kernel documentation to be useful.
I am not able to mount a root filesystem on host PC with nfs. What kind of checks can I do?
Verify the following settings on the server machine:
Further information can be found at: configuring-nfs
When booting via NFS I get the following error:
"eth0: Invalid ethernet MAC address. Please set using ifconfig"
For some boards, the MAC address has to be provided in software using the CONFIG_NWHW_CONFIG kernel configuration option. Set up the MAC address from the command line. See:
ethernet-MAC for more details.
Is it possible to configure two different network interfaces?
Yes, it is. A typical task would be to configure the onchip ethernet for streaming. For more details, see two-interfaces
At boot time,I got the following error:
"stmmac_open: Cannot attach to PHY (error: -19)"
It means: the network driver is not able to attach the physical device. The following link covers all the issues related to this failure:
phy-howto
How to enable wake-up on LAN
Please see:
stmmac-wol
I would like to improve NFS performance while mounting it as root.
Add the following option in the command line
nfsroot=10.1.2.1:/opt/STM/STLinux-2.X/devkit/<your_arch>/target,tcp I am unable to get stmyum to access the repositories. I get the following error: "HTTP Error 404: Not Found" I am inside the ST firewall, but get the same error when I move the PC host to outside the firewall
Please check:
Useful information can be found on the STMYUM page.
I have changed the IP address with the ifconfig command, but it is not pinging at all. I'm not receiving any error while applying this changes also...
This happens because the default route has been removed by executing ifconfig eth0 down. Do the following steps in the order given below:
target# route
target# route add default gw "ip-address" "eth"Now you should be able to ping the new IP address.
If I mount a samba server using CIFS, I get the following error:
"CIFS VFS: cifs_mount failed w/return code = -22
mount: wrong fs type, bad option, bad superblock on /<ip_addr>/test, missing codepage"
On STLinux, use the following syntax:
host# mount -t cifs //host\\share point -o username=user,password=my_password<br>Note: The \\ is used as a separator between the host and share name to pass a proper "unc" identifier to the kernel.
I need to include in my filesystem only those libraries that are strictly required for my binaries. How can I find the dependencies between my binaries and their dynamically linked libraries?
The STLinux distribution provides an ST40-dedicated version of ldd. This can be found in: /opt/STM/STLinux-X.X/host/bin/ldd For more details see:
minimal-fs
How to boot Linux kernel with an embedded initramfs filesystem?
A detailed description can be found on the initramfs page.
In addition, the above page describes the Mkshinitramfs tool, which creates a minimal initramfs rootfs CPIO image.
What is the best filesystem for set-top-box applications? This depends upon the media, application, and the performance that you require for the file system. (Key parameters are: speed, effective space usage, recoverability and so forth).
After writing u-boot.bin into Flash memory, I cannot boot from Flash on-board reset.
First, check the following switch settings:
If these are all correct, check the u-boot memory setup for your specific board.
I need to plug in an external USB disk that is NTFS formatted. I enabled CONFIG_NTFS_FS and CONFIG_NTFS_RWin the kernel config; but I still have problems writing to the hard disk.
On 2.3 kernels, NTFS support in the kernel is fully functional for read operations. However, there are limitations regarding write operations, as it only allows existing files to be overwritten with new data of the same length as the original file. In effect, it is still read only. There are many projects (both free and commercial) that provide full NTFS support.
I am using a jffs2 filesystem on NAND Flash, but it takes a long time (about 15 seconds) to start up. How do I reduce the time it takes to mount?
jffs mount is known to be slow. However, building the jffs2 filesystem to include summary information speeds up the mount process considerably. It is mandatory to enable the support in the kernel. The STLinux distribution provides a tool to create a jffs image (the tools are in /opt/STM/STLinux-2.X/host/bin):
host# mkfs.jffs2 -r "root-of-fs-tree" -o "jffs.img" host# sumtool -i "jffs.img" -o "jffs_sum.img"
The kernel option is:
CONFIG_JFFS2_SUMMARY=y
What is the difference between STM-LIRC and STBLAST? Which is best?
STM-LIRC is a port of the open source LIRC infrastructure
www.lirc.org.
STBLAST, is part of the STAPI distribution. It has a minimal amount of protocol support (RC5/6/6A, RCMM, RUWIDO, RCRF8, RSTEP).
The one to choose depends on what you wish to do and the compatibility with the source code of the STAPI interface.
Using the STM-LIRC driver, I need to control volume fast up/down, and fast movement in the channel list. How can I enable this feature?
Just trim the right gap between two wave trains. For further details see:
bugzilla#7059
I have set up the STM-LIRC driver, but I am not able to catch any signals
Verify that the IR jumpers are set on the board, match with the corresponding kernel configuration. An additional note: the UHF-SCD is supported only from the Futarque RC.
I am using the STM-LIRC driver, but the irw is not working.
Check if the lircd daemon is running:
target# /etc/init.d/lircd start Is it possible to use more than one (or a different) Remote Control?
Yes it is. The remote control mapping is managed by the /etc/lircd.conf file. Details on syntax and format are given at:
winlirc.sourceforge.net/technicaldetails
Which remote control brands are officially supported by STM-LIRC?
We only support Futarque black remote control. For other standard remote controls visit:
http://www.lirc.org
Concerning STM-LIRC, is transmission supported?
Yes, many boards support the IR-TX features. Please refer to the specific board user manual.
How can I test if the infrared transmission works?
There are many ways of doing this, but one could be to put two boards front to front and use the irsend and mode2 software tools to send an infrared signal from one board to the other.
How do I control a SATA hard disk drive for sleep and wakeup?
The hdparm tool allows to send many commands to the drive. For example, hdparm -S sets the spindown timeout. To enter in sleep mode, enter hdparm -Y.
Please see:
bugzilla#1598
My driver needs to allocate a block of memory at boot-time. Using bpa2 support, I get at start-up the following error: "BPA2 module allocation: cannot find BPA2 partition "modules" Writing <modprobe player2>"
You need to explain bpa2parts option to initialize the bpa2 partitions correctly. Just add into the command line the following option:
bpa2parts=modules:<memory_amount>:<memory_allocation>
Can I drive a double monitor?
Yes, with dfb. Redirect the output to a framebuffer with the following parameter --dfb:fbdev=parameter
For monitor 1:
df_andi --dfb:no-vt,fbdev=/dev/fb0
--dfb:no-vt,disable-module=keyboard,disable-module=lirc,fbdev=/dev/fb1
Can I implement a hard reset using software?
The way that the board is wired determines the board level reset. A classical way to do a software reset is a Watchdog Warm Reset (WDT). This resets the clock generators and some of the system configuration registers. For more details, please, see:
bugzilla#5339
The following is one simple way to test it:
target# dmesg | grep shwdt shwdt: initialized. heartbeat=30 sec (nowayout=0) target# echo 1 > /dev/watchdog shwdt: Unexpected close, not stopping watchdog!
I need to suspend and resume a phy device. Do you have sample code to do this?
The Power Down mode is usually managed by the basic register set. Sample code, based on the Physical Abstraction Layer (PAL), can be found at:
bugzilla#7846
A general description about ST Physical devices can be found at: phy-howto
I configured my kernel to use an USB keyboard. It looks as though it is correctly detected, but how do I use it?
A USB keyboard is able to interact with any user space applications that require it. Usually, it requires a graphic environment. Then it is possible to type commands into a Linux shell or use it within a browser.
I would like to connect a WIFI USB device. Which devices are supported? Does the kernel already have a driver?
The Linux kernel supports various wireless drivers. Officially, STLinux-2.3 distribution only supports the ralink wireless driver rt73 based, as this driver was ported and tested on ST platforms.
An useful guide about how to configure and use rt73 wireless devices can be found at: wireless.
You will find, also, a list of supported USB dongles.
Many common Linux troubleshooting problems are addressed by "The Linux FAQ" at: tldp.org-FAQ
Introduction:The RPM Package Manager (RPM) is a powerful command line package management capable of installing, uninstalling, verifying, querying, and updating software packages.
How can I display a package's change log
Packages can be queried using the rpm tool. The following commands retrieve the change log of a given package. To query a package file:
host% rpm -qp --changelog stlinux23-host-kernel-source-sh4-2.6.23.17_stm23_0119-119.noarch.rpmTo query an installed file or directory:
host% rpm -qf --changelog /opt/STM/STLinux-2.3/devkit/sources/kernel/linux-sh4-2.6.23.17_stm23_0119/ I need only basic and "fast" information about RPM package management; where could I find it?
An interesting collection of "How can I..." type FAQs can be found at:
fedoranews-rpm . It may also be useful to look at the official RPM site: rpm.org.
How can I uninstall STLinux distribution?
STLinux provide a simple uninstall script to remove only the STLinux distribution packages. The script is available at:
uninstalling STLinux
Alternatively, it is possible to manage any STLinux package by rpm standard commnads