Differences between revisions 1 and 35 (spanning 34 versions)
Revision 1 as of 2005-11-20 07:33:47
Size: 3953
Editor: ?CharlesStevenson
Comment: Added the old TWiki FAQ (converted with some perl sed... hopefully it's not bad)
Revision 35 as of 2013-05-03 19:53:22
Size: 8123
Editor: NeilWilliams
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Frequently Asked Questions ==
=== Q: Sweet, there is a new build, how do I update my NFS system ===
= Frequently Asked Questions =
Line 4: Line 3:
Assuming that `target-2.0.1.11.tar.bz2` is your target tarball: <<TableOfContents>>

[[Embedded_Debian|Embedded Debian]]

== Where do I download the Emdebian distribution? ==

There are two distributions, [[http://www.emdebian.org/grip/index.html | Emdebian Grip]] which is standard Debian binaries/packages merely repackaged with some bloat removed. Available for all debian architectures. [[http://www.emdebian.org/crush/index.html | Emdebian Crush]] is a much smaller busybox-based distribution for arm only. At this stage it is fairly experimental, but it does work.

Both Grip and Crush can be further optimised for static configurations by using [[http://www.emdebian.org/baked/|Baked]].

=== Mirrors ===

There are two mirrors currently, carrying the Emdebian Grip, Emdebian Crush and toolchain repositories.

http://www.emdebian.org/grip/#mirrors
Line 7: Line 20:
$ mkdir ~/targets/target.2.0.1.11/; cd ~/targets/target.2.0.1.11/
$ tar xvfj /home/services/tftpboot/v2.0.1.11/target-2.0.1.11.tar.bz2
$ cp ~/targets/my.old.nfs.build/root/ppcstream/stream.cfg root/ppcstream/stream.cfg
deb http://ftp.uk.debian.org/emdebian/grip wheezy-grip main
Line 12: Line 23:
The `stream.cfg` is a file that contains the contents of the Flash configuration (to avoid writing to flash for debugging).
Add the following line in `/etc/exports`
{{{
deb http://emdebian.bytesatwork.ch/mirror/grip wheezy-grip main
}}}
Line 16: Line 28:
/users/firmware/`whoami`/targets/target.2.0.1.11/ *(rw,no_root_squash,no_all_squash,async) deb http://ftp.uk.debian.org/emdebian/grip sid-grip main
Line 19: Line 31:
and edit the dhcp.conf file in /etc/ so that your board (MAC address) points to this new directory: {{{
deb http://emdebian.bytesatwork.ch/mirror/grip sid-grip main
}}}

== Using Emdebian Grip ==

Emdebian Grip 2.0 (based on Debian GNU/Linux 6.0 "Squeeze") uses [[http://www.emdebian.org/grip/#components|components]] but this caused problems and has been dropped for subsequent versions.

Emdebian Grip is also due to be [[EmdebianIntegration|integrated into Debian]] and the codenames and suites have been renamed to distinguish the Emdebian Grip ones from the existing Debian equivalents.

=== Suite names in Emdebian Grip ===

|| Debian suite || Emdebian Grip suite ||
|| stable || stable-grip (pending) ||
|| testing || testing-grip ||
|| unstable || unstable-grip ||

=== Codenames in Emdebian Grip ===

|| Debian codename || Emdebian Grip codename ||
|| wheezy || wheezy-grip ||
|| jessie (pending) || jessie-grip (pending) ||
|| sid || sid-grip ||

[[EmdebianGripGuide|Guide to using Emdebian Grip]]

== What do I need to build a uclibc toolchain in debian? ==

[[https://www.slind.org/Main_Page | Slind]] includes uclibc support, but is largely woody-vintage.

New uclibc packages are being prepared for Debian and new -uclibc architectures are supported by dpkg. (DebianBug:455501)

== No Essential in Emdebian ==

None. This is a common misconception about how Debian classifies packages as Essential. Essential exists solely to shorten the dependency lists of other packages, it does not indicate which packages are essential to the operation of a Debian or Emdebian system. In Debian, packages which are required for all basic Debian tasks are classified as {{{Priority: requried}}}, those which are not required but generally important are {{{Priority: important}}} etc. Essential only means that packages which depend on an Essential package do not (indeed should not) specify a dependency on those packages unless the package needs a specific version of that package which is higher than the version in oldstable.

In Emdebian, there is no common package set and users are free to ignore all Priority settings. [[Multistrap|Multistrap]] has a configuration setting to omit all {{{Priority: required}}} packages for this reason. Essential packages receive special handling by {{{dpkg}}} and {{{apt}}} which complicates the freedom to use only the specific packages that an Emdebian system might need, therefore Emdebian drops the Essential flag completely.

An Emdebian system can be simply a kernel and a shell or it can be a full system which has nearly all the packages commonly found on a Debian desktop. Importantly, Emdebian can offer '''any''' combination of packages within that spectrum whereas the minimal set in Debian is still a few hundred packages.

== What changes do I have to do to the linux-libc-dev source package so I can build them for a uclibc-* architecture? ==

Sorry, all this doesn't work,yet. all of it should work with the next version of lkh, though.
when bootstrapping in the phase where you have no target compiler you have to disable the tests: setting DEB_BUILD_OPTIONS=nocheck will do that.
uClibc support should be in it very soon now.

== Should I build my own cross toolchain - or use a prebuilt one? ==

That depends on what you want to do. If you want to build for a existing set of applications and libraries it is a good idea to use the toolchain they used. If you are starting from scratch you can build your own. It's not that hard, the toolchain howto on the emdebian site helps, also have a look at the README.cross in binutils and gcc-X.Y debian directory.

=== I was just wondering what the policy in on keeping the sid/etch packages install-able? ===

The idea has been (for a while) to have the common toolchains available and
up to date for stable, testing and unstable, but this has proved difficult
to actually do, and whilst most of the infrastructure is now there, there is
still some work needed to make the system build new compilers each time
debian uploads a new one, and to fix the patches when they get stale.

=== Are there currently any plans for cross tools in debian proper? ===

We have got preliminary agreement for Debian main to provide a set of
cross-compilers as part of the normal packages which will cover most needs.
Doing this will mean that we don't need to maintain our own parallel set.

At Debconf9 a scheme was agreed to solve the problem that autobuilders can not work with cross-dependencies. Hopefully there will be at least -arm-gnueabi cross-tools in squeeze.

=== Would help working on these be useful, or should I just be more patient ? ===

Help would be very useful. Developer time is the only thing stopping things progress faster.

=== Help with cross-compiling. ===

Some packages include documentation on cross-compiling. An important piece of information is the list of cache variables available to ./configure --cache-file. These allow you to look up each point at which ./configure fails in the buildd log at Debian for your target architecture and identify the value detected during a native build. You can then set this value in an $arch.cache file in the top level source and pass that cache file to ./configure. (It may be useful to set this file chmod 444 to prevent ./configure from altering it).

== Cross-installing Debian using debootstrap ==

[[DebPkg:multistrap|multistrap]] is preferred to debootstrap.

[[EmDebian/CrossDebootstrap|Outline]]

When using debootstrap for Squeeze, you will need to create some directories for dash installation:

`mkdir -p /usr/share/man/man1`

(This is fixed in wheezy-grip and later via [[http://www.emdebian.org/grip/search.php?arch=armel&distro=sid-grip&package=grip-config|grip-config]].)

Example for sid-grip:
Line 22: Line 120:
group {
  host svc.01{
  hardware ethernet 00:04:a5:04:05:53;
  fixed-address 10.0.0.51;
  option root-path "/users/firmware/mleeman/targets/target.3.0.0.4";
  }
# More boards
}
sudo apt-get install emdebian-archive-keyring
sudo debootstrap --keyring /usr/share/keyrings/emdebian-archive-keyring.gpg sid-grip sid-grip-chroot http://ftp.uk.debian.org/emdebian/grip /usr/share/debootstrap/scripts/sid
Line 31: Line 123:
Finally, restart the appropriate servers
(After the EmdebianIntegration, the mirror location will change and the keyring dance will become unnecessary.)

Example for wheezy-grip:
Line 34: Line 129:
# /etc/init.d/nfs-kernel-server restart
# /etc/init.d/dchp restart
sudo apt-get install emdebian-archive-keyring
sudo debootstrap --keyring /usr/share/keyrings/emdebian-archive-keyring.gpg wheezy-grip wheezy-grip-chroot http://ftp.uk.debian.org/emdebian/grip /usr/share/debootstrap/scripts/wheezy
Line 38: Line 133:
The command which are executed during the build can be found in the file debug_command.log located in the build directory. Check this file for more information. The system is explained in more explained in ["NFSSystem"]. There may also issues with the root password when installing a foreign architecture, before you leave the second-stage chroot, run
Line 40: Line 135:
=== Q: Why does it not work? === `passwd`
Line 42: Line 137:
Information saying "it does not work" is no information at all. In any case, you should try to be as precise in your information as you can. In order to have a timely fix for your problem, the following
When reporting bugs, the following needs to be checked
and set a known password for root.
Line 45: Line 139:
 * See if the PPC is dead. This can be done by performing a ping
{{{
$ ping 10.0.0.52
c:\windows> ping -n 1000 10.0.0.52
}}}
 * If you do not get a reply, this does not mean that your board is dead, the board might just be configured with the wrong network settings. Check this by attaching a cross cable and connecting to the default (hardwired) `10.0.0.2` address. Note that you can also have a configuration fetched from the Flash: check the history of the board.
 * If the ping is fine, check if you can login to the board. When you are a using a CRAMFS system, the one should be related to the other, but this is not the case when using an NFS system.
=== How could I preconfigure debconf questions when configuring my root filesystem? ===
Line 53: Line 141:
 * You might also have a problem that you initially get replies from the system and after a while none. This is useful since this might indicate that the network is reconfigured or the crash occurs in some application. Try to estimate as close as possible the time before crash.
You need to feed debconf answers before installing the packages. An example using debconf-set-selections can help:
Line 57: Line 144:
$ telnet 10.0.0.52 echo "packagename name/question type value" | debconf-set-selections
LANG=C DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive apt-get install package
Line 60: Line 148:
 * If you keep on getting ping replies, try to log in.
  * If you fail to log in, and you have an NFS system: this indicates that your kernel is running but your `telnetd` has not been started. Check your configuration (and that of `inetd`).
  * You can log in, but your connection gets stuck or reset: this indicates that the board got started; the network was configured but some application crashed the system or had the system rebooted. Have a look at the kernel buffer or use a NFSSystem and load the modules one by one and start the applications one by one.

 * When the error is not that grave, but only the functionality is impaired; you should provide the final log entries of the applications. These are found in the Administration Login section of the web interface, or in the logfiles under
{{{
/var/log/
}}}

Finally, submit this information to a Bug Tracking System if available.

=== Q: Where do I get the kernel source for platform X ===

[http://www.kernel.org]

You just make and configure as you used to, just add the correct `CROSS_COMPILATION` prefix if you are not developing on the same architecutre as your target:

{{{
$ make ARCH=ppc CROSS_COMPILE=powerpc-linux-uclibc- oldconfig
$ make ARCH=ppc CROSS_COMPILE=powerpc-linux-uclibc- dep
$ make ARCH=ppc CROSS_COMPILE=powerpc-linux-uclibc-
}}}
----
## This page is referenced from http://www.emdebian.org/
CategoryPermalink CategoryEmdebian

Frequently Asked Questions

Embedded Debian

Where do I download the Emdebian distribution?

There are two distributions, Emdebian Grip which is standard Debian binaries/packages merely repackaged with some bloat removed. Available for all debian architectures. Emdebian Crush is a much smaller busybox-based distribution for arm only. At this stage it is fairly experimental, but it does work.

Both Grip and Crush can be further optimised for static configurations by using Baked.

Mirrors

There are two mirrors currently, carrying the Emdebian Grip, Emdebian Crush and toolchain repositories.

http://www.emdebian.org/grip/#mirrors

deb http://ftp.uk.debian.org/emdebian/grip wheezy-grip main

deb http://emdebian.bytesatwork.ch/mirror/grip wheezy-grip main

deb http://ftp.uk.debian.org/emdebian/grip sid-grip main

deb http://emdebian.bytesatwork.ch/mirror/grip sid-grip main

Using Emdebian Grip

Emdebian Grip 2.0 (based on Debian GNU/Linux 6.0 "Squeeze") uses components but this caused problems and has been dropped for subsequent versions.

Emdebian Grip is also due to be integrated into Debian and the codenames and suites have been renamed to distinguish the Emdebian Grip ones from the existing Debian equivalents.

Suite names in Emdebian Grip

Debian suite

Emdebian Grip suite

stable

stable-grip (pending)

testing

testing-grip

unstable

unstable-grip

Codenames in Emdebian Grip

Debian codename

Emdebian Grip codename

wheezy

wheezy-grip

jessie (pending)

jessie-grip (pending)

sid

sid-grip

Guide to using Emdebian Grip

What do I need to build a uclibc toolchain in debian?

Slind includes uclibc support, but is largely woody-vintage.

New uclibc packages are being prepared for Debian and new -uclibc architectures are supported by dpkg. (455501)

No Essential in Emdebian

None. This is a common misconception about how Debian classifies packages as Essential. Essential exists solely to shorten the dependency lists of other packages, it does not indicate which packages are essential to the operation of a Debian or Emdebian system. In Debian, packages which are required for all basic Debian tasks are classified as Priority: requried, those which are not required but generally important are Priority: important etc. Essential only means that packages which depend on an Essential package do not (indeed should not) specify a dependency on those packages unless the package needs a specific version of that package which is higher than the version in oldstable.

In Emdebian, there is no common package set and users are free to ignore all Priority settings. Multistrap has a configuration setting to omit all Priority: required packages for this reason. Essential packages receive special handling by dpkg and apt which complicates the freedom to use only the specific packages that an Emdebian system might need, therefore Emdebian drops the Essential flag completely.

An Emdebian system can be simply a kernel and a shell or it can be a full system which has nearly all the packages commonly found on a Debian desktop. Importantly, Emdebian can offer any combination of packages within that spectrum whereas the minimal set in Debian is still a few hundred packages.

What changes do I have to do to the linux-libc-dev source package so I can build them for a uclibc-* architecture?

Sorry, all this doesn't work,yet. all of it should work with the next version of lkh, though. when bootstrapping in the phase where you have no target compiler you have to disable the tests: setting DEB_BUILD_OPTIONS=nocheck will do that. uClibc support should be in it very soon now.

Should I build my own cross toolchain - or use a prebuilt one?

That depends on what you want to do. If you want to build for a existing set of applications and libraries it is a good idea to use the toolchain they used. If you are starting from scratch you can build your own. It's not that hard, the toolchain howto on the emdebian site helps, also have a look at the README.cross in binutils and gcc-X.Y debian directory.

I was just wondering what the policy in on keeping the sid/etch packages install-able?

The idea has been (for a while) to have the common toolchains available and up to date for stable, testing and unstable, but this has proved difficult to actually do, and whilst most of the infrastructure is now there, there is still some work needed to make the system build new compilers each time debian uploads a new one, and to fix the patches when they get stale.

Are there currently any plans for cross tools in debian proper?

We have got preliminary agreement for Debian main to provide a set of cross-compilers as part of the normal packages which will cover most needs. Doing this will mean that we don't need to maintain our own parallel set.

At Debconf9 a scheme was agreed to solve the problem that autobuilders can not work with cross-dependencies. Hopefully there will be at least -arm-gnueabi cross-tools in squeeze.

Would help working on these be useful, or should I just be more patient ?

Help would be very useful. Developer time is the only thing stopping things progress faster.

Help with cross-compiling.

Some packages include documentation on cross-compiling. An important piece of information is the list of cache variables available to ./configure --cache-file. These allow you to look up each point at which ./configure fails in the buildd log at Debian for your target architecture and identify the value detected during a native build. You can then set this value in an $arch.cache file in the top level source and pass that cache file to ./configure. (It may be useful to set this file chmod 444 to prevent ./configure from altering it).

Cross-installing Debian using debootstrap

multistrap is preferred to debootstrap.

Outline

When using debootstrap for Squeeze, you will need to create some directories for dash installation:

mkdir -p /usr/share/man/man1

(This is fixed in wheezy-grip and later via grip-config.)

Example for sid-grip:

sudo apt-get install emdebian-archive-keyring
sudo debootstrap --keyring /usr/share/keyrings/emdebian-archive-keyring.gpg  sid-grip sid-grip-chroot http://ftp.uk.debian.org/emdebian/grip /usr/share/debootstrap/scripts/sid

(After the EmdebianIntegration, the mirror location will change and the keyring dance will become unnecessary.)

Example for wheezy-grip:

sudo apt-get install emdebian-archive-keyring
sudo debootstrap --keyring /usr/share/keyrings/emdebian-archive-keyring.gpg  wheezy-grip wheezy-grip-chroot http://ftp.uk.debian.org/emdebian/grip /usr/share/debootstrap/scripts/wheezy

There may also issues with the root password when installing a foreign architecture, before you leave the second-stage chroot, run

passwd

and set a known password for root.

How could I preconfigure debconf questions when configuring my root filesystem?

You need to feed debconf answers before installing the packages. An example using debconf-set-selections can help:

echo "packagename  name/question  type value" | debconf-set-selections
LANG=C DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive apt-get install package


CategoryPermalink CategoryEmdebian