===== http support for PXE ===== ==== Abstract ==== Main purpose of this project - to write extendable (as much as possible - C) code wrappers to provided by PXE and UNDI APIs to support downloading of files via TCP-based protocols in preboot environment. Goal - to introduce code, able to download and prepare booting of %%FreeBSD%% kernel from remote server via direct connection or http proxy. ==== Current tasks ==== * Test behaviour of code with different parameters on different real machines. * Think about ipv6 * Solve problem with loading of not compressed modules. * Add ability to parse directory listings * Update documentation. * Update assembler source, test more ISR correct working. * add Telnet client. * make PXE sockets API more similar to common sockets. ==== Subprojects ==== === Hello PXE! === First project to test loading of user image, getting all usefull information and showing it. Use BTX and libstand. state: completed === memory allocation === Used for memory managment to provide memory allocation for downloaded files and send/receive buffers. BTX memory allocation functions are used, pxe_mem module just a wrapper for them now. state: to remove from project (reason - unnecessary module). === ip implementation === IP packet routing/sending. Includes ICMP protocol for general testing of ip code (provides pxe_ping() function). ARP resoltion of media addresses. state: IPv4, ICMP echo ready. Need to update routing functions. === tcp implementation === Simple tcp implementation. Includes handshaking, transmitting data and disconnecting. state: completed, needs more testing and optimizing. === udp implementation === UDP supported on level of sockets and lower. Currently is used by DHCP/DNS/NFS. state: completed. === minimalistic sockets === Provides flexible interface for usage in higher level applications (DNS, DHCP and http-client) Similar to berkley sockets behaviour and function naming. Client side functions socket(), connect(), send(), recv(), close() are planned to implement now. Also added pxe_bind() and pxe_sendto() for DHCP and DNS clients. state: completed, needs refactoring to be more similar to common sockets, testing. === DHCP client === There is own module to get information via DHCP from remote server. Added functionality to use bootp() from libstand for same purposes. state: completed. === DNS client === This client provides domain resolution, using pxe_gethostbyname() function. state: completed, needs support for IPv6 and currently not supported resource records for it. === http-client === This is practically last stage of project. Works with keep-alive connections (not keep-alive also supported, but not used now). state: completed, both keep-alive and not keep-alive able servers supported. === kernel booting === Provide parameters to kernel and booting it. httpfs filesystem implemented as filesystem for pxe device to load from. state: base functionality works. Need to add directory listings and solve problem with not compressed modules. === telnet support module === Provides simplified telnet client from loader's console. state: developing. ==== GSoC Timeline ==== * **Prestage** (till the 25th of May): general PXE issues (calling UNDI functions, installing isr, irq handler), ICMP support (echo/reply) * **1st stage** (till the 30th of Juny, 1 month): TCP code, sockets, UDP support, DNS client. * **2nd stage** (1-14th of July, 2 weeks): http client and kernel booting. * **3rd stage** (the 15-31th of July, 2 weeeks): final testing. * 2 weeks - reserved. ==== Goals ==== * simple PXE program loaded, DHCP, TFTP, http-server setuped. All is ready to begin coding and testing. * ICMP protocol (echo request/reply) implemented. Simple IP routing implemented. * first primitive and ugly implementation of sockets for UDP and simple DNS resolver (A and CNAME records supported) on it's base. * gateway/nameserver information is getting by DHCP client. * implementation of TCP module, that works in most cases as expected to work TCP. * http client written and tested. On base of it httpfs module created. It's possible to load (not boot) kernel and modules manually from BTX console. * booted kernel on emulators and finally on real machine till stage of mounting root file system. * booted kernel with RAM drive both in LAN and in Internet. Tested on Apache and nginx remote http-servers. * tested successful work of NFS loader with provided by pxe_http udpread()/udpsend() functions. * wrote overview documentation. ==== References ==== * [[http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/soc2007/taleks%2dpxe%5fhttp&HIDEDEL=NO|pxe_http repository]] - this project repository. * [[http://blog.d-strict.com/pxeboot.tar.bz2|pxeboot.tar.bz2]](108 Kb) - latest test binary for this project * [[http://www.sics.se/~adam/uip/|uIP]] - The open-source uIP TCP/IP stack to tiny embedded 8-bit microcontrollers * [[http://syslinux.zytor.com/|Syslinux]] - includes pxelinux code. * [[http://www.pix.net/software/pxeboot/archive/pxespec.pdf|PXE 2.1 specifcication]] - Intel PXE 2.1 specification * [[http://downloadfinder.intel.com/scripts-df-external/download.aspx?url=/11444/eng/PXESDK.exe&DwnldId=11444&ProductID=412&lang=eng|PXE SDK]] - Intel PXE SDK * [[http://www.etherboot.org/wiki/index.php|Etherboot/gPXE]] - project, related to network booting. ---- {{tag>Project}} {{tag>Gsoc}}