booting IGEP from LAN (kernel from tftp and rootfs via nfs)
nazgee — Mon, 03/29/2010 - 17:31
To make IGEP boot using kernel and file system hosted locally on your PC, one has to install some additional software and do some tweaking to get it working.
- Prepare a structure of directories to store rootfs and kernel for your project. I like having srv and tftp directories in my home folder, and creating a symbolic link in /srv pointing to those folders
- Install tftp and nfs-kernel-server, so you can host these services on your workstation for IGEP
- Configuration of network file systems you wish to export is held in /etc/exports. Edit this file to let IGEP treat directory created in previous step as it's root file system.
- IGEP's u-boot will try to fetch uImage file using tftp protocole. uImage is a causal zImage file (kernel image), with some extra prologue added , so u-boot can load it properly. TFTP server is set-up by inetd deamon each time it is requested to provide such a service. Edit inetd configuration file to get something similar to this:
- Do not forget to configure IGEP's u-boot environmental variables to point to your computer's IP and correct directories
- Finally, relaunch newly installed services, so the changes are applied.
android@android:~$ mkdir ~/srv/tftp/angstrom/X11/igep0020b -p
android@android:~$ mkdir ~/srv/nfs/angstrom/X11/igep0020b -p
android@android:/srv$ sudo ln -s ~/srv/tftp/ /srv/
android@android:/srv$ sudo ln -s ~/srv/nfs/ /srv/
android@android:~$ ls /srv
cvs nfs tftp
android@android:~$ sudo apt-get install nfs-kernel-server
...
android@android:~$ sudo apt-get install tftpd
....
android@android:~$ sudo gedit /etc/exports
[sudo] password for android:
android@android:~$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
# IGEP rootFS for Angstrom X11 image. Assuming IGEP ipaddr=192.168.1.69
# use '*' instead of '192.168.1.69' if you wish to allow connections regardles of IP address
/srv/nfs/angstrom/X11/igep0020b 192.168.1.69(rw,sync,no_subtree_check)
android@android:~$
android@android:~$ sudo gedit /etc/inetd.conf
android@android:~$ sudo cat /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
U-Boot # setenv ipaddr '192.168.1.69'
U-Boot # setenv serverip '192.168.1.11'
U-Boot # setenv project 'X11'
U-Boot # setenv distro 'angstrom'
U-Boot # saveenv
Saving Environment to OneNAND...
OneNAND: Saved environment to 0x00001000
android@android:/srv$ sudo inetd
android@android:/srv$ sudo exportfs -a
If everything went fine, IGEP should boot from nfs instead of flash on next powerup.
One more thing - before attempting any tests, remember to copy the actual file system where it belongs:
android@android:~$ cp /workspace/oe/build/tmp-igep0020/work/igep0020-angstrom-linux-gnueabi/linux-igep2-2.6.28.10-0-r51/linux-omap-2.6.28.10-igep0020b-0/arch/arm/boot/uImage /srv/tftp/angstrom/X11/igep0020b/
android@android:~$ cd /srv/nfs/angstrom/X11/igep0020b
android@android:/srv/nfs/angstrom/X11/igep0020b$ sudo tar -jxf /workspace/oe/build/tmp-igep0020/deploy/glibc/images/igep0020/x11-image-igep0020.tar.bz2
