[ipxe-devel] building for use virtualbox
Warren Turkal
wt at ooyala.com
Mon Jan 28 22:18:31 UTC 2013
I did exactly that. I just mistyped in my last email. Where I said I added
"#undef DOWNLOAD_PROTO_TFTP", I actually mean "#undef DOWNLOAD_PROTO_HTTP".
Doing that gave me the following size of the roms:
$ du -b bin/8086100e.rom bin/virtio-net.rom
59904 bin/8086100e.rom
58880 bin/virtio-net.rom
They definitely did shrink, but not by much. I also tried to undef
NET_PROTO_IPV4. Unfortunately, that had no affect on the rom file sizes.
Thanks,
wt
On Mon, Jan 28, 2013 at 11:29 AM, Mark Gollahon <mgollahon at exacq.com> wrote:
> Warren, I'd suggest making an iPXE *test* build that removes HTTP
> support just to see if you can get it below the 57344 byte mark and,
> if so, see if it loads and runs. You can always play around with
> including and excluding features later. At least, that's the way I
> approached getting iPXE running in VBox.
>
>
> > Date: Mon, 28 Jan 2013 10:46:40 -0800
> > From: Warren Turkal <wt at ooyala.com>
> > To: Steve Cross <hairlesshobo at stevecross.org>
> > Cc: ipxe-devel at lists.ipxe.org
> > Subject: Re: [ipxe-devel] building for use virtualbox
> > Message-ID:
> > <CAAOEERyWeqX=
> R_XzWqkdpzAwcJrF2vQC_zB4SR8Yebm--sk4sA at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > I've added the following to config/local/general.h:
> > #undef PRODUCT_NAME
> > #define PRODUCT_NAME "WT" /* So that I'll know it's loading */
> > #undef DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
> > #undef PXE_MENU /* PXE menu booting */
> > #undef CRYPTO_80211_WEP /* WEP encryption (deprecated and
> > insecure!) */
> > #undef CRYPTO_80211_WPA /* WPA Personal, authenticating with
> > passphrase */
> > #undef CRYPTO_80211_WPA2 /* Add support for stronger WPA
> > cryptography */
> > #undef IWMGMT_CMD /* Wireless interface management
> commands */
> > #undef FCMGMT_CMD /* Fibre Channel management commands */
> > #undef SANBOOT_CMD /* SAN boot commands */
> >
> > The ISCSI stuff appears to be disabled by default in config/general.h.
> > Here's the sized of the virtio-net.rom and the 8086100e.rom files:
> > $ du -b bin/8086100e.rom bin/virtio-net.rom
> > 62464 bin/8086100e.rom
> > 61952 bin/virtio-net.rom
> >
> > These still aren't small enough (57344 bytes according to Klaus). I guess
> > it just isn't possible to get them small enough while retaining HTTP
> > support.
> >
> > And here's even a build undefing DOWNLOAD_PROTO_TFTP on top of the above
> > config:
> > $ du -b bin/8086100e.rom bin/virtio-net.rom
> > 59904 bin/8086100e.rom
> > 58880 bin/virtio-net.rom
> >
> > So it looks like something else big might be hiding in there somewhere.
> >
> > Also, they build to the same sizes if I undef NET_PROTO_IPV4 on top of
> the
> > no-HTTP config above, so it looks like that config option might not make
> > any difference. Is that expected?
> >
> > BTW, I am doing "make clean && make bin/8086100e.rom bin/virtio-net.rom"
> > for each of these builds.
> >
> > wt
> >
> >
> > On Mon, Jan 28, 2013 at 10:12 AM, Steve Cross
> > <hairlesshobo at stevecross.org>wrote:
> >
> >> From what I've read online, the easiest way to shrink the size of the
> >> final binary is to remote iSCSI support - assuming that you don't need
> it.
> >> If iSCSI/SAN is not something that you are planning to use inside of
> >> VirtualBox, then you could remove support for that and it should make it
> >> small enough to load into VirtualBox.
> >>
> >> -Steve
> >>
> >>
> >> On Mon, Jan 28, 2013 at 1:08 PM, Warren Turkal <wt at ooyala.com> wrote:
> >>
> >>> I'm not really sure at this point. Robin's comment sent me on a hunt. I
> >>> found the following in the logs:
> >>> DevPcBios: Failed to open LAN boot ROM file '/Users/wt/VirtualBox
> >>> VMs/8086100e.rom', rc=VERR_TOO_MUCH_DATA!
> >>>
> >>> So, I guess it isn't loading my ipxe rom. I'll see if I can figure out
> >>> how to cut it down to the needed size (apparently needs to be <58K).
> Does
> >>> anyone have any suggestions for how to trim the size without removing
> http
> >>> support?
> >>>
> >>> Thanks,
> >>> wt
> >>>
> >>>
> >>> On Sat, Jan 26, 2013 at 4:29 AM, Thomas Miletich <
> >>> thomas.miletich at gmail.com> wrote:
> >>>
> >>>> On Fri, Jan 25, 2013 at 7:33 PM, Warren Turkal <wt at ooyala.com> wrote:
> >>>> >
> >>>> > I am definitely getting the iPXE as it has splash screen like the
> one
> >>>> Andrew linked. Also, I can hit ctrl-b and exec ipxe commands, which
> is not
> >>>> possible with the built-in PXE. What isn't working is the HTTP
> protocol
> >>>> support.
> >>>> >
> >>>> > Also, my config/local/general.h is empty, so I don't think it's
> >>>> overriding anything.
> >>>> >
> >>>> > Here's another datapoint:
> >>>> > $ grep http 8086100e.rom.tmp.map | head -n2
> >>>> > bin/blib.a(http.o) bin/blib.a(config.o) (obj_http)
> >>>> > bin/blib.a(httpcore.o) bin/blib.a(http.o) (http_open_filter)
> >>>> >
> >>>> > The 8086100e.rom.tmp also has evidence of http. So, it looks like
> some
> >>>> http code has made it that far...I just can't use it. I don't know if
> it's
> >>>> just being stripped from the final rom binary, but there is no
> instace of
> >>>> http outside of a couple web addresses in 8086100e.rom. See the
> following:
> >>>> > $ strings 8086100e.rom | grep -i http
> >>>> > http://ipxe.org
> >>>> > iPXE (http://ipxe.org)
> >>>> > $ strings 8086100e.rom.tmp | grep -i http
> >>>> > http://ipxe.org
> >>>> > iPXE (http://ipxe.org)
> >>>> > [36mhttp://ipxe.org
> >>>> > See http://ipxe.org/cmd/%s for further information
> >>>> > http
> >>>> > %s (http://ipxe.org/%08x)
> >>>> > Error %#08x (http://ipxe.org/%08x)
> >>>> > http://ipxe.org/cfg/%s
> >>>> >
> >>>> > Why does the 8086100e.rom not have as many "http"-containing
> strings?
> >>>>
> >>>> The .rom image is compressed, the .rom.tmp isn't. So you won't be able
> >>>> to identify strings in the .rom image. If you can find them in the
> >>>> corresponding .rom.tmp image it should be fine.
> >>>>
> >>>> Are you really sure you're loading the correct image?
> >>>>
> >>>> > Thanks,
> >>>> > wt
> >>>> >
> >>>> >
> >>>> > On Thu, Jan 24, 2013 at 9:09 AM, Andrew Bobulsky <rulerof at gmail.com
> >
> >>>> wrote:
> >>>> >>
> >>>> >> On Wed, Jan 23, 2013 at 4:16 PM, Warren Turkal <wt at ooyala.com>
> wrote:
> >>>> >>>
> >>>> >>> iPXE devs,
> >>>> >>>
> >>>> >>> I have successfully built ipxe and used it in virtualbox much like
> >>>> the instructions here. However, when I do the "make
> bin/8086100e.rom", the
> >>>> rom image does not appear to contain the HTTP support code as I
> cannot use
> >>>> http urls in the ipxe shell after boot and hitting ctrl-b. Commands
> like
> >>>> with "imgfetch http://192.0.0.1/blah.img" fail with the following
> error:
> >>>> >>>
> >>>> >>> Could not start download: Operation not supported (
> >>>> http://ipxe.org/3c092003)
> >>>> >>>
> >>>> >>> The HTTP code does appear to be built by default since I see
> >>>> "#define DOWNLOAD_PROTO_HTTP" in the general.h. I also see the
> following:
> >>>> >>>
> >>>> >>> $ grep -i http bin/8086100e.rom
> >>>> >>> Binary file bin/8086100e.rom matches
> >>>> >>>
> >>>> >>> However, I do see "TFTP" and do not see "HTTP" in the "Features:"
> >>>> line of iPXE that shows before the prompt.
> >>>> >>>
> >>>> >>> I am using the tip of master for this test. The commit id is
> >>>> "3fcb8cf8dceb45f8b01e1d69d43cfd99df43b78a".
> >>>> >>>
> >>>> >>> Is there anything else that I should be doing to enable HTTP
> support
> >>>> in the iPXE rom that I am building.
> >>>> >>>
> >>>> >>> Thanks,
> >>>> >>> wt
> >>>> >>> --
> >>>> >>> Warren Turkal
> >>>> >>> Site Reliability Engineer |
> >>>> >>> wt at ooyala.com | 650-961-3400
> >>>> >>> www.ooyala.com | blog | @ooyala
> >>>> >>>
> >>>> >>> _______________________________________________
> >>>> >>> ipxe-devel mailing list
> >>>> >>> ipxe-devel at lists.ipxe.org
> >>>> >>> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
> >>>> >>
> >>>> >>
> >>>> >> Hello Warren,
> >>>> >>
> >>>> >> If you are indeed having build-related problems, I wouldn't be able
> >>>> to help you much, but I wanted to write as I've experienced this
> before.
> >>>> Virtualbox includes a version of iPXE that has very limited protocol
> >>>> support, and it is the default PXE ROM in every vbox VM I have used.
> If,
> >>>> for some reason, your attempt to inject the ROM into your Virtualbox
> VM's
> >>>> configuration didn't work, it would load the built-in version
> instead, and
> >>>> while you'd be loading iPXE (which would look like a successful
> >>>> implementation, but of course is just the old, built-in ROM loading).
> That
> >>>> built-in iPXE splash screen looks like this:
> >>>> http://i.imgur.com/gfVjURG.png
> >>>> >>
> >>>> >> If you like, the only test I could suggest that might shed some
> light
> >>>> on whether or not your features are being included in the build, you
> can
> >>>> instead...
> >>>> >>
> >>>> >> $ make bin/8086100e.pxe
> >>>> >>
> >>>> >> ...and then chainload *that* file from a TFTP server using the iPXE
> >>>> inside of your VM, and check to see if your features work. If they
> do,
> >>>> it's quite likely you just need some updated guide on how to replace
> your
> >>>> VirtualBox NIC's ROM.
> >>>> >>
> >>>> >> Cheers,
> >>>> >> Andrew Bobulsky
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Warren Turkal
> >>>> > Site Reliability Engineer |
> >>>> > wt at ooyala.com | 650-961-3400
> >>>> > www.ooyala.com | blog | @ooyala
> >>>> >
> >>>> > _______________________________________________
> >>>> > ipxe-devel mailing list
> >>>> > ipxe-devel at lists.ipxe.org
> >>>> > https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
> >>>> >
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> *Warren Turkal*
> >>> Site Reliability Engineer |
> >>> wt at ooyala.com | 650-961-3400
> >>> www.ooyala.com | blog <http://www.ooyala.com/blog> | @ooyala<
> http://www.twitter.com/ooyala>
> >>>
> >>> _______________________________________________
> >>> ipxe-devel mailing list
> >>> ipxe-devel at lists.ipxe.org
> >>> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
> >>>
> >>>
> >>
> >
> >
> > --
> > *Warren Turkal*
> > Site Reliability Engineer |
> > wt at ooyala.com | 650-961-3400
> > www.ooyala.com | blog <http://www.ooyala.com/blog> |
> > @ooyala<http://www.twitter.com/ooyala>
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20130128/6c4c83db/attachment.html
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > ipxe-devel mailing list
> > ipxe-devel at lists.ipxe.org
> > https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
> >
> >
> > End of ipxe-devel Digest, Vol 32, Issue 30
> > ******************************************
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
>
--
*Warren Turkal*
Site Reliability Engineer |
wt at ooyala.com | 650-961-3400
www.ooyala.com | blog <http://www.ooyala.com/blog> |
@ooyala<http://www.twitter.com/ooyala>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20130128/361a9577/attachment.htm>
More information about the ipxe-devel
mailing list