| 1 | NxOS - an open source alternative operating system for the Lego Mindstorms NXT |
|---|
| 2 | ============================================================================== |
|---|
| 3 | |
|---|
| 4 | Summary: |
|---|
| 5 | |
|---|
| 6 | 1. Introduction |
|---|
| 7 | 2. Requirements |
|---|
| 8 | 3. Building and testing |
|---|
| 9 | 4. Notes and FAQ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | 1. Introduction |
|---|
| 13 | ^^^^^^^^^^^^^^^ |
|---|
| 14 | |
|---|
| 15 | NxOS is an open source operating system that runs on the Lego Mindstorms NXT |
|---|
| 16 | platform. It aims at providing a comprehensive base system that provides |
|---|
| 17 | easy-to-use APIs to the NXT's hardware, including sensors, display and motors. |
|---|
| 18 | |
|---|
| 19 | It also contains some libraries that developers of /application kernels/ may find |
|---|
| 20 | of some interest, such as a file system or a GUI builder. |
|---|
| 21 | |
|---|
| 22 | NxOS is written in C, and must be cross-compiled to the ARM platform. See section 2 |
|---|
| 23 | below for the building requirements. |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | 2. Requirements |
|---|
| 27 | ^^^^^^^^^^^^^^^ |
|---|
| 28 | |
|---|
| 29 | Building and testing NxOS requires a few softwares and libraries. Since most of |
|---|
| 30 | the external utilities are written in Python, you will need a working installation |
|---|
| 31 | of Python (www.python.org). You will also need libusb and the python-pyusb packages, |
|---|
| 32 | needed by PyNXT to upload an NxOS kernel to the brick. |
|---|
| 33 | |
|---|
| 34 | * Python >= 2.4 |
|---|
| 35 | * libusb |
|---|
| 36 | * python-pyusb |
|---|
| 37 | |
|---|
| 38 | You will also need a working ARM cross-compilation chain. To ease |
|---|
| 39 | the process, you will find in the scripts/ directory an automatic |
|---|
| 40 | fetcher/builder : |
|---|
| 41 | |
|---|
| 42 | % mkdir -p ~/arm-gcc/ |
|---|
| 43 | % cd $_ |
|---|
| 44 | % ~/where/is/nxos/scripts/build-arm-toolchain.sh |
|---|
| 45 | [...] |
|---|
| 46 | |
|---|
| 47 | Don't forget to add ~/arm-gcc/install/bin to your PATH environment variable. |
|---|
| 48 | |
|---|
| 49 | For MacOS X (>= 10.5.x) users, don't forget to install the Lego |
|---|
| 50 | driver Leopard update from the Lego software updates page, or you |
|---|
| 51 | won't be able to communicate with the brick via USB. |
|---|
| 52 | |
|---|
| 53 | 3. Building and testing |
|---|
| 54 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|---|
| 55 | |
|---|
| 56 | To build NxOS, simply go inside the nxos/ subdirectory (the one |
|---|
| 57 | that contains base/, systems/, ...) and type: |
|---|
| 58 | |
|---|
| 59 | % scons appkernels=tests |
|---|
| 60 | |
|---|
| 61 | Finally, connect the brick to your computer with the USB cable, and do: |
|---|
| 62 | |
|---|
| 63 | % ./boot_firmware tests samba |
|---|
| 64 | |
|---|
| 65 | The script will then ask you confirmation, and then upload the firmware |
|---|
| 66 | to the brick's RAM (for ROM flashing mode, change 'samba' for 'rom'). |
|---|
| 67 | |
|---|
| 68 | To build and try another kernel, simply replace 'tests' by the name |
|---|
| 69 | of the application kernel you want to build. The available kernels |
|---|
| 70 | are the directory in systems/. You can also build several appkernels at |
|---|
| 71 | once by using a comma-separated list. |
|---|
| 72 | |
|---|
| 73 | 4. Notes and FAQ |
|---|
| 74 | ^^^^^^^^^^^^^^^^ |
|---|
| 75 | |
|---|
| 76 | Anything? |
|---|
| 77 | |
|---|