New Device howto

This page contains a clear guide for bringing up a previously unsupported and unknown device, and for getting support into the sunxi repositories.

=Step 1: Find out all you can=

Before you rush into things, it really pays to find out all you can about your device. Bringing up a new board is not rocket science, but it is non-trivial and time consuming, so it pays to spend a few hours on google and on our wiki to find out what is publicly known about your device.

When googling, you will find that android forum posts are a treasure trove of badly dispersed information. This ranges from basic android usage information all the way to device disassembly and pictures of the mainboard. If you are really lucky, someone will have posted information on how to expose the UART (serial). Part of your task is making this horribly inaccessible information easily and neatly available, at least for those bits that are relevant for the sunxi project.

As for the sunxi website, it is a really good idea to investigate similar specced devices with the same SoC. It often happens that devices get rebranded. If you are really lucky, you might find that your hardware is already supported. If not, you will be able to find out what other names your device was branded under, and you can include that information on the wiki page which you will create in step 2. You might also find similar devices with similar mainboards, but with just different bits bolted on, in which case you still might find some valuable information (like how to wire up the UART).

It also pays to check out the boards file from our u-boot repository, and see if your device is already listed there. Similarly, have a look through our Boards repository to see whether your device fex is listed there.

=Step 2: Create a wiki page=

If you have determined that your device is unique, then go ahead and create a new page. If your device is similar to an already documented device, then still create a new page and crosslink the two under a "similar devices" section. If it is a plain rebadger, then just add to an existing wiki page.

A good template for a device specific page is the (mostly empty) Coby MID7042 page, as this gives the user of your device a clear overview of the things he wants to know. Reproducing device marketing is not as useful, but some basics do need to be mentioned, especially if they aid differentiation.

Under no circumstances should you include pictures or documents that were not created by yourself, or by someone who gives his explicit permission to post them here. Use links in such cases.

Make sure that, at the end of your page, there is a Category tag, so that your device gets listed properly. Look at the markup of an existing device page for this.

=Step 3: Retrieve crucial information from the stock OS=

Please use the wrongly named Submitting_Boards howto to retrieve the bootinfo and .fex files. You will need them later on in Step 5 and Step 6. If you work through steps 5 and 6 and submit that code to the mailing list instead, then there is no real need to send these files in as the Submitting_Boards howto suggests.

=Step 4: Get a serial console (optional)=

Like any ARMv7 system, you are pretty much lost when anything goes wrong, unless you have access to a serial console (UART). If you intend to bring up a new device, it will really pay off to spend the time and effort to try to gain access to the serial console.

You will need a 3.3V TTL UART to USB converter usually, or a level changer to standard RS232 to be able to successfully talk to the serial port on sunxi hardware.

Some devices directly expose their UART, so all you really need to do is hook things up. Mobile devices never export a UART directly, or do not provide easy access to the UART. Here you will need to disassemble your device, locate the UART pins (if there are any) on the motherboard, solder on some wires and route them to the outside. This is of course a severely non-trivial task.

For more detailed information, refer to our (currently useless) UART howto

=Step 5: Add support to u-boot= =Step 6: Add support to sunxi-boards= =Step 7: Get your changes upstream=