**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

====== Michael Decker: Driver Development ====== ===== Journal ===== The following is a log of steps I've taken. Note that I don't use Linux on a daily basis. Any terminal commands below are for my reference. ==== Week 0 ==== === 19 May 2008 === * Installed libc6-dev, mtools, syslinux, & gitk with Synaptic Program Manager (SPM) * Cloned git tree into samba share <code>$ git clone git://git.etherboot.org/scm/gpxe.git</code> * Successfully built gpxe <code>$ make</code> * Wrote to usb key, booted successfully on target <code>$ dd if=bin/gpxe.usb of=/dev/sdb</code> * Installed dhcp3-server via SPM and configured * Added interface to ''/etc/default/dhcp3-server'' <code>INTERFACES="eth0"</code> * Modified ''/etc/dhcp3/dhcpd.conf'' <code> # dhcpd.conf # ddns-update-style none; not authoritative; default-lease-time 600; max-lease-time 7200; host h1 { hardware ethernet 00:11:22:33:44:7b; } host h2 { hardware ethernet 00:11:22:33:44:b0; } shared-network "net" { subnet 192.168.2.0 netmask 255.255.255.0 { range 192.168.2.10 192.168.2.20; option subnet-mask 255.255.255.0; option routers 192.168.2.1; deny unknown-clients; option root-path "192.168.2.1:/tftpboot"; filename "test"; } }</code> This configuration was made utilizing [[:twodhcpservers|this page]] and [[http://linux.die.net/man/5/dhcpd.conf|man dhcpd.conf]]. Hosts ''h1'' and ''h2'' are two different ethernet ports on the target. After making changes: <code>$ /etc/init.d/dhcp3-server restart</code> * Installed tftpd-hpa via SPM and configured * Created ''/tftpboot'' directory * Modified ''/etc/inetd.conf'' <code>tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /tftpboot</code> === 20 May 2008 === * Tested ATA-over-Ethernet * Changed dhcpd.conf: <code> # dhcpd.conf # ddns-update-style none; not authoritative; default-lease-time 600; max-lease-time 7200; ignore unknown-clients; host h1 { hardware ethernet 00:11:22:33:44:7b; filename ""; option root-path "aoe:e0.0"; } class "c1" { match if option vendor-class-identifier = "Etherboot"; } subnet 192.168.1.0 netmask 255.255.255.0 { pool { deny members of "c1"; range 192.168.1.10 192.168.1.20; } } </code> This is setup such that no IP is allocated, although the aoe boot will initiate for host ''h1''. In this way, Windows will retrieve an IP from the proper DHCP server when it starts. The DHCP server being configured exists on the AOE server only to establish AOE sessions. * Configured my 'normal' DHCP server to ignore etherboot DHCP requests<code>dhcp-vendorclass=eth,Etherboot dhcp-ignore=eth</code> * Followed additional AOE steps outlined in [[:sanboot:winxp|HowTo]] ==== Week 1 ==== === 26 May 2008 === * Converted ''#ifdef DEBUG printf(..)'' and ''hd(..)'' statements to ''DBG(..)'' and ''DBG_HD(..)'' in ''eepro100.c'' * Collected & sorted notes on Etherboot and gPXE driver API === 27 May 2008 === * Further gPXE network driver API documentation * Hardware problems encountered; consulted with mdc === 28 May 2008 === * [[:soc:2008:mdeck:notes:gpxe_driver_api|gPXE Network Driver API]] documentation continues. * [[:soc:2008:mdeck:notes:initialization|gPXE Network Driver Initialization]] document added. === 29 May 2008 === * [[:soc:2008:mdeck:notes:gpxe_driver_api|gPXE Network Driver API]] documentation updated. * Specific changes to eepro100.c begin. === 30 May 2008 === * Fixed repository in git * Modified .git/config <code> [remote "personal"] url = mdeck@rom.etherboot.org:/pub/scm/people/mdeck/gpxe.git </code> to <code> [remote "personal"] url = ssh://mdeck@rom.etherboot.org//pub/scm/people/mdeck/gpxe.git </code> The erroneous configuration was created from [[:soc:2008:git-usage|here]]. * Setup my personal info <code> mike@vaio:~/Shared/repo/gpxe$ git config user.name "Michael Decker" mike@vaio:~/Shared/repo/gpxe$ git config user.email "mrd999@gmail.com" mike@vaio:~/Shared/repo/gpxe$ cd .. mike@vaio:~/Shared/repo$ mv gpxe gpxe.git mike@vaio:~/Shared/repo$ cd gpxe.git/</code> * Created personal/drivers branch<code> $ git-checkout -b drivers origin/master $ git-push personal drivers </code> * Reinitialized personal/master branch<code> mike@vaio:~/Shared/repo/gpxe.git$ git-branch drivers * master mike@vaio:~/Shared/repo/gpxe.git$ git-branch -d -r personal/master Deleted remote branch personal/master. mike@vaio:~/Shared/repo/gpxe.git$ git push personal :master mdeck@rom.etherboot.org's password: refs/heads/master: 72c77282442fd098a7c762222ba49b55c48d4f82 -> deleted To ssh://mdeck@rom.etherboot.org//pub/scm/people/mdeck/gpxe.git - [deleted] master error: unlink(.git/refs/remotes/personal/master) failed: No such file or directory error: Failed to delete mike@vaio:~/Shared/repo/gpxe.git$ git-push personal master mdeck@rom.etherboot.org's password: Total 0 (delta 0), reused 0 (delta 0) refs/heads/master: 0000000000000000000000000000000000000000 -> c899bdc5a823e623b3e8f7598a7f77d65dcf2d2c To ssh://mdeck@rom.etherboot.org//pub/scm/people/mdeck/gpxe.git * [new branch] master -> master mike@vaio:~/Shared/repo/gpxe.git$ git-checkout drivers Switched to branch "drivers" </code> * Git commit [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commitdiff;h=0c3deabe7865741c629b422c5abf20369ac04b0a|0c3deabe7865741c629b422c5abf20369ac04b0a]] * Setup [[:soc:2008:mdeck:notes:start#build_environment|new target machine]]. * Tested booting with new target. * Fixed dhcpd.conf for new configuration <code> # dhcpd.conf # ddns-update-style none; not authoritative; ignore unknown-clients; default-lease-time 600; max-lease-time 7200; option space gpxe; option gpxe-encap-opts code 175 = encapsulate gpxe; option gpxe.bus-id code 177 = string; option subnet-mask 255.255.255.0; option routers 192.168.1.1; option domain-name-servers 192.168.1.1; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.10 192.168.1.20; } host h1 { hardware ethernet 00:11:d8:0e:93:7b; filename ""; option root-path "aoe:e0.0"; } host h2 { # motherboard ethernet adapter hardware ethernet 00:1F:C6:20:E2:B5; filename "eepro100.pxe"; # if we're not talking to gPXE load this filename # if not exists gpxe.bus-id { # filename "eepro100.pxe"; # } } host h3 { hardware ethernet 00:90:27:43:84:4B; # eepro100 card for testing # For booting via http, Toms Root Boot # filename "http://rom.etherboot.org/gtest/gtest.gpxe"; # For booting Windows filename ""; option root-path "aoe:e0.0"; } </code> * Got chainloading from PXE operational. PXE -> gPXE -> (http or aoe) * Code review on driver changes with mdc. * Attempted to fix vblade. === 31 May 2008 === * Fixed vblade * Changed mount of file system containing AoE image <code> $ sudo umount /dev/sda4 $ sudo mount /dev/sda4 /media/test </code> * Modified /etc/vblade.conf <code> # example configuration file # network_device shelf slot file/disk/partition mac[,mac[,mac]] #eth0 0 0 /dev/sdb 00:11:22:33:44:55 eth0 0 0 '/media/Spare Room/test/disk.img' </code> to <code> # example configuration file # network_device shelf slot file/disk/partition mac[,mac[,mac]] #eth0 0 0 /dev/sdb 00:11:22:33:44:55 eth0 0 0 /media/test/test/disk.img </code> vblade didn't appear to like the space. * ''$ /etc/init.d/vblade start'' * Successfully booted Windows image over AoE * Setup local chainloading environment * Installed apache2 on server * Copied gtest.gpxe into /var/www * Modified /etc/dhcp3/dhcpd.conf <code> host h3 { hardware ethernet 00:90:27:43:84:4B; # eepro100 card for testing # For booting via http filename "http://192.168.1.9/gtest.gpxe"; # For booting Windows # filename ""; # option root-path "aoe:e0.0"; } </code> And ''$ sudo /etc/init.d/dhcp3-server restart'' * Successfully chainloaded gPXE script from local httpd! * Git commit [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commitdiff;h=dd467a97c6d0972d3d930329ccd51ad0f7a17fcf|dd467a97c6d0972d3d930329ccd51ad0f7a17fcf]] === 1 June === * eepro100.c : Began restructuring code. * Added new gPXE API functions * Converted existing function parameters and types. * Shifted some parts, splitting up code as appropriate. ==== Week 2 ==== === 4 June === * More coding. * Renamed some functions for more consistency. * Migrated global state into net_device private data structure. * Separated some EEPROM code into a separate routine. * Proliferated comments. * Encapsulated SCB command routine. === 5 June === * More code, of course. 8-) * Shifted defines and enums into a new eepro100.h to reduce the clutter. * More renaming to enhance organization & match Intel datasheet. * Added error checking into eepro100_poll() * Migrated Etherboot packet rx to gXE rx in eepro100_poll() * Lost power mid-day; discovered need for more frequent commits & pushes :-/ * Git commits [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commit;h=b95078936df49852dfe2ef6fc6d2c939b6b53794|b95078936df49852dfe2ef6fc6d2c939b6b53794]] and [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commit;h=61c6bdbb2a992879771059bc7b20eb7dfdbbaa91|61c6bdbb2a992879771059bc7b20eb7dfdbbaa91]] === 6 June === I spoke with mdc & mcb30 this morning during our weekly meeting. My commits contained both code changes and formatting changes, intermingled, which made reviewing the code difficult. So the previous commits need to be respun to make for easier review. I found that my existing commits contained too much variation to be cleaned up without making more fine-grained commits. Thus, I spent the day working on this. I had some trouble with git, mainly in that I managed to spend a few hours making new commits only to realize I had not replaced the spaces with tabs (argh!). So I had to start over. At this point I'm still respinning so I have no commit to post tonight. This should be a one-time event as SCM and making commits is all new to me. From now on I plan to make fine-grained commits such that my code is reviewable. (As the ultimate goal of my code is a positive review.)


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