<div><br></div><div>These are great news congrats on the hard work!. </div><div><br></div><br clear="all">Rafael Ortiz <br>
<br><br><div class="gmail_quote">On Tue, Jan 18, 2011 at 12:34 AM, Richard A. Smith <span dir="ltr"><<a href="mailto:richard@laptop.org">richard@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
EC-1.75<br>
<br>
OLPC is happy to announce the existence of a mostly [1] public code base<br>
for the embedded controller (EC) used on the XO 1.75.<br>
<br>
For the impatient:<br>
<br>
git clone git://<a href="http://dev.laptop.org/users/rsmith/ec-1.75" target="_blank">dev.laptop.org/users/rsmith/ec-1.75</a><br>
<br>
Before we talk about what EC-1.75 is and what you can do with it let's<br>
first talk about what it's not.<br>
<br>
What it's not:<br>
<br>
EC-1.75 is not OpenEC.<br>
<br>
OpenEC [2] is an alternate EC codebase for XO-1 that was almost<br>
completely written by Frieder Ferlemann based on the datasheet for the<br>
KB3700 and bits of released information describing the XO-1 hardware.<br>
Although the code loads and runs on a XO-1 EC most of it is untested and<br>
the tree is currently unmaintained. However, it blazed a path and<br>
served as a guideline for creating EC-1.75. Many thanks to Frieder for<br>
his contribution.<br>
<br>
[2] <a href="http://wiki.laptop.org/go/OpenEC" target="_blank">http://wiki.laptop.org/go/OpenEC</a><br>
<br>
What it is:<br>
<br>
EC-1.75 was derived from the existing (closed) OLPC EC code base with<br>
all code that was not copyright OLPC or Quanta removed. The missing<br>
bits were then re-implemented for the EnE KB3930 in the 1.75 A1<br>
prototype and currently are being ported to the EnE IO3731 in the A2<br>
prototype. EC-1.75 is licensed GPL + a special linking exception and<br>
all code is now copyright OLPC. EC-1.75 is also targeted exclusively at<br>
the 1.75 A2 board and beyond. Although parts of the code base were<br>
created on Gen 1.5 machines and those branches exist in the tree there<br>
are currently no plans to continue developing those branches.<br>
<br>
I mentioned that some of the original code carried a Quanta copyright.<br>
The new code now carries an OLPC copyright. The original EC code was<br>
jointly developed by Quanta and OLPC, and our agreement gives both<br>
parties joint ownership of it. We've used that base to create the new<br>
EC-1.75 code under a new OLPC copyright - Quanta jointly owns the code<br>
and could do the same sort of thing as well. All code in the EC-1.75<br>
tree will continue to hold an OLPC copyright, so new authors must adhere<br>
to that practice.<br>
<br>
We realize that copyright assignment to OLPC is not an optimal situation<br>
for accepting contributions from the community but doing it this way<br>
allowed us to open up the code while keeping the man-hours of<br>
enhancement and bug fixing work from the previous codebase.<br>
<br>
Description of the branches in the EC-1.75 repository:<br>
<br>
3700 :<br>
Early development code for XO-1.5.<br>
<br>
3930-A1 :<br>
Port of codebase to the 1.75 A1 board.<br>
<br>
3731 :<br>
Port of codebase to the 1.75 A2 board.<br>
<br>
master :<br>
Mash-up of all the above branches + development head. Since the<br>
hardware for A2 only became available last week, this<br>
branch is changing frequently.<br>
<br>
stable :<br>
Not really used right now since there isn't any stable code.<br>
<br>
<br>
What it's good for:<br>
<br>
Unless you have an XO 1.75 A2 board, not much. A1 boards are now<br>
deprecated and will be removed from service as soon as A2 boards are<br>
distributed. The KB3930 on the A1 boards will no longer be supported.<br>
As of this writing (Ver: 4_0.0.6) all major blocks of the EC on the A2<br>
board are up and running. If you don't have a 1.75 it's still possible<br>
to play if you spend the time to backport the code from the master<br>
branch on to the 3700 branch and produce something that will work on a<br>
1.5. The 1.5 can be programmed with an external SPI programmer so you<br>
don't have to worry about bricking the 1.5. The result could then be<br>
pulled into OpenEC as a starting point for 1.5. Email me if you are<br>
interested in undertaking that task.<br>
<br>
<br>
Development requirements:<br>
<br>
EC-1.75 A2 currently requires you to use the Keil (non-free) or SDCC<br>
(free) compiler. The SDCC compiler currently generates an image that is<br>
too large to fit in the 32 KiB of flash space on the IO3731 EC chip, so<br>
we're using Keil. [3] We hope to move back to SDCC (see below).<br>
To program the EC code into an A2 you need a programmer that understands<br>
how to do the EnE EDI protocol. OLPC uses external programmers with<br>
some custom software but OFW can also program the EC as long as the<br>
system is not bricked.<br>
<br>
<br>
[1] Mostly open:<br>
<br>
EnE, the manufacturer of the EC's, has requested that we not release<br>
information on various parts of the EC. One of these parts is the PS/2<br>
interface which is used to talk to the keyboard and mouse. Code that<br>
uses these parts is contained in a sub-module called "private" and is<br>
only accessible by parties that have signed the OLPC NDA agreement. The<br>
special exception in the license allows linking against this private<br>
code without that code coming under the GPL. On A1 boards and "as<br>
built" A2 boards these closed PS/2 interfaces are used. A2 boards<br>
however, have the ability to route the keyboard and mouse data streams<br>
to the security processor on the the host SoC rather than the EC. OLPC<br>
has code for the security processor that will bit-bang the PS/2<br>
protocol. The main processor on the SoC can then read the keyboard and<br>
mouse data from the security processor rather than the EC. This data<br>
path has not been fully implemented all the way to the Linux command<br>
line but soon after the A2 bring up dust settles it will be finished and<br>
undergo wider testing. If it proves to be viable then the private code<br>
will be deprecated and eventually dropped from the tree. We hope that<br>
removal of the PS/2 and keyboard/mouse code will bring the size back<br>
down to a point where an SDCC image will fit in the IO3731 and a fully<br>
open codebase + toolchain can be realized.<br>
<br>
[3] Works as long as you can check out the private tree. Compile fails<br>
if not.<br>
<br>
Datasheets:<br>
<br>
The public datasheet for the IO3731 is available here:<br>
<br>
<a href="http://wiki.laptop.org/images/5/56/IO3731_v12_OLPC_20110117.pdf" target="_blank">http://wiki.laptop.org/images/5/56/IO3731_v12_OLPC_20110117.pdf</a><br>
<br>
This datasheet has the descriptions of the non-public interfaces removed.<br>
<br>
Discussion:<br>
<br>
Since the OpenEC mailing list already exists [4] I don't really see much<br>
value in creating a list thats specific to EC-1.75. Any discussions are<br>
valuable to both code bases. Therefore please see the OpenEC list if<br>
you want to follow the development of EC-1.75. Questions on this<br>
announcement and simple questions or discussions are fine for devel@.l.o<br>
but please send things like patches or very detailed questions to the<br>
OpenEC list.<br>
<br>
[4] <a href="http://lists.laptop.org/listinfo/openec" target="_blank">http://lists.laptop.org/listinfo/openec</a><br>
<br>
So, that's the plan -- right now we're using a non-free compiler (Keil)<br>
to build a mostly free (except for PS/2) EC for 1.75, but we're near to<br>
replacing the non-free compiler and the non-free PS/2 code at the same<br>
time. As always, we welcome your help!<br>
<font color="#888888"><br>
--<br>
Richard A. Smith <<a href="mailto:richard@laptop.org">richard@laptop.org</a>><br>
One Laptop per Child<br>
_______________________________________________<br>
Openec mailing list<br>
<a href="mailto:Openec@lists.laptop.org">Openec@lists.laptop.org</a><br>
<a href="http://lists.laptop.org/listinfo/openec" target="_blank">http://lists.laptop.org/listinfo/openec</a><br>
</font></blockquote></div><br>