Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
soc:2008:mdeck:journal:week8 [2008/07/16 12:02]
mdeck
soc:2008:mdeck:journal:week8 [2008/07/20 13:51] (current)
mdeck
Line 3: Line 3:
 ---- ----
  
-=== July 16 ===+=== 16 July ===
 This morning I created a new Windows disk image to test AoE with.  The last image I made was on a different machine, so that wouldn'​t work.  The AoE driver seemed most sensitive to the change of hardware. This morning I created a new Windows disk image to test AoE with.  The last image I made was on a different machine, so that wouldn'​t work.  The AoE driver seemed most sensitive to the change of hardware.
  
Line 17: Line 17:
  
 They operate flawlessly when installed alone. ​ If I install them both, then it will work correctly //if// the first NIC booted by gPXE is connected. ​ If the first NIC times out waiting for link-up, the second NIC times out AoE booting. ​ I'm not convinced this is a problem with my driver. They operate flawlessly when installed alone. ​ If I install them both, then it will work correctly //if// the first NIC booted by gPXE is connected. ​ If the first NIC times out waiting for link-up, the second NIC times out AoE booting. ​ I'm not convinced this is a problem with my driver.
 +
 +=== 18 July ===
 +
 +Had a meeting this morning. ​ Key points:
 +  * Need to finish up eepro100
 +  * Start writing Marvell Yukon driver
 +  * Perform testing with DOS
 +Marty was using DOS over iSCSI for thorough testing. ​ I already have AoE setup, so he sent over a DOS image and I configured for AoE.
 +
 +Initial **DOS AoE** testing showed a bug - the system reported '​Sector not found' when I attempted to execute a command. ​ After the meeting, however, I have been unable to duplicate this error. ​ Everything appears to work correctly. ​ I tested via //​scandisk//​ and //doom// on the DOS image. ​ So.. weird. ​ I'll continue to test occasionally to see if it will reproduce.
 +
 +In the meantime, I added a few updates to **eepro100**.
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commit;​h=74173568638830d2e52338c49ccf4e55a409601d|[Drivers-eepro100] Link state checking, theory comments, debug fixes.]]
 +
 +It's pretty straight-forward. ​ The link-checking is cool; I booted with the network cable unplugged, and once gPXE reported it was waiting for link-up, I connected the cable, and within a second it reported OK and continued booting. ​ I only check the link-state every thousand poll()s or so, as mcb30 recommended.
 +
 +As to the **Marvell Yukon card**, I have an 88E8003 Gigabit card to test with.  The Marvell website doesn'​t provide any developer information on their hardware, only provides an application for access to such information,​ while eluding to an NDA.  Marvell doesn'​t appear to be open-source friendly.
 +
 +So, I installed the card and booted off an Ubuntu Live CD, found the system utilized the skge driver. ​ I will tear apart ''​skge.c''​ and ''​skge.h''​ and using the guts of that driver, without additional documentation,​ I will attempt to gPixify it.
 +
 +Amazing, week 8 is just about over.  Time flies.
 +
 +=== 19 July ===
 +
 +I found a memory-freeing bug in ''​ifec_net_close()''​ of **eepro100**. ​ It was a small, one-line commit, in which I made a subsequently-corrected mistake:
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=f6bd58cd5304fc80f26b322d90e3b6c0a1414c78|[Drivers-eepro100] Mem-free bug in ifec_net_close()]]
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=0ee782090251e50ba0933e2a04f84c1fca00593c|[Drivers-eepro100] Update to preceding bug-fix]]
 +
 +For the **Marvell Yukon**, I moved ''​skge.c''​ and ''​skge.h''​ into the source tree and I added ''​skge''​ to ''​errfile.h'':​
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commit;​h=53396cab000c9ef89b35abb728a632f0fa220e24|[Drivers-skge] skge driver added.]]
 +
 +I then removed all the useless code I could find.  By //remove// I mean it's been commented out.  At this stage I'm preserving code so I can quickly draw it back in if need be.
 +
 +I also converted ''​sk_buffer''​ code to use ''​io_buffer'',​ and I converted memory allocation & freeing routines. ​ The device id table was adjusted, and necessary PCI and network driver structures were added. ​ There was much ethertool-related code, and some WOL-related code which I commented out for now.
 +
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commit;​h=c48fbcf44a651cbec023f4559264bc20a95ff8d8|[Drivers-skge] Removed linux headers, removed needless code]]
 +
 +My basic methodology was to identify the core routines needed by gPXE, enumerate all dependent functions, then to eliminate all other functions. ​ Then I changed the #included headers and ran it through the compiler a multitude of times while correcting identified lines. ​ I also kept an eye on what the current routine was doing to remove/​change any obvious code as necessary.
 +
 +At this point it will compile, and I need to go through and determine what needs to be adjusted to meet gPXE's needs. ​ I also placed a significant number of ''​todo''​ comments listing things I need to double-check and what-not.
 +
 +Woot!
 +
 +Driver is now fully operational!
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=550f1de759b02ae3e57c922622e57b5b47175e2f|[Drivers-skge] Fixed skge_probe, integrated skge_extirq. Card operational.]]
 +I netbooted a DOS image via AoE and ran //​scandisk//​ and //doom// without any sign of trouble, and without any obvious packet errors via wireshark.
 +
 +How's that for next-day delivery! :)
 +
 +The driver is still currently cluttered throughout with commented-out original-driver code.  Once I get feedback from mdc and others, I'll begin pruning out the excess.
 +
 +=== 20 July ===
 +
 +I decided to jump the gun and prune away on **skge**.
 +
 +First, a new branch and a merge of recent updates into the tree:
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=39e778e1930ef5e18bbbd3dcd1d7deddf5597aef|Merge branch '​master'​ of git://​git.etherboot.org/​scm/​gpxe into skge]]
 +
 +Most of those cluttering commented lines of old code were removed:
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=d259e62817c58d891834615903c1a5fb601a00ec|[Drivers-skge] Removed unnecessary linux-driver code]]
 +
 +A few functions were revived to support the XM PHY fully:
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=9ad495c1ada5c4e473f05fc51687abcfa4595750|[Drivers-skge] XM link-state support added]]
 +
 +Additional functions were clipped, debug statements were placed throughout. ​ All todo's were taken care of.  Note I left the EEPROM functions in place, but commented out, in case ''​nvs''​ support for this is added later:
 +  * [[http://​git.etherboot.org/?​p=people/​mdeck/​gpxe.git;​a=commitdiff;​h=e00cdf2b52ad76d67ba985dfdec6989983499dec|[Drivers-skge] Cleanup extraneous fns, added DBG statements]]
 +
 +I currently don't foresee additional work to this driver until a code review with mdc.
 +

QR Code
QR Code soc:2008:mdeck:journal:week8 (generated for current page)