====== 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:2009:lynusvaz:journal:week5 [2009/06/27 06:12]
lynusvaz
soc:2009:lynusvaz:journal:week5 [2009/11/08 00:54] (current)
kylek tidy up so i can read it
Line 2: Line 2:
   * In src/​config/​defaults/​pcbios.h:​ changed #define CONSOLE_PCBIOS to #define CONSOLE_SERIAL   * In src/​config/​defaults/​pcbios.h:​ changed #define CONSOLE_PCBIOS to #define CONSOLE_SERIAL
   * make   * make
-  * qemu -tftp . -cdrom bin/​gpxe.iso -bootp /tests//​arith_test.gpxe -serial stdio > result+  * qemu -tftp . -cdrom bin/​gpxe.iso -bootp /​tests/​arith_test.gpxe -serial stdio > result
   * Make sure the file generated gives the expected output. This can then be used to compare the output of the test script after changes have been made   * Make sure the file generated gives the expected output. This can then be used to compare the output of the test script after changes have been made
 After this, I started implementing the if-else branch. Since this includes defining new commands, I had to find out how it was done: After this, I started implementing the if-else branch. Since this includes defining new commands, I had to find out how it was done:
Line 17: Line 17:
 This tells the linker to link in the code that implements the if command, present in if_cmd.c. The conditional linking is a pretty cool idea. This tells the linker to link in the code that implements the if command, present in if_cmd.c. The conditional linking is a pretty cool idea.
  
-June 23: Implemented [[http://​git.etherboot.org/?​p=people/​lynusvaz/​gpxe.git;​a=commit;​h=4e0cdde5de459076f0a1470e1e9705aab5b4c9a3|if-else-fi]],​ using the stack idea. Realised, however, that I needed to also record the size of the stack for branches that are not taken. This is required for nested ifs in non-executed branches; without it branches with a true condition inside a false branch will be taken:+June 23: Implemented [[http://​git.etherboot.org/?​p=people/​lynusvaz/​gpxe.git;​a=commit;​h=4e0cdde5de459076f0a1470e1e9705aab5b4c9a3|if-else-fi]],​ using the stack idea. <del>Realised, however, that I needed to also record the size of the stack for branches that are not taken.</​del>​ [mcb suggested that not-taken ifs should push a 0 onto the stack] ​This is required for nested ifs in non-executed branches; without it branches with a true condition inside a false branch will be taken:
   if 0   if 0
       <​statements>​       <​statements>​
Line 49: Line 49:
  
 June 26: Spent today going over the code and making a few last changes. Sent it out to etherboot-developers. June 26: Spent today going over the code and making a few last changes. Sent it out to etherboot-developers.
 +
 +June 27 and 28: Didn't get much work done over the weekend. Did, however make a start on while loops. In the weekly meeting, a point that came up was how to iterate over network interfaces.
 +  * Have a pre-defined variable to store a count of interfaces.
 +  * If a success code check is possible, try to execute, say an ifstat that will return non-zero and check that
 +  * Look for a property of an interface, which would be unset if the interface did not exist, But, this will need references, which, while being simple to implement, would make scripts harder to read.
 +

QR Code
QR Code soc:2009:lynusvaz:journal:week5 (generated for current page)