jamie.lentin.co.uk

Devices & Debian

Other non-computer shaped things that can still run Linux. To get them going there are various things that are useful to set-up on a host PC regardless of what you are trying to get going

↑Cross-compilier

Emdebian provide you with a handy source of cross-compilers for various architectures, saving you effort. They say you should use stable, unless you're planning on developing the compilers themselves. So add the repository to your system:

# cat <<EOF > /etc/apt/sources.list.d/emdebian.list
deb http://www.emdebian.org/debian/ stable main
EOF
# aptitude install emdebian-archive-keyring
# aptitude update

Then try installing one if the virtual packages to see what GCC versions you can install:

# aptitude install c-compiler-arm-linux-gnueabi # Or c-compiler-mipsel-linux-gnu, e.g.
  . . .
Package c-compiler-arm-linux-gnueabi is a virtual package provided by:
  gcc-4.4-arm-linux-gnueabi 4.4.5-8
  gcc-4.3-arm-linux-gnueabi 4.3.5-4
You should explicitly select one to install.

...and then install the version you opt for.

You may see "Depends: libgmp3c2 which is a virtual package." if using sid, in which case the easiest thing seems to be to install the package from testing.

↑TFTP Server

TFTP is a simple protocol that many bootloaders support to transfer files over a network into memory. This means you can load a kernel over a network which is very handy when debugging.

One such server is "tftpd-hpa". This can be installed via. apt-get / aptitiude in Debian, all defaults are fine. This will create a /srv/tftp which will be available to any hosts that connect.

↑NFS Booting

You can netboot via NFS from another host, which makes tinkering with config fastest.

If you use dnsmasq as a DHCP server, you can set the following in dnsmasq.conf so the device finds it's root FS:

dhcp-host=00:09:5B:F8:A9:E1,net:wgt634u,10.150.1.70,wgt634u
dhcp-boot=net:wgt634u,kernel.elf.gz,nfs-server-host,nfs-server-ip
dhcp-option=net:wgt634u,option:root-path,/srv/netgear_nfsroot

Then all the device needs is {{root=/dev/nfs rw ip=dhcp}} in it's kernel commandline.