OSD2.0 Development

From The Neuros Technology Wiki

Jump to: navigation, search




This the place where you can find developer documentation and resources for the device code named the OSD2.0 which is a part of the Neuros Open Internet Televsion Platform

Contents

[edit] OSD 2.0 Hardware

The OSD 2.0 is a platform from which numerous products will be built, both by Neuros and other third parties, the OSD2.0 Page has information on this hardware.

Design documents are currently under development, in the meantime, here's a link to the ML intro:

OSD 2.0 Spec & Thread

The OSD 2.0 is based on TI's Davinci 6446 SoC. This SoC has publicly available documentation available on TI's site (```TODO``` add link to the central page for docs on TI devsite).

Here's also some information on the OSD2 in the context of previous OSD products: OSD Platform Information (pdf)

[edit] Developer Support and Contacts

Since the system is still in an early development stage, many things are subject to change, both in hardware and software. We make an effort to keep this documentation up to date, but it's easy to stuble into something that's not documented here or outdated.

Because of this, at the moment the best resource for last minute changes is the IRC channel #neuros on freenode.net. It's staffed more or less is 24 hours on workdays, but weekly meetings are held for more structured discussion.

VLC port meeting is every Thursday 10am CST (UTC 15:00)

[edit] Developer Documentation

This documentation is aimed at developers that own an OSD2 bare boards (there are various revisions of this, with various degrees of completeness). If you are receiving a board that shipped after July 3rd 2008, you should read the memo about inverted RCA jacks and instructions on how to fix it with a custom cable. There may be still other hardware issues on this board, so if you have one and suspect hardware fault, please notify us immediately (IRC, or [bugzilla]).

This documentation will be updated again as we ship the dev kits with the board in a mini-itx case (initially 300 pieces, you can [pre-order here]), which will have hopefully the final and complete hardware.

Below is the build and setup instructions to create and boot a base Linux system. It does not currently have any real multimedia capabilities as it lacks codecs and a media server. They are under development and stuck by some licensing issues. See below for more.

[edit] One-time build environment setup

0. You will need your build station to have the following pre-requisite packages installed:

  • The usual essential build packages, such as `make`
  • The source control tool `git` (sometimes called also `git-core` depending on distribution)
  • `fakeroot` utility, to pretend you're root when building rootfs images
  • `mtd-utils`, needed for the `mkfs.jffs2` utility. However in many distribution this utility is only available in a path like /usr/sbin that is only in superuser's PATH. You will need to make sure it's available in the PATH of the user that's doing the build too.)

1. Select a directory on your machine. We will call it ##WORKDIR from now on. Most of the work is to be performed from this directory, unless noted otherwise:

  cd ##WORKDIR

2. Bootstrap the initial git repository that will allow you to setup all the others.

  git clone git://git.neurostechnology.com/git/build-tools

3. Fetch all the rest of the source code via helpful script (and get a cup of coffee as it can be quite slow in performing this operation):

  ./build-tools/scripts/git-helper.sh clone

5. Create some extra scripts and directories in the source tree, generates top Makefile customized to your environment etc. Please notice that if you move your tree into anoher dir, you will need to run this again

  ./build-tools/run-me-first.sh

[edit] Build instructions

After you take care of the one-time setup of the build environment as above, to entirely rebuild your system you need to do the following steps.

1. Set up environment variables used by the build scripts to find everything they need. You will need to run this everytime you log in again in a new shell before you can (re)build.

  source neuros-env

2. Simply run the top-level Makefile to build and install everything (run without options for some help):

  make all install

This will generate various images in the generated "images" subdirectory of your ##WORKDIR. Some useful files that get created there are:

  • u-boot.bin : u-boot bootloader image
  • default_env.img : u-boot environment variables image
  • uImage : Linux kernel image
  • rootfs.yaffs2 : Root file system image
  • osd20.pkg : package for emergency update, contain all the above. you can put on a card and re-flash the entire device with it (see below)

[edit] Installing on your device

You have two basic choices here: flashing the image on the device or net-boot.

[edit] Flashing the image

You can flash the package generated by the build in images/osd20.pkg

Place it on an MMC/SD card and plug it into the reader, then reboot the device. The bootloader will automatically start to flash the image. Do not unplug the power while this happens as you can make your device un-recoverable if you interrupt the flashing before it's complete. It takes a very short time to update the entire device, one minute or two at most (if you were used to the long flashing times of OSD1, rejoice).

After the update is complete, the system will automatically boot. I suggest you to remove the file from the card, or remove the card from the slot before you reboot again, because right now the updater in the bootloader will keep installing it regardless of the version. This will change in the future when we will use versioned pgk for emergency update.

Another thing to notice when you do this, is that your u-boot environment will be reset to factory values. So if you modified some variables, they will be gone and you will need to reset them. (TODO add some notes here on how to save and restore uboot envs)

