1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-02-17 14:54:43 +02:00

some basic cleanup, stylistic change for config files, and slight fixes

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5455 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
pavlov 2006-11-06 23:37:55 +00:00
parent 495294a4df
commit d9219238b0
6 changed files with 187 additions and 187 deletions

View File

@ -58,10 +58,10 @@ which can be used to monitor svn commits and browse the sources.
There are four key directories in the base:
\begin{itemize}
\item tools
\item toolchain
\item package
\item target
\item tools
\item toolchain
\item package
\item target
\end{itemize}
\texttt{tools} and \texttt{toolchain} refer to common tools which will be
@ -100,12 +100,12 @@ firmware image. Similar to the linux kernel config, almost every option has thre
\texttt{y/m/n} which are represented as follows:
\begin{itemize}
\item{\texttt{<*>} (pressing y)} \\
This will be included in the firmware image
\item{\texttt{<M>} (pressing m)} \\
This will be compiled but not included (for later install)
\item{\texttt{< >} (pressing n)} \\
This will not be compiled
\item{\texttt{<*>} (pressing y)} \\
This will be included in the firmware image
\item{\texttt{<M>} (pressing m)} \\
This will be compiled but not included (for later install)
\item{\texttt{< >} (pressing n)} \\
This will not be compiled
\end{itemize}
After you've finished with the menu configuration, exit and when prompted, save your
@ -143,8 +143,8 @@ incredibly easy to port software to OpenWrt. If you look at a typical package di
in OpenWrt you'll find two things:
\begin{itemize}
\item \texttt{package/\textit{<name>}/Makefile}
\item \texttt{package/\textit{<name>}/patches}
\item \texttt{package/\textit{<name>}/Makefile}
\item \texttt{package/\textit{<name>}/patches}
\end{itemize}
The patches directory is optional and typically contains bug fixes or optimizations to
@ -193,9 +193,9 @@ define Build/Configure
endef
define Package/bridge/install
install -m0755 -d $(1)/usr/sbin
install -m0755 $(PKG_BUILD_DIR)/brctl/brctl \
$(1)/usr/sbin/
install -m0755 -d $(1)/usr/sbin
install -m0755 $(PKG_BUILD_DIR)/brctl/brctl \
$(1)/usr/sbin/
endef
$(eval $(call BuildPackage,bridge))
@ -206,22 +206,22 @@ As you can see, there's not much work to be done; everything is hidden in other
and abstracted to the point where you only need to specify a few variables.
\begin{itemize}
\item \texttt{PKG\_NAME} \\
The name of the package, as seen via menuconfig and ipkg
\item \texttt{PKG\_VERSION} \\
The upstream version number that we're downloading
\item \texttt{PKG\_RELEASE} \\
The version of this package Makefile
\item \texttt{PKG\_BUILD\_DIR} \\
Where to compile the package
\item \texttt{PKG\_SOURCE} \\
The filename of the original sources
\item \texttt{PKG\_SOURCE\_URL} \\
Where to download the sources from
\item \texttt{PKG\_MD5SUM} \\
A checksum to validate the download
\item \texttt{PKG\_CAT} \\
How to decompress the sources (zcat, bzcat, unzip)
\item \texttt{PKG\_NAME} \\
The name of the package, as seen via menuconfig and ipkg
\item \texttt{PKG\_VERSION} \\
The upstream version number that we're downloading
\item \texttt{PKG\_RELEASE} \\
The version of this package Makefile
\item \texttt{PKG\_BUILD\_DIR} \\
Where to compile the package
\item \texttt{PKG\_SOURCE} \\
The filename of the original sources
\item \texttt{PKG\_SOURCE\_URL} \\
Where to download the sources from
\item \texttt{PKG\_MD5SUM} \\
A checksum to validate the download
\item \texttt{PKG\_CAT} \\
How to decompress the sources (zcat, bzcat, unzip)
\end{itemize}
The \texttt{PKG\_*} variables define where to download the package from;
@ -241,24 +241,24 @@ directly as the Nth argument to \texttt{BuildPackage}.
\texttt{BuildPackage} uses the following defines:
\textbf{\texttt{Package/\textit{<name>}}:} \\
\texttt{\textit{<name>}} matches the argument passed to buildroot, this describes
the package the menuconfig and ipkg entries. Within \texttt{Package/\textit{<name>}}
you can define the following variables:
\texttt{\textit{<name>}} matches the argument passed to buildroot, this describes
the package the menuconfig and ipkg entries. Within \texttt{Package/\textit{<name>}}
you can define the following variables:
\begin{itemize}
\item \texttt{SECTION} \\
The type of package (currently unused)
\item \texttt{CATEGORY} \\
Which menu it appears in menuconfig
\item \texttt{TITLE} \\
A short description of the package
\item \texttt{URL} \\
Where to find the original software
\item \texttt{MAINTAINER} (optional) \\
Who to contact concerning the package
\item \texttt{DEPENDS} (optional) \\
Which packages must be built/installed before this package
\end{itemize}
\begin{itemize}
\item \texttt{SECTION} \\
The type of package (currently unused)
\item \texttt{CATEGORY} \\
Which menu it appears in menuconfig
\item \texttt{TITLE} \\
A short description of the package
\item \texttt{URL} \\
Where to find the original software
\item \texttt{MAINTAINER} (optional) \\
Who to contact concerning the package
\item \texttt{DEPENDS} (optional) \\
Which packages must be built/installed before this package
\end{itemize}
\textbf{\texttt{Package/\textit{<name>}/conffiles} (optional):} \\
A list of config files installed by this package, one file per line.
@ -306,8 +306,8 @@ shortcuts you can take. Instead of waiting for make to get to your package, you
run one of the following:
\begin{itemize}
\item \texttt{make package/\textit{<name>}-clean V=99}
\item \texttt{make package/\textit{<name>}-install V=99}
\item \texttt{make package/\textit{<name>}-clean V=99}
\item \texttt{make package/\textit{<name>}-install V=99}
\end{itemize}
Another nice trick is that if the source directory under \texttt{build\_\textit{<arch>}}

