Nios II: Getting the uClinux tree

From Crashcourse Wiki

Jump to: navigation, search

To get started, you'll need a Nios-enhanced version of the uClinux tree, and there are a couple ways to get one.

Plan A

First, you can download the ready-made tarball [uClinux-dist-20080131.tar] and, once you unload it in the directory of your choice, you can examine the git branches available for checkout:

$ git branch -a
  master
* nios2
  test
  v2.6.23-uc
  origin/HEAD
  origin/fixme
  origin/master
  origin/nios2
  origin/test
  origin/v2.6.23-uc
$

and checkout whichever one is appropriate for your work.

In addition to the branches already defined in that tarball, you can update that list with the newer branches defined at the SOPC server itself as follows:

$ git fetch
... chug chug chug ...
$ git branch -a
  master
* nios2
  test
  v2.6.23-uc
  origin/HEAD
  origin/fixme
  origin/master
  origin/nios2
  origin/test
  origin/v2.6.23-uc
  origin/v2.6.24-uc              <-- new
  origin/v2.6.25-nios2nommu      <-- also new
$

As you can see above, there are now a couple newer branches but, before you can check them out, you have to first start tracking them locally:

$ git branch --track v2.6.24-uc origin/v2.6.24-uc
$ git branch --track v2.6.25-nios2nommu origin/v2.6.25-nios2nommu
$ git branch -a
  master
* nios2
  test
  v2.6.23-uc
  v2.6.24-uc               <-- now checkoutable
  v2.6.25-nios2nommu       <-- same here
  origin/HEAD
  origin/fixme
  origin/master
  origin/nios2
  origin/test
  origin/v2.6.23-uc
  origin/v2.6.24-uc
  origin/v2.6.25-nios2nommu
$

If you truly want to work with the development version of the Nios II repository, the v2.6.25-nios2nommu branch is what you'd be after.

Plan B

As a second (strongly discouraged) alternative to getting a uClinux tree with the latest branches, it is possible to simply do a straight git clone from the SOPC server with:

$ git clone git://sopc.et.ntust.edu.tw/git/uClinux-dist.git 

but this is discouraged because of bandwidth issues. If you can get the tarball, it's a simple process to fetch those new branches as explained above, and it puts far less load on the SOPC server.

ADDENDUM: Actually, never use Plan B. It's only described here to show you what the end result should be, but you should always go with Plan A.

Return to Altera_Nios_II main page.

Personal tools