Differences
This shows you the differences between two versions of the page.
|
doc:howto:build [2013/01/10 10:49] orca |
doc:howto:build [2013/03/24 16:13] (current) mforkel |
||
|---|---|---|---|
| Line 33: | Line 33: | ||
| ===== Image Configuration ===== | ===== Image Configuration ===== | ||
| - | Start OpenWrt Buildroot's [[wp>ncurses]] [[wp>Text-based user interface|text-based]] configuration interface:\\ | + | The **OpenWrt Buildroot configuration interface** allows you to select the target platform, which version of the toolchain you want to use to build, which packages you want included in the firmware image file and which ones compiled. Start the OpenWrt Buildroot configuration interface by entering:\\ |
| <code> | <code> | ||
| make menuconfig | make menuconfig | ||
| </code> | </code> | ||
| - | |||
| - | Similar to the Linux kernel config, almost every option has three choices, **y**, **m**, **n** which are represented as follows: | ||
| - | * pressing **y** yields to ''<*>'' label \\ This package will be included in the firmware image | ||
| - | * pressing **m** yields to ''<M>'' label \\ This package will be compiled (to be installed with ''[[doc:techref:opkg]]'' after [[doc:howto:generic.flashing|Flashing OpenWrt]]) but the package will **not** be included in the firmware-image | ||
| - | * pressing **n** yields to ''< >'' label \\ This package will not be compiled. | ||
| - | |||
| - | When you save your configuration, the file ''~/openwrt/trunk/.config'' will be created according to your configuration. | ||
| - | |||
| - | The devs offer such a file for OpenWrt 'Backfire' 10.03.1-RC5, e.g. [[http://downloads.openwrt.org/backfire/10.03.1-rc5/ar71xx/config|for ar71xx]]. | ||
| {{ OpenWrt Buildroot TUI.gif}} | {{ OpenWrt Buildroot TUI.gif}} | ||
| - | * The menu above allows you to select the target platform, which version of toolchain you want to use to build and what packages you want included in the firmware image. | + | Similar to the configuration interface of the Linux kernel, almost every option has three choices, **y**, **m**, **n** which are represented as follows: |
| + | * pressing <html><strong><kbd>y</kbd></strong></html> yields to ''**<*>**'' label \\ This package will be compiled and included in the firmware image file. | ||
| + | * pressing <html><strong><kbd>m</kbd></strong></html> yields to ''**<M>**'' label \\ This package will be compiled, but **not** included in the firmware image file. (To be installed with ''[[doc:techref:opkg]]'' after [[doc:howto:generic.flashing|flashing]] the firmware image file.) | ||
| + | * pressing <html><strong><kbd>n</kbd></strong></html> yields to ''**< >**'' label \\ This package will not be compiled. | ||
| - | * Run this configuration interface after updating sources and feeds to ensure that the latest packages are included in your configuration. | + | When you save your configuration, the file **''<buildroot dir>/.config''** will be created according to your configuration. |
| Line 58: | Line 52: | ||
| * to alter the vanilla Kernel-Settings, edit the file ''<buildroot dir>**/package/base-files/files/etc/sysctl.conf**'' on your build machine. | * to alter the vanilla Kernel-Settings, edit the file ''<buildroot dir>**/package/base-files/files/etc/sysctl.conf**'' on your build machine. | ||
| * to alter the [[doc/howto/wireless.hotspot.wifidog|WifiDog]]-configuration file, edit ''<buildroot dir>**/feeds/packages/net/wifidog/files/wifidog.conf**'' on your build machine. | * to alter the [[doc/howto/wireless.hotspot.wifidog|WifiDog]]-configuration file, edit ''<buildroot dir>**/feeds/packages/net/wifidog/files/wifidog.conf**'' on your build machine. | ||
| + | * etc. | ||
| - | As you can learn in [[doc/techref/flash.layout]], all the files you edit now, will be part of the <color magenta>''/rom''</color>-partition formated with the [[doc:techref:filesystems#SquashFS]] read-only file system. But because OpenWrt utilizes [[doc:techref:filesystems#overlayfs|overlayfs]], you will of course still be able to alter the files again once the image has been flashed to the router. However: | + | As you can learn in [[doc/techref/flash.layout]], all the files you edit now, will be located on the <color magenta>''/rom''</color>-partition, which is formated with the [[doc:techref:filesystems#SquashFS]] read-only file system. But because OpenWrt utilizes [[doc:techref:filesystems#overlayfs|overlayfs]], you will of course still be able to alter the files again once the image has been flashed to the router. However: |
| | {{:meta:icons:tango:48px-dialog-warning.svg.png?nolink}} | <color red>**Warning! Be carefull!**</color> [[doc/howto/generic.failsafe|OpenWrt failsafe]] relies on 100%-working base files on the <color magenta>''/rom''</color>-partition, so in case you misconfigure or misspell something, you will end up with a non-working failsafe and be forced to used more rudimentary methods to [[doc/howto/generic.debrick|debrick]] your device again! | | | {{:meta:icons:tango:48px-dialog-warning.svg.png?nolink}} | <color red>**Warning! Be carefull!**</color> [[doc/howto/generic.failsafe|OpenWrt failsafe]] relies on 100%-working base files on the <color magenta>''/rom''</color>-partition, so in case you misconfigure or misspell something, you will end up with a non-working failsafe and be forced to used more rudimentary methods to [[doc/howto/generic.debrick|debrick]] your device again! | | ||
| Line 160: | Line 155: | ||
| make -j 3 | make -j 3 | ||
| </code> | </code> | ||
| - | * Use the standard formula ''<your number of CPUs + 1>'' | + | * Use the standard formula ''<your number of CPU cores + 1>'' |
| * If this produces random build errors try compiling again without the ''-j''-option | * If this produces random build errors try compiling again without the ''-j''-option | ||
| Line 231: | Line 226: | ||
| </code> | </code> | ||
| - | deletes contents of ''/bin'' and ''/build_dir'' directories and additionally ''/staging_dir'' and ''/toolchain'' (=the cross-compile tools). 'Dirclean' is your basic "Full clean" operation. | + | deletes contents of ''/bin'' and ''/build_dir'' directories and additionally ''/staging_dir'' and ''/toolchain'' (=the cross-compile tools) plus ''/logs''. 'Dirclean' is your basic "Full clean" operation. |
| Line 271: | Line 266: | ||
| ==== I can't find my <package> in menuconfig ==== | ==== I can't find my <package> in menuconfig ==== | ||
| - Have you run this command? [[doc:howto:build#updating.feeds|See this.]] <code>./scripts/feeds install <package></code> | - Have you run this command? [[doc:howto:build#updating.feeds|See this.]] <code>./scripts/feeds install <package></code> | ||
| - | - Maybe you are not looking for it in the right submenu. See ''Makefile'' of the package to find out. <code>cat package/feeds/packages/<package>/Makefile</code> | + | - Maybe you are not looking for it in the right submenu. See ''Makefile'' of the package to find out. <code>cat package/feeds/packages/<package>/Makefile</code> You are looking for this: \\ ''define Package/<package>/Default |
| - | + | ||
| - | You are looking for this: | + | |
| - | |''define Package/<package>/Default | + | |
| SUBMENU:=**Firewall** | SUBMENU:=**Firewall** | ||
| SECTION:=net | SECTION:=net | ||
| - | CATEGORY:=**Network** | + | CATEGORY:=**Network**'' |
| - | ''| | + | - Menuconfig appears to cache package lists and (especially) profiles. Try deleting the ''trunk/tmp'' directory (in trunk, not your machine's ''/tmp'' directory!) and then running ''make menuconfig'' again. <code>cd trunk |
| + | rm -rf tmp | ||
| + | make menuconfig</code> Also try refreshing your package indexes: <code>./scripts/feeds update -i</code> The ''-i'' is important if you're not using the latest revisions of any packages, as this flag prevents updates from the feed sources. | ||
| ==== Error: No rule to make target... ==== | ==== Error: No rule to make target... ==== | ||
doc/howto/build.1357811347.txt.bz2 · Last modified: 2013/01/10 10:49 by orca
