[Automated-testing] [Some] Progress on net boot for Minnowboard

William Mills wmills at ti.com
Thu May 8 12:35:24 PDT 2014


All,

I have had some progress on getting (original) Minnowboard to net boot.
It has been reported that it works and reported that it does not.
I found some of each.

[1]
https://lists.yoctoproject.org/pipermail/automated-testing/2014-February/000041.html
[2] https://plus.google.com/+TylerBaker/posts/CmdoBXHzkw5

<firehose-mode>

What works:
* IPv4 DHCP+TFTP netboot for Grub's bootia32.efi
* tftp for config files
* menu on HDMI+keyboard and serial port
* transfer of single file of bootia32.efi padded w/ 256MB of 0's
  * takes about 65s (~33Mbps)
  * runs OK after transfer

Magic info:
* You need the minnowboard 1.0 firmware
* FirmwareUpgrade -f <firmware> wipes out MAC address
* FirmwareUpgrade -m <mac> fixes this
  * Your MAC address is on a sticker on the board
  * Docs say that -m is only needed if you use the SPI program method
  * However, I used FrimewareUpgrade -f and found MAC addr to be zero
  * UEFI transmits packets even with zero MAC address
	* Good to debug this problem
	* Bad for the network
* You need to do ESC exit twice to get the UEFI boot menu
  * Then just select "ETH0 - IPv4" menu choice
* Reset the board between tries
  * UEFI caches the DHCP info if not reboot
    * Only retries TFTP

What does *NOT* work:
1) Grub "linux minnow01/vmlinuz" command
  * Transfers 50 1K blocks and then stops ACKing
  * TFTP server continues to retransmit block 51 w/o ACK
  * After 15ish seconds Grub declares tiemout
    * Grub sends error packet to TFTP server
    * Grub exits command w/ error timeout message
  * Tried different paths, w/ & w./o (tftp) prefix etc
  * I tried sending a different (non-kernel) file
    * Grub gets 50 blocks and then immediately send tftp close
    * Grub exists w/ "bad magic value" message
2) DHCP lease renewal by Grub is not honored by my DHCP server
  * I suspect this is config error on DHCP server side
  * Not really important in the long run
    * we should not be in Grub for > 5 min anyway
3) Not really doing "PXE" yet
  * Grub is not setting any of the pxe_ vars
  * I suspect this is config error on DHCP side
  * (I know that EFI net boot is not technically "PXE")
    * True PXE is BIOS only any includes the BIOS calls to tx & rx pkts
    * However many implementations of netboot follow PXE wire protocol
    * I believe Grub efi does as well
4) Have not completely figured out Grub config files.
  * I have a config file embedded into bootia32.elf
  * This file causes it to read a config file on TFTP
  * the file is read but seems to be ignored
  * it continues to read $prefix/grub.cfg
    * commands placed there *do* effect operation

#1 Above may be something I am doing wrong yet.
However it may also be a bug in the firmware.
The "linux" command apparently does some processing in a stream fashion.
It appears to read 50K and the pause to look at the data.
There may be a bug related to packet rx during this pause.
Or I could be completely over thinking the problem.

Even if #1 does not get fixed we have a fallback.
Grub allows kernel, initrd and other support files to be
embedded into bootia32.efi
A big bootia32.efi appears to work fine.
This will take some playing to produce but we should be able to make
a recovery image in a single bootia32.efi.


** OK, if you stuck with me this far, thanks
** But I'm about to go a lot deeper

I am hacking the bootia32.efi from a YP 1.6 build.
I did a 1.6 release build of genericx86
I first tried bootia32.elf produced by that build
That booted and gave be a grub shell but no network commands.

Next I hacked the grub-efi run.do_deploy script.
* added modules: net tftp efinet
  * also: help echo hello configfile
* changed embedded grub.cfg to:
  """
  configfile $net_efinet1_boot_file.cfg
  """
  (Yes this is a dirty hack)
* changed the prefix to be relative not absolute
  * my TFTP server is not chroot'ed, this works around that
* This is still trying to read a bunch of *.lst files and grub.cfg
  from the TFTP server
* I added these files and a two menu config into grub.cfg
* This got me to the state docuemented above

Having a known good bootia32.efi would be great.
Does someone have a cobbler or MAAS install that you can pull from?
I would love to see the module and config file from one that has been
deployed in a real network.

</firehose-mode>

Bill


More information about the automated-testing mailing list