Network copy-nand: Difference between revisions
RafaelOrtiz (talk | contribs) mNo edit summary |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{OLPC}} |
{{OLPC}} |
||
[[category:firmware]] |
[[category:firmware]][[Category:Update paths]] |
||
== Introduction == |
== Introduction == |
||
This is a recipe for using copy-nand over the network, so you can replace your OS image without having to copy stuff onto a USB key. I have tested it only with Q2C18 firmware, but it probably works with a few other older versions. |
This is a recipe for using copy-nand over the network, so you can replace your OS image or firmware without having to copy stuff onto a USB key. I have tested it only with Q2C18 firmware, but it probably works with a few other older versions. |
||
It has some limitations: |
It has some limitations: |
||
Line 11: | Line 11: | ||
# It doesn't use the .CRC file to check the data (this is because of a deficiency in the firmware HTTP implementation that doesn't let you have two streams open at the same time; that could be worked around at some point by changing copy-nand to pre-read the CRC file into a buffer). |
# It doesn't use the .CRC file to check the data (this is because of a deficiency in the firmware HTTP implementation that doesn't let you have two streams open at the same time; that could be worked around at some point by changing copy-nand to pre-read the CRC file into a buffer). |
||
# It isn't as fast as doing copy-nand from a USB key, but it probably compares favorably to the total process of downloading first to the key, then copying from the key to NAND. |
# It isn't as fast as doing copy-nand from a USB key, but it probably compares favorably to the total process of downloading first to the key, then copying from the key to NAND. |
||
See also this discussion: |
|||
* [http://www.mail-archive.com/server-devel@lists.laptop.org/msg03975.html [Server-devel] Notes on Flashing the NAND over the LAN] |
|||
== Assumptions == |
== Assumptions == |
Latest revision as of 21:25, 17 January 2011
Introduction
This is a recipe for using copy-nand over the network, so you can replace your OS image or firmware without having to copy stuff onto a USB key. I have tested it only with Q2C18 firmware, but it probably works with a few other older versions.
It has some limitations:
- It doesn't use the .CRC file to check the data (this is because of a deficiency in the firmware HTTP implementation that doesn't let you have two streams open at the same time; that could be worked around at some point by changing copy-nand to pre-read the CRC file into a buffer).
- It isn't as fast as doing copy-nand from a USB key, but it probably compares favorably to the total process of downloading first to the key, then copying from the key to NAND.
See also this discussion:
Assumptions
- There is a DHCP server on your network
- You have looked at the protocol (nfs, http) support discussed in Forth Lesson 12.
Procedure
ok wifi media lab 802.11 ok wep yourWepKeyInHexadecimalIfThereIsOneOtherwiseOmitThisLine ok patch noop ?open-crcs copy-nand ok copy-nand http:\\www.mydomain\images\nand505.img
Discussion
The "wifi" line above sets the SSID of the access point. That line isn't necessary if you are using a wired network interface. The default SSID is "OLPCOFW", so if you are setting up a special wireless network for firmware testing, you can use that SSID name to save some typing.
The "patch" line disables CRC checking, as a workaround for a problem described in the introduction section.
The URL in the copy-nand line must use backslashes instead of forward slashes. Long URLs like the following will also work, if you can manage to type the whole thing without making a mistake.
- http:\\olpc.download.redhat.com\olpc\streams\development\LATEST\devel_jffs2\olpc-redhat-stream-development-devel_jffs2.img
Or, for joyride:
- http:\\xs-dev.laptop.org\~cscott\olpc\streams\joyride\latest\devel_jffs2\xo-1-olpc-stream-joyride-devel_jffs2.img
Caveat: The last time I tried using OFW networking in the OLPC offices, DNS name resolution didn't work. I don't know why. But DNS in OFW is working just fine on my home network as I am writing this. If you have trouble with DNS, try using the dotted decimal address (IPv4).
Reflashing the firmware over the network
A similar procedure works for the "flash" command, except that the patch is unnecessary.
ok wifi media lab 802.11 ok flash http:\\dev.laptop.org\~wmb\q2c18b.rom
if you want to reflash to put some other firmware please see:
- http:\\dev.laptop.org\~wmb\
Debugging
If you have trouble with OFW networking, you can often debug the problem by typing "debug-net" before the command that accesses the network. That will dump a lot of information about what OFW is doing and the responses. For example:
ok debug-net ok ping dev.laptop.org <lots of output elided - hopefully it is self-explanatory>
Disclaimer
This is a quick hack procedure provided in the hope that it might be useful, but is not currently supported officially (because I have too many other critical-path issues). If you should choose to file any trac tickets against it, expect to have them reassigned back to you.