OpenWrt Forum Archive

Topic: [Howto] Getting the OpenWrt trunk source and build it

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

[Howto] Getting the OpenWrt trunk source and build it

Using subverion:

svn checkout https://svn.openwrt.org/openwrt/trunk/ ~/trunk/
cd ~/trunk/
./scripts/feeds update
./scripts/feeds install <pkg_name_1> <pkg_name_2> ... <pkg_name_N> # After installing the package (creates the symlink for you, you can select it in menuconfig)
make menuconfig # Choose your Target System/Subtarget/Target Profile and select packages/features
make world

To update the subversion repos do:

cd ~/trunk/
svn update
./scripts/feeds update

Using git:
At nbd.name there is a fast mirror. At least for me the checkout is faster then from openwrt.org.

git clone git://nbd.name/openwrt.git ~/trunk/
cd ~/trunk/
./scripts/feeds update # You have to change feeds.conf to use the git packages repo. See the patch below.
./scripts/feeds install <pkg_name_1> <pkg_name_2> ... <pkg_name_N> # After installing the package (creates the symlink for you, you can select it in menuconfig)
make menuconfig # Choose your Target System/Subtarget/Target Profile and select packages/features
make world

You also have to change feeds.conf to checkout the official packages repository from nbd.name like this:

diff --git a/feeds.conf b/feeds.conf
index b3103a2..a76c691 100644
--- a/feeds.conf
+++ b/feeds.conf
@@ -1,2 +1,3 @@
-src-svn packages https://svn.openwrt.org/openwrt/packages
+src-git packages git://nbd.name/packages.git
+# src-svn packages https://svn.openwrt.org/openwrt/packages
 src-svn xwrt svn://svn.berlios.de/xwrt/trunk/package

To update the git repo do:

cd ~/trunk/
git pull
./scripts/feeds update

(Last edited by forum2008 on 7 Apr 2008, 14:00)

Below is the usage of the feeds scripts.

./scripts/feeds

Usage: ./scripts/feeds <command> [options]

Commands:
        list [options]: List feeds and their content
        Options:
            -s :           List of feed names and their URL.
            -r <feedname>: List packages of specified feed.

        install [options] <package>: Install a package
        Options:
            -a :           Install all packages from all feeds or from the specified feed using the -p option.
            -p <feedname>: Prefer this feed when installing packages.
            -d <y|m|n>:    Set default for newly installed packages.

        search [options] <substring>: Search for a package
        Options:
            -r <feedname>: Only search in this feed

        uninstall -a|<package>: Uninstall a package
        Options:
            -a :           Uninstalls all packages.

        update -a|<feedname(s)>: Update packages and lists of feeds in feeds.conf .
        Options:
            -a :           Update all feeds listed within feeds.conf. Otherwise the spezified feeds will be updated.
            -i :           Recreate the index only. No feed update from repository is performed.

        clean:             Remove downloaded/generated files.

Hi, before built I just install Amule & Webif, but I cant see webif in menuconfig....why?

Try clearing out  tmp/ at the root of your OpenWRT checkout
then make menuconfig

elect86 wrote:

Hi, before built I just install Amule & Webif, but I cant see webif in menuconfig....why?

I've done the SVN version of this and it automagically downloads a 2.6.25 version of the kernel.  The kernel version I'm running (due to the binary download) is 2.6.22.  So, is there any way to make the build environment go out and get the 2.6.22 kernel tree instead that way I can keep the old (standard) image and just malign the parts that I need?

You should specify which chipset you are using. But on your target/linux/chipname/, there should be a makefile that tells you which build you are supposed to build.

For my case it was in kamikaze/target/linux/atheros/Makefile.

LINUX_VERSION:=2.6.23.17 <-- just change this to whatever is your rev is you probably need to know the subversion.

(Last edited by yoonix on 23 Jul 2008, 17:45)

The discussion might have continued from here.