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 Both sides next revision
unity-patch [2009/11/25 09:27]
rwcr
unity-patch [2009/11/25 09:37]
rwcr
Line 10: Line 10:
 Data sources support two additional features. First, they can be //loaded//, to allow for anything that needs the whole source in memory to work with it but doesn'​t particularly care where in memory it goes. (Loaded sources wind up on the external heap like downloaded images.) Second, they can be //​attached//,​ using platform-specific handlers to make the contents of the source available (as an emulated disk or otherwise) to a booted operating system. Both INT13 hooks and iBFT/​aBFT/​sBFT filling are implemented as source attachers. The code requesting that a source be attached doesn'​t need to know how that attachment is done, which keeps things as platform-independent as possible. Both loading and attaching can be done recursively,​ so one can attach a SAN disk, boot from it (which will attach, execute, detach), and if the boot fails, still have the disk attached when gPXE exits; this is a cleaner way of achieving the "​keep-san"​ functionality. One fills in ''​source.data''​ with a user pointer to indicate a source already resident in memory (loading and unloading become a no-op), or sets ''​source.loaded''​ to a nonzero integer while keeping ''​source.data''​ null to indicate a source that cannot sensibly be loaded in its entirety (e.g. a SAN disk). Data sources support two additional features. First, they can be //loaded//, to allow for anything that needs the whole source in memory to work with it but doesn'​t particularly care where in memory it goes. (Loaded sources wind up on the external heap like downloaded images.) Second, they can be //​attached//,​ using platform-specific handlers to make the contents of the source available (as an emulated disk or otherwise) to a booted operating system. Both INT13 hooks and iBFT/​aBFT/​sBFT filling are implemented as source attachers. The code requesting that a source be attached doesn'​t need to know how that attachment is done, which keeps things as platform-independent as possible. Both loading and attaching can be done recursively,​ so one can attach a SAN disk, boot from it (which will attach, execute, detach), and if the boot fails, still have the disk attached when gPXE exits; this is a cleaner way of achieving the "​keep-san"​ functionality. One fills in ''​source.data''​ with a user pointer to indicate a source already resident in memory (loading and unloading become a no-op), or sets ''​source.loaded''​ to a nonzero integer while keeping ''​source.data''​ null to indicate a source that cannot sensibly be loaded in its entirety (e.g. a SAN disk).
  
-'''​Size impact:''' ​source.o +792 unless ''​MEM_SOURCE''​ minimalist option enabled+**Size impact:** source.o +792 unless ''​MEM_SOURCE''​ minimalist option enabled
  
 ===== Changes to downloads ===== ===== Changes to downloads =====
Line 20: Line 20:
   * Instead of calling ''​download_uri()''​ directly, ''​imgfetch()''​ calls ''​vfs_fetch_uri()'',​ which does some magic multiplexing so you can ''​imgfetch''​ a SAN disk or eventually a file on a filesystem as well as a downloadable URI. The reference to ''​vfs_fetch_uri()''​ is weak, so unless ''​vfs.c''​ is linked in by a common feature in the API of SAN protocols and filesystem types, it will reduce to ''​download_uri()''​ at compile time.   * Instead of calling ''​download_uri()''​ directly, ''​imgfetch()''​ calls ''​vfs_fetch_uri()'',​ which does some magic multiplexing so you can ''​imgfetch''​ a SAN disk or eventually a file on a filesystem as well as a downloadable URI. The reference to ''​vfs_fetch_uri()''​ is weak, so unless ''​vfs.c''​ is linked in by a common feature in the API of SAN protocols and filesystem types, it will reduce to ''​download_uri()''​ at compile time.
  
-'''​Size impact:''' ​dlmgmt.o +166, imgmgmt.o -29, downloader.o +120, net +257.+**Size impact:** dlmgmt.o +166, imgmgmt.o -29, downloader.o +120, net +257.
  
 ===== Changes to images ===== ===== Changes to images =====
Line 27: Line 27:
 A new image API function, ''​image_set_source()'',​ can be used to set or change the data source associated with an image. It handles reference counting properly, and an image releases its reference to its data source when freed. A new image API function, ''​image_set_source()'',​ can be used to set or change the data source associated with an image. It handles reference counting properly, and an image releases its reference to its data source when freed.
  
-'''​Size impact:''' ​image.o +41, image_cmd.o -13 +**Size impact:** image.o +41, image_cmd.o -13
  
 +^ image type ^ mem - old ^ full - mem ^ net    |
 +| bootsector | +121      | +74        | +195   |
 +| bzimage ​   | +98       | +39        | +137   |
 +| com32      | +25       | +9         | +34    |
 +| comboot ​   | +17       | -4         | +13    |
 +| elf        | +30       | +12        | +42    |
 +| elfboot ​   | +3        | +2         | +5     |
 +| multiboot ​ | +47       | +22        | +69    |
 +| pxe_image ​ | +7        | -4         | +3     |
 +| script ​    | +38       | +19        | +57    |
 +^ Totals ​    | +386      | +169       | +555   |
  
 ===== Changes to SAN booting ===== ===== Changes to SAN booting =====

Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code unity-patch (generated for current page)