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