FAQ - Frequently Asked Questions
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.
Do I have to pay for the software licence or support?
The software is licenced under LDDE for "free of charge" licence.
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 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:or:
host% make ARCH=<your_arch> CROSS_COMPILE=<cross_compiler> xconfigwhere:
host% make ARCH=<your_arch> CROSS_COMPILE=<cross_compiler> menuconfig
- <your_arch> is the architecture for which the kernel is to be built (for example: sh4)
- <cross_compiler> is the compiler prefix you are using (for example: sh4-linux-)
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.
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.
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 the official project page: denx.de/wiki/DULG/Faq
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 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:
- check the nfs service packages on the server
- check if mount directory is correctly exported
- check if rpcbind service enabled
- check if nfs services are enabled
- Please, take care to start rpcbind before nfs services.
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.
Is it possible to configure two different network interfaces?
Yes, it is. A typical task would be to configure the onchip ethernet for streaming.
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.
I would like to improve NFS performance while mounting it as root.
Add the following option in the command lineThis allows the NFS mount to take place by 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
- /etc/yum.conf variables env
- check if ping <ip_addr> is working
- set the --no-proxy flag
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:
- Boot the Kernel.
- Run the following command:
- This shows the IP routing table. Make a note of the default gateway for the interface.
- Change the IP address using ifconfig, then run the route command again. This time, the default gateway is not shown.
- Add the default gateway using 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
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:
- boot mode
- NOR enable
- bus data size
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:
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.
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.
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:Refer to <kernel_tree>/mm/bpa2.c for more information.
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:For monitor 2:
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. 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 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.
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-18.104.22.168_stm23_0119-119.noarch.rpm
To query an installed file or directory:
host% rpm -qf --changelog /opt/STM/STLinux-2.3/devkit/sources/kernel/linux-sh4-22.214.171.124_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.