hello all,
 
                I am currently trying to optimize the Ethernet driver initialization code and the Tftp code of the U-boot so that it can fit into the I2CPROM of the 8321 LCDB board whose PROM size is 32 KB, but out of which only 18 KB is available for the code.
 
The main aim of this project is to be able to provide support for booting up for those boards whose flash memory has gone bad or boards not having any flash.
 
The code which will be present on the PROM will have the first stage boot up code, which will initialize the board. The second part of the part does Ethernet initialization and provide support for Tftp so that the board will be able to download the images to the RAM and then start booting up from RAM. 
 
The main problem in implementing this feature is the size of the PROM that is available to us. The Ethernet initialization code (UCC) needs to do bare initialization of the Ethernet and does not implement any complex functionalities. The only functions that are required are the (1) TX event (2) RX event (3) Error Control and (4)CRC.
 
The Tftp code (present in the net directory of the U-Boot) then should support a simple file transfer protocol implemented in a minimal fashion.
 
The Ethernet initialization code and the Tftp code size should not be more than 18 KB. 
Can anyone suggest me a method like how to go on with the optimization of the codes or is there any other way of implementing this feature.
 
Regards
Sandeep Gopalpet