Android Video Flashing Network Boot Tutorial

Tutorial #2 - Flashing Bootloader, TFTP Kernel, and NFS
This tutorial will help setup an environment more suitable for debugging. The bootloaders will load from flash, the kernel will load from a TFTP server, and the Android file system will run via NFS over Ethernet.

Prerequisite : Android_Video_Run_From_SD Tutorial

Key  #HT (Hypertermianl prompt) $ (Ubuntu terminal prompt)

Setup TFTP on Linux PC
$ sudo apt-get install xinetd tftpd tftp $ sudo gedit /etc/xinetd.d/tftp // Add the following, save and exit service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = -s /home/user/tftpboot disable = no } //create directory $ sudo mkdir /home/user/tftpboot $ sudo chmod -R 777 /home/user/tftpboot $ sudo chown -R nobody /home/user/tftpboot $ sudo /etc/init.d/xinetd stop $ sudo /etc/init.d/xinetd start //copy files $ cd /home/user/tftpboot $ cp /home/user/l25.7/mydroid/bootloader/x-loader/MLO. $ cp /home/user/l25.7/mydroid/bootloader/u-boot/u-boot.bin. $ cp /home/user/l25.7/mydroid/kernel/arch/arm/boot/uImage. // use ifconfig to determine ip address - and use this for bootargs and serverip $ ifconfig

Setup NFS
$ sudo aptitude -P install nfs-kernel-server nfs-common portmap //Specifically choose "No Loopback" to enable listening on other IPs $ sudo dpkg-reconfigure portmap $ cd /etc $ gedit exports //add this line /home/user/l25.7/myfs *(rw,sync,no_subtree_check,no_root_squash) //make changes effective $ sudo exportfs -rav //$ sudo exportfs -a //Edit: Commented this out. using options -rav $ sudo /etc/init.d/nfs-kernel-server restart

Writing XLoader & U-Boot to NAND
// UBOOT and MLO (xloader) should be in tftpboot directory // setup to configure bootargs - like in tutorial #1

HT# nand unlock HT# nand ecc sw HT# setenv serverip 128.247.77.47 HT# dhcp 80008000 u-boot.bin HT# nand unlock; nand ecc sw; nand erase 80000 40000; nand write 80008000 80000 40000 HT# nand unlock HT# nand ecc sw HT# setenv serverip 128.247.77.47 HT# dhcp 80008000 MLO HT# nand unlock; nand ecc hw; nand erase 0 40000; nand write 80008000 0 40000

Setup Bootargs to use NFS & TFTP -- Then Boot!
HT# nand unlock HT# nand ecc sw HT# setenv serverip 128.247.77.47 HT# setenv bootfile 'uImage' HT# setenv bootargs console=ttyS3,115200n8 noinitrd mem=112M root=/dev/nfs rw nfsroot=128.247.77.43:/home/user/l25.7/myfs/,nolock,wsize=1024,rsize=1024 ip=dhcp init=/init HT# setenv bootcmd 'dhcp 80300000 uImage; bootm' HT# saveenv HT# printenv HT# boot