|
| 1 | +--- |
| 2 | +layout: docs |
| 3 | +title: Quick-Start |
| 4 | +next_section: |
| 5 | +permalink: /docs/quick-start/ |
| 6 | +--- |
| 7 | + |
| 8 | +This guide will attempt to provide a guide to getting bitthunder building on your development system. |
| 9 | +The guide is based around the RaspberryPi, but should be very similar for all other supported platforms. |
| 10 | + |
| 11 | +# Cloning BitThunder |
| 12 | + |
| 13 | +You can clone the latest sources from: |
| 14 | +{% highlight bash %} |
| 15 | +git clone https://github.com/jameswalmsley/bitthunder.git |
| 16 | +# Or using SSH (if your a github member). |
| 17 | +git clone [email protected]:jameswalmsley/bitthunder.git |
| 18 | +{% endhighlight %} |
| 19 | + |
| 20 | +The public master branch aims to stay relatively stable, so you should always be able to build from it. |
| 21 | + |
| 22 | +# Requirements |
| 23 | + |
| 24 | +## DBUILD |
| 25 | +BitThunder includes its own make based build system. Its only real dependency is python. There must be a python |
| 26 | +interpreter in the path. Version 2.7 is known to work. |
| 27 | + |
| 28 | +DBUILD is responsible for managing dependencies effectively. Its called DBUILD because its like dark-matter, very mysterious! |
| 29 | + |
| 30 | +## Kconfig-frontends |
| 31 | +BitThunder uses the Kconfig system taken from the Linux kernel. Kconfig is simply brilliant, so we borrowed it. |
| 32 | +Thanks kernel.org! |
| 33 | + |
| 34 | +Build as follows: |
| 35 | + |
| 36 | +{% highlight bash %} |
| 37 | +git clone https://github.com/jameswalmsley/kconfig-frontends.git |
| 38 | +# Or using SSH (if your a github member). |
| 39 | +git clone [email protected]:jameswalmsley/kconfig-frontends.git |
| 40 | +# Note this is a mirror of: |
| 41 | +# http://ymorin.is-a-geek.org/projects/kconfig-frontends |
| 42 | + |
| 43 | +cd kconfig-frontends |
| 44 | +./bootstrap |
| 45 | +./configure |
| 46 | +make |
| 47 | +sudo make install |
| 48 | +{% endhighlight %} |
| 49 | + |
| 50 | +You may also need libreadline, libncurses and libcurses installed to build. |
| 51 | + |
| 52 | +# Building BitThunder |
| 53 | + |
| 54 | +Building BitThunder should now be relatively straight-forward... |
| 55 | + |
| 56 | +{% highlight bash %} |
| 57 | +cd bitthunder |
| 58 | +make menuconfig |
| 59 | +{% endhighlight %} |
| 60 | + |
| 61 | +Now configure your system. |
| 62 | +For example when building for the raspberry pi: |
| 63 | + |
| 64 | + Build System: |
| 65 | + -> Change toolchain-prefix to location of your compiler: |
| 66 | + e.g. |
| 67 | + /opt/codesourcery/bin/arm-none-eabi- |
| 68 | + |
| 69 | + System Architecture: |
| 70 | + -> Select ARM |
| 71 | + -> Select BCM2835 Chip variant |
| 72 | + |
| 73 | + Linking: |
| 74 | + -> Enable RAM |
| 75 | + -> RAM Start Addess = 0x8000 |
| 76 | + -> RAM length = 0x01000000 |
| 77 | + # Thats 16Mb, but you could also set it to 128mb. |
| 78 | + |
| 79 | +Exit and save the configuration. Due to a small problem with Kconfig you now have to run |
| 80 | +menuconfig once more. |
| 81 | + |
| 82 | + make menuconfig |
| 83 | + |
| 84 | +Simply exit and save the config file. |
| 85 | + |
| 86 | +To build: |
| 87 | + |
| 88 | + make |
| 89 | + |
| 90 | +In the case of raspberry pi, this should compile and produce binaries under |
| 91 | + |
| 92 | + bsp/arm/raspberrypi |
| 93 | + |
| 94 | + kernel.img -- A raw binary for loading directly in memory. |
| 95 | + kernel.elf -- JTAG loadable elf file with full debug info. |
| 96 | + kernel.list -- A disassembly of the kernel. |
| 97 | + kernel.map -- A map of the kernel. |
| 98 | + |
| 99 | + |
| 100 | +<div class="note info"> |
| 101 | + <h5>The build folder</h5> |
| 102 | + <p>Also note the build folder in the bsp. This is where all the objects, intermediates and dependency files are placed. |
| 103 | +This makes it possible to build different BSPs independently without having to clean everything. -- nice!</p> |
| 104 | +</div> |
| 105 | + |
| 106 | +Hopefully you'll get a nice flashing LED on the Pi if it works. |
0 commit comments