Skip to content

Building OpenEmbedded

dickon edited this page Jun 19, 2014 · 25 revisions

Building OpenXT is current unfortunately quite tricky. We are working
on simplifying the procedure and help is welcome.

There are several different sets of binaries that can be built:

  1. The OpenEmbedded build, which produces a platform installer ISO and
    many additional binary packages and related files, and requires a 32
    bit Debian squeeze machine, and takes about 6 hours and 150GB of disk
    space.

  2. The Windows tools build, which requires a Windows machine, the
    Microsoft Device Driver Kit (DDK), and Visual Studio (TODO: confirm versions).

  3. The CentOS tools and SyncXT server RPMs, which requires a CentOS 6 machine.

The OpenEmbedded build

Basic OpenEmbedded packages Follow the instructions for debian at

OEandYourDistro on the OpenEmbedded
wiki

for installing a few packages required to get OpenEmbedded
going. OpenEmbedded itself will download and install a lot of
toolchain materials (e.g. specific compiler versions).

Additional OpenXT specific packages

Install also these Debian packages:

ghc guilt iasl quilt bin86 bcc libsdl1.2-dev liburi-perl genisoimage                                                                                                  

Clone openxt.git

The first build scripts exist in openxt.git (along with this README.md file), so clone that:

git clone git://git@github.com/OpenXT/openxt.git      

You can of course clone your own fork. Be aware that there are another
approximately 60 OpenXT repositories that will be checked out next.

Configure your build tree

cd openxt    # the directory created by the clone command above                                                                                                       
cp example-config .config                                                                                                                                             

You should review the .config file and edit it as appropriate.

Configure signing certificates

NOTE: there is an effort in progress as of 18 June 2014 to simplify
this such that those who are concerned with building signing get a
simple auto-generated dev signing certificate.

For now you do need to create certificates. You need to protect these;
someone with read access to these files can potentially get any
devices running your build of OpenXT to upgrade themselves to their
malicious software by triggering an "Over The Air" upgrade, though
this should require local access to each device to point it at a
server that offers the new version.

If you are intending to distribute the results of your build you
should look into how the OpenXT release signing system works and
figure out how you are going to handle your certifcates. Otherwise,
run these commands:

mkdir certs  # make a certs directory inside the openxt directory                                                                                                     
openssl genrsa -out certs/prod-cacert.pem 2048                                                                                                                        
openssl genrsa -out certs/dev-cacert.pem 2048                                                                                                                         
openssl req -new -x509 -key certs/prod-cakey.pem -out certs/prod-cacert.pem -days 1095                                                                                
openssl req -new -x509 -key certs/dev-cakey.pem -out certs/dev-cacert.pem -days 1095                                                                                  

Then edit your .config file and find the variable initializations for keys, and set:

  1. REPO_PROD_CACERT to the absolute path to your
    openxt/certs/prod-cacert.pem file.
  2. REPO_DEV_CACERT to the absolute path to your
    openxt/certs/dev-cacert.pem file.
  3. REPO_DEV_CAKEY to the absolute path to your
    openxt/certs/dev-cakey.pem file.
    (TODO: there is also REPO_DEV_SIGNING_CERT and REPO_DEV_SIGNING_KEY and we need instructions on
    setting that, if it is needed)

Run the build

./do_build.sh # run within the openxt directory                                                                                                                       

Notes

See Phil Tricca's "First OpenXT
build"
for more
discussion, especially on the signing certificates work.

Clone this wiki locally