Frequently Asked Questions - Stamp9G20
Since a while, running "opkg update" results in the following error messages:
Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/base/P... Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/debug/... Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/gstrea... Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc//all/Packages.gz Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/perl/P... Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/python... Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/machin... Collected errors: * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/base/P.... error detail: HTTP response code said error * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/debug/.... error detail: HTTP response code said error * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/gstrea.... error detail: HTTP response code said error * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc//all/Packages.gz. error detail: HTTP response code said error * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/perl/P.... error detail: HTTP response code said error * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/python.... error detail: HTTP response code said error * Failed to download http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/machin.... error detail: HTTP response code said error
The problem here is that the default rootfs of the Stamp9G20 and PortuxG20 uses the Ångström Distribution 2008 but this version is discontinued so all packages have been removed from the servers.
Possible Solutions:
- Replace the 2008 with 2011.03 in all config files in /etc/opkg and upgrade to this newer version (opkg update and opkg upgrade). Be aware that this is unsafe and can result in a completely unusable system as opkg is not prepared for such major updates.
- Cherry pick packages from http://www.angstrom-distribution.org/feeds/2011.03 and install the manually (you have to resolve dependencies yourself). Either use wget to download and then install with opkg or give the direct URL to opkg. Using wget has the advantage, that you do not have to redownload a file if opkg notices missing dependencies. This option is much safer than the previous because you have complete control over what is installed and in which order.
- If you have a current Starterkit-CD you can also try to use the rootfs from the Stamp9G45. It uses a newer version of Ångström which does not have the problem.
After creating a new SD card from the original images the system won't boot.
Following problems are common:
- You get a kernel panic with "no init found" message.
- Using apt-get upgrade or similar gives you error messages like this "fopen: permission denied".
Most probably you have messed up permissions of your rootfs during copying. Please follow this Howto:
http://www.armbedded.eu/node/370
The toolchain comes with the package manager opkg. You can install the same packages as on the target device with it. To do so, follow these steps:
- Become root using su or sudo on your development computer
- Edit the file /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/etc/opkg.conf. It should look like that:
arch all 1 arch any 6 arch noarch 11 arch arm 16 arch armv4 21 arch armv4t 26 arch armv5te 31 src/gz base http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/base src/gz debug http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/debug src/gz gstreamer http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/gstreamer src/gz no-arch http://www.angstrom-distribution.org/feeds/2008/ipk/glibc//all src/gz perl http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/perl src/gz python http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv5te/python
All other lines can be removed or commented.
- Execute the command
source /usr/local/angstrom/arm/environment-setup - You can now use the command
opkg-targetas on the target. So you first need to runopkg-target updateand after that you can install the needed packages, most probably the -dev versions to get the header files.
From now on, every time you want to install a new package, repeat steps 1, 3 and 4.
Have a look at Howto:
http://www.armbedded.eu/node/372
To compile bootstrap yourself the following steps have to be done:
1) You need an arm-gcc standalone compiler. The delivered arm-linux-gcc won't work for that task. Good ones are obtainable at http://www.codesourcery.com/
2) Extract the archive from your CD or from our download section (http://www.armbedded.eu/downloads) on your development PC. Change to that directory.
3) Edit the Makefile in the directory at91bootstrap to point the variable CROSS_COMPILE to your installed stand-alone cross-compiler, e.g.:
CROSS_COMPILE=/develop/arm-2008q3/bin/arm-none-eabi-
4) Now issue make in the at91bootstrap directory with the following options:
make CHIP=at91sam9g20 BOARD=at91sam9g20-ek ORIGIN=nandflash DESTINATION=sdram BIN_SIZE=0x30000 FROM_ADDR=0x20000 DEST_ADDR=0x23F00000 OP_BOOTSTRAP=on STR_DESCR=\\\"appli\\\" TRACE_LEVEL=1
5) Now you find your binary in at91bootstrap/bin directory:
boot-at91sam9g20-ek-nandflash2sdram.bin
. Bootstrap has to be flashed via SAM-BA. It cannot be flashed with u-boot or linux. To do that see this how-to: http://www.armbedded.eu/node/8
Example error messages:
ifup: can't open '/var/run/ifstate': No such file or directory
shutdown: warning: cannot open /var/run/shutdown.pid
Some files in /var are located in RAM and must be recreated on every boot. Additionally /tmp is a symlink to /var/tmp. The files in /etc/default/volatile/ describe, which files, directories or symlinks have to be created. To speed up the boot, a file called /etc/volatile.cache is created. In the event of an unclean shutdown, this file might get corrupted and the creation of these files might not work. To resolve this issue simply delete /etc/volatile.cache.
This happens because NAND flash can have bad blocks. Every program not able to handle bad blocks can trigger messages like that. This is not a real problem with the flash, just with the application.
While booting the offending application is udev. It scans each block device for partitions including the MTD partitions. If the MTD partition has a bad block in the scanning region, the read will fail and this message is printed. To work around it, you can skip the scan for mtd devices by editing the file /etc/udev/rules.d/60-persistent-storage.rules. Replace the line
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"
with
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*|mtd*", GOTO="persistent_storage_end"
and the messages should go away.
When mounting an NFS share, the mount command hangs for some time. What is wrong?
Busybox is not capable of mounting NFS shares with locking enabled. Use the option -o nolock for NFS mounts.
How can I read/write registers and physical memory regions under Linux?
This tar archive contains a simple tool providing reading and writing at physical addresses under Linux. Source code as well as binaries for OABI and EABI are included.