[edit] Net-booting your device

This is a more complex procedure that will allow you to run your device from your PC, allowing to edit in real time files in the device file system without need to reboot, or try new kernels without the need to flash them.

1. You first need to setup a TFTP server on your host machine. Instructions on how to do this are the same as for OSD1, so i'll just link you to the TFTP setup chapter. The only difference is that you want to point your TFTP root to ##BASEDIR

2. Then you need to setup NFS on your host machine. Again, the NFS setup chapter in there is what you need. The only difference for the NFS setup is that when you edit /etc/exports you should only add this line:

   ##BASEDIR/rootfs/nfs-rootfs network-acl(rw,sync,no_root_squash,subtree_check)

3. Then you need to install the rootfs in a way that can be booted. To do this, you need to be able to gain root privilege, since we will need to install some files as root (you may be asked for password when you run the command below):

   make -C rootfs install-nfs

4. The above command will create a directory named rootfs/nfs-rootfs which is the directory that the OSD2 kernel will try to mount with NFS. Each time you do a modification that affect the rootfs, you run again the above command to transfer it to the live rootfs (and of course you can also manually edit files in nfs-rootfs, but be aware that they may be over-written by further runs of the command).

5. Force NFS server to reload the configuration. In debian and ubuntu it's the following command. But may be different for your distribution:

   /etc/init.d/nfs-kernel-server reload

6. Now we need to configure OSD2 to pick kernel and rootfs and use them to boot. Reboot the OSD2 and at the uboot timeout press any key in serial console to stop it and access uboot prompt. Then type the following commands:

   setenv bootcmd run devkernel
   setenv serverip ##YOUR_HOST_IP
   setenv rootfs_nfs_loc ##BASEDIR/rootfs/nfs-rootfs
   setenv tftp_root /images
   saveenv

7. Finally reboot and see if it works. If it fails immediately after it start to boot, it's TFTP that didn't pick up the kernel image. Otherwise you will see "Uncompressing Linux...." followed by a lot of dots and the Kernel will boot. Then if NFS isn't setup correctly, you will get errors later about kernel not able to mount the root file system. Otherwise, enjoy your login prompt !

[edit] Building with Open Embedded

See OpenEmbedded_OSD2 for instructions. It's still a work in progress, both the guide and OE, and at best right now you will get a basic Linux system that boots if flashed (but not from NFS). It's also at the moment quite different than the one you build with the regular build instructions above.

We are looking however in making OpenEmbedded the main tool to build the OSD2 system.

[edit] VLC, Codecs and Multimedia

Currently we are still in negotiation with Texas Instruments to obtain a deal for releasing a few components:

- cmemk (out-of-kernel memory manager) and dsplink (DSP interface) kernel modules. We currently are not allowed to redistribute them even as binaries. Currently they can be rebuilt only from the TIEVMS package available mostly free of charge from TI web site (with mandatory registration). The deal we are working at is to be able to redistribute ourselves the source for these modules under some GPL-compatible license if possible, and as open source anyway.

- codec engine (CE). A library to allow applications, in this case VLC to interface with the DSP). We are looking at obtaining a deal similar to cmemk and dsplink, since we need to link this application to a VLC plugin (and VLC is GPL).

- codecs. We are looking to buy the video codecs for the DSP from TI. In the meantime we are developing using the eval codecs found in TIEVMS pacakge (see above for how to obtain).

Alongside with this, we are porting VLC as the main multimedia framework on the OSD2, [[in collaboration] with [[1]]. VLC will run in server mode and applications will talk to it via a [[2] IPC interface.

Currently VLC is not built as part of the main build script explained above. It can be built separately (TODO instructions here). However the build will currently fail if you don't have the CE library built from TIEVMS in the proper location (TODO instructions here on how to install cmemk rebuilt from a TI-downloaded TIEVMS package).

[edit] Target Audience

Neuros primary interest is in creating a target for 3rd party application developers to port to. Our feedback from the market tells us there's a great market for that. So, for example, there's more and more television content available on the internet now, and clearly there's a great desire to "get internet television on the television" but rather than forcing those studios to get in the hardware business we offer a target to port to. Not only does it avoid distraction for the content providers, but it's a vastly better user experience than five set top boxes with five remotes! Now most of those content providers, aggregators and applications writers are left them with the media center pc hooked to the TV, which is fine, but typically loud big and expensive. The OSD2 provides an open electronics option that allows them to bring their content and applications directly to the TV set, using an open. silent, inexpensive solution that leaves them with a direct relationship that they control with their viewer. Get the intermediary (operator or hardware manufacturer) out of the way, and give the viewer the experience they want. If this sounds like a compelling option, please contact Neuros at busdev at Neurostechnology.com

[edit] Beta Testers

Neuros is looking for beta testers! Please sign up for our OSD2.0 HD Platform newletter today.

Personal tools