View File

@ -9,8 +9,8 @@ it was written under.
Syntax:
\begin{Verbatim}
config <type> [<name>] # Section
option <name> <value> # Option
config <type> ["<name>"] # Section
option <name> "<value>" # Option
\end{Verbatim}
Every parameter needs to be a single string and is formatted exactly
@ -36,13 +36,13 @@ need to define the following shell functions before running \texttt{config\_load
\begin{Verbatim}
config_cb() {
local type="$1"
local name="$2"
# commands to be run for every section
local type="$1"
local name="$2"
# commands to be run for every section
}
option_cb() {
# commands to be run for every option
# commands to be run for every option
}
\end{Verbatim}

View File

@ -34,14 +34,14 @@ script, which is optional and defaults to \texttt{50}. Changing it requires runn
You can also override these standard init script functions:
\begin{itemize}
\item \texttt{boot()} \\
Commands to be run at boot time. Defaults to \texttt{start()}
\item \texttt{boot()} \\
Commands to be run at boot time. Defaults to \texttt{start()}
\item \texttt{restart()} \\
Restart your service. Defaults to \texttt{stop(); start()}
\item \texttt{restart()} \\
Restart your service. Defaults to \texttt{stop(); start()}
\item \texttt{reload()} \\
Reload the configuration files for your service. Defaults to \texttt{restart()}
\item \texttt{reload()} \\
Reload the configuration files for your service. Defaults to \texttt{restart()}
\end{itemize}

View File

@ -22,13 +22,13 @@ after \texttt{scan\_interfaces} might not return the same result as running it b
After running \texttt{scan\_interfaces}, the following functions are available:
\begin{itemize}
\item{\texttt{find\_config \textit{interface}}} \\
looks for a network configuration that includes
the specified network interface.
\item{\texttt{find\_config \textit{interface}}} \\
looks for a network configuration that includes
the specified network interface.
\item{\texttt{setup\_interface \textit{interface [config] [protocol]}}} \\
will set up the specified interface, optionally overriding the network configuration
name or the protocol that it uses.
\item{\texttt{setup\_interface \textit{interface [config] [protocol]}}} \\
will set up the specified interface, optionally overriding the network configuration
name or the protocol that it uses.
\end{itemize}
\subsubsection{Writing protocol handlers}
@ -38,14 +38,14 @@ You can add custom protocol handlers by adding shell scripts to
\begin{Verbatim}
scan_<protocolname>() {
local config="$1"
# change the interface names if necessary
local config="$1"
# change the interface names if necessary
}
setup_interface_<protocolname>() {
local interface="\$1"
local config="\$2"
# set up the interface
local interface="$1"
local config="$2"
# set up the interface
}
\end{Verbatim}

View File

@ -61,9 +61,9 @@ The switch configuration is set by adding a \texttt{'switch'} config section.
Example:
\begin{Verbatim}
config switch eth0
option vlan0 "1 2 3 4 5*"
option vlan1 "0 5"
config switch "eth0"
option vlan0 "1 2 3 4 5*"
option vlan1 "0 5"
\end{Verbatim}
On Broadcom hardware the section name needs to be eth0, as the switch driver

View File

@ -3,16 +3,16 @@ The WiFi settings are configured in the file \texttt{/etc/config/wireless}
it should detect your card and create a sample configuration that looks like this:
\begin{Verbatim}
config wifi-device wl0
option type broadcom
option channel 5
config wifi-device "wl0"
option type "broadcom"
option channel "5"
config wifi-iface
option device wl0
option mode ap
option ssid OpenWrt
option hidden 0
option encryption none
option device "wl0"
option mode "ap"
option ssid "OpenWrt"
option hidden "0"
option encryption "none"
\end{Verbatim}
There are two types of config sections in this file. The '\texttt{wifi-device}' refers to
@ -22,81 +22,81 @@ of that (if supported by the driver).
\paragraph{Options for the \texttt{wifi-device}:}
\begin{itemize}
\item \texttt{type} \\
The driver to use for this interface.
\item \texttt{type} \\
The driver to use for this interface.
\item \texttt{country} \\
The country code used to determine the regulatory settings.
\item \texttt{country} \\
The country code used to determine the regulatory settings.
\item \texttt{channel} \\
The wifi channel (1-14, depending on your country setting).
\item \texttt{channel} \\
The wifi channel (1-14, depending on your country setting).
\item \texttt{maxassoc} \\
Maximum number of associated clients
\item \texttt{maxassoc} \\
Maximum number of associated clients
\end{itemize}
\paragraph{Options for the \texttt{wifi-iface}:}
\begin{itemize}
\item \texttt{mode} \\
Operating mode:
\item \texttt{mode} \\
Operating mode:
\begin{itemize}
\item \texttt{ap} \\
Access point mode
\begin{itemize}
\item \texttt{ap} \\
Access point mode
\item \texttt{sta} \\
Client mode
\item \texttt{sta} \\
Client mode
\item \texttt{adhoc} \\
Ad-Hoc mode
\item \texttt{adhoc} \\
Ad-Hoc mode
\item \texttt{wds} \\
WDS point-to-point link
\item \texttt{wds} \\
WDS point-to-point link
\end{itemize}
\item \texttt{network} \\
Selects the interface section from \texttt{/etc/config/network} to be
used with this interface
\end{itemize}
\item \texttt{network} \\
Selects the interface section from \texttt{/etc/config/network} to be
used with this interface
\item \texttt{encryption} \\
Encryption setting. Accepts the following values:
\item \texttt{encryption} \\
Encryption setting. Accepts the following values:
\begin{itemize}
\item \texttt{psk}, \texttt{psk2} \\
WPA(2) Pre-shared Key
\begin{itemize}
\item \texttt{psk}, \texttt{psk2} \\
WPA(2) Pre-shared Key
\item \texttt{wpa}, \texttt{wpa2} \\
WPA(2) RADIUS
\item \texttt{wpa}, \texttt{wpa2} \\
WPA(2) RADIUS
\end{itemize}
\end{itemize}
\item \texttt{key} (wpa and psk) \\
Either the WPA key (PSK mode) or the RADIUS shared secret (WPA RADIUS mode)
\item \texttt{key} (wpa and psk) \\
Either the WPA key (PSK mode) or the RADIUS shared secret (WPA RADIUS mode)
\item \texttt{server} (wpa) \\
The RADIUS server address
\item \texttt{server} (wpa) \\
The RADIUS server address
\item \texttt{port} (wpa) \\
The RADIUS server port
\item \texttt{port} (wpa) \\
The RADIUS server port
\end{itemize}
\paragraph{Limitations:}
\begin{itemize}
\item \textbf{Broadcom}: \\
Only the following mode combinations are supported:
\item \textbf{Broadcom}: \\
Only the following mode combinations are supported:
\begin{itemize}
\item 1x \texttt{sta}, 0-3x \texttt{ap}
\item 1-4x \texttt{ap}
\item 1x \texttt{adhoc}
\end{itemize}
\begin{itemize}
\item 1x \texttt{sta}, 0-3x \texttt{ap}
\item 1-4x \texttt{ap}
\item 1x \texttt{adhoc}
\end{itemize}
WDS links can only be used in pure AP mode and can't use WEP (except when sharing the
settings with the master interface, which is done automatically).
WDS links can only be used in pure AP mode and can't use WEP (except when sharing the
settings with the master interface, which is done automatically).
\end{itemize}