Building Cerowrt on your own machine
Version 22 (Dave Täht, 04/30/2012 12:48 pm)
| 1 | 1 | h1. Building Cerowrt on your own Linux machine |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 9 | Petri Rosenström | These instructions *should* work with the 11.10 Ubuntu. |
| 4 | 1 | ||
| 5 | 9 | Petri Rosenström | h2. Prerequisites |
| 6 | 10 | Petri Rosenström | |
| 7 | 15 | Dave Täht | You need some packages that you may download the sources. Then you need some build dependencies to be satisfied. Then you need to checkout the sources. |
| 8 | 1 | ||
| 9 | 9 | Petri Rosenström | <pre> |
| 10 | 16 | Dave Täht | sudo apt-get install git-all subversion build-essential flex libncurses5-dev libz-dev gawk gettext bison texinfo |
| 11 | 19 | Dave Täht | mkdir -p ~/src/prep ~/src/cerowrt |
| 12 | 17 | Dave Täht | cd ~/src/prep |
| 13 | 12 | Dave Täht | git clone git://github.com/dtaht/cerofiles-3.3.git |
| 14 | 9 | Petri Rosenström | </pre> |
| 15 | 1 | ||
| 16 | 9 | Petri Rosenström | There will be a *build_cero.sh* script in that checkout. There is also a *cero_config* file here. Copy *cero_config* to *~/.cero* and then edit it to suit your preferences. |
| 17 | 9 | Petri Rosenström | |
| 18 | 9 | Petri Rosenström | <pre> |
| 19 | 12 | Dave Täht | cp cerofiles-3.3/cero_config ~/.cero |
| 20 | 9 | Petri Rosenström | vim ~/.cero # use the editor you are comfortable with |
| 21 | 9 | Petri Rosenström | </pre> |
| 22 | 9 | Petri Rosenström | |
| 23 | 9 | Petri Rosenström | This example assumes the use of folder *~/src/cerowrt* as main directory so you should change the *CERO_DIR* variable to |
| 24 | 9 | Petri Rosenström | <pre> |
| 25 | 9 | Petri Rosenström | CERO_DIR=~/src/cerowrt |
| 26 | 9 | Petri Rosenström | </pre> |
| 27 | 9 | Petri Rosenström | |
| 28 | 9 | Petri Rosenström | |
| 29 | 1 | then run |
|
| 30 | 9 | Petri Rosenström | <pre> |
| 31 | 20 | Dave Täht | ~/src/prep/cerofiles-3.3/build_cero.sh init |
| 32 | 20 | Dave Täht | cd ~/src/ |
| 33 | 20 | Dave Täht | # in there will be your checked out dir, usually wndr3700v2, cd into that |
| 34 | 18 | Dave Täht | make # But please see note below for an extra step to save on download hassles |
| 35 | 1 | </pre> |
|
| 36 | 1 | ||
| 37 | 12 | Dave Täht | The first time you run this it will take a VERY long time to build the toolchains, etc. I have generally found -jX to fail on large numbers of processors, so just build it in series and go to a long dinner or lunch. Or... |
| 38 | 12 | Dave Täht | |
| 39 | 12 | Dave Täht | <pre> |
| 40 | 12 | Dave Täht | make -jX |
| 41 | 12 | Dave Täht | make V=s |
| 42 | 12 | Dave Täht | </pre> |
| 43 | 12 | Dave Täht | |
| 44 | 21 | Dave Täht | Subsequent runs will be much faster, and -jX usually works. When it doesn't... make package/the_breaking_package/{clean,compile,install} V=99 usually will work or show the problem. |
| 45 | 5 | Dave Täht | |
| 46 | 21 | Dave Täht | **NOTE** With kernel.org down last year it was impossible to get a build to summon and compile all the needed packages. There is a temporary mirror of the needed packages available via rsync. It's still faster to just snag all the tarballs this way, so... inside the build dir above: |
| 47 | 4 | Dave Täht | |
| 48 | 9 | Petri Rosenström | <pre> |
| 49 | 9 | Petri Rosenström | mkdir dl; cd dl; rsync -av huchra.bufferbloat.net::dl . |
| 50 | 9 | Petri Rosenström | </pre> |
| 51 | 22 | Dave Täht | (this is a temporary expedient and not actually necessary in normal use) |
| 52 | 1 | ||
| 53 | 13 | Dave Täht | h2. Check your build |
| 54 | 13 | Dave Täht | |
| 55 | 13 | Dave Täht | If the wndr3700's bin/ar71xx/ has images that are less than 5MB, you didn't get a good .config file, and/or some major packages are missing, and/or |
| 56 | 13 | Dave Täht | |
| 57 | 13 | Dave Täht | Your final images should be about the same size as on huchra. |
| 58 | 13 | Dave Täht | |
| 59 | 10 | Petri Rosenström | h2. Lastly: |
| 60 | 1 | ||
| 61 | 2 | Dave Täht | Given that this builds most of cerowrt against the main git head trees, your build will differ somewhat from what we are making available as "release candidates":http://huchra.bufferbloat.net/~cero1/ at present. After we get stable, we will tag and freeze the relevant trees. |
| 62 | 2 | Dave Täht | |
| 63 | 2 | Dave Täht | We note that due to this difference, there may be slight (or even major) differences in the default .config file. It helps to repeatedly cp env/.config onto .config and run make defconfig, and install packages, etc, until they more closely match. |
| 64 | 2 | Dave Täht | |
| 65 | 3 | Dave Täht | We will improve this script as time goes on, and if you run into trouble, please contact the #bufferbloat irc channel and/or the mailing lists. |
| 66 | 3 | Dave Täht | |
| 67 | 1 | [[changing your cerowrt ip addresses]] [[changing your dns domain]] |