OpenWrt Forum Archive

Topic: compiling openwrt

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

Hi, I'm trying to compile an openwrt firmware with the buildroots that are specified in the openwrt home page, but without luck.
I have already downloaded the linksys sources version 2.02.7 and put them into the sources/dl directory. Also I modified the /make/openwrt.mk to indicate that version of linksys tarball.
When I do "make" the patches can't be applied.
-openwrt-wrt54g-router.patch fails in the src/router/nvram/nvram_linux.c file.
-openwrt-wrt54g-netfilter.patch fails in the src/linux/linux.stock/net/ipv6/mcast.c file.

I didn't continue trying to solve the problems because I imagine there are a lots of errors. So I ask for help. I have the wrt54g v1.1 and the linksys sources wrt54g.2.02.7.tgz.
If somebody can help me I will thanks a lot.

  Marcos

Does anybody have a solution to my problem?

Does anybody have a solution to my problem?

Hello!

I thing I have the same problem. I use the version
from cvs.
I got the following output:

patching file release/src/router/nvram/nvram_linux.c
Hunk #1 FAILED at 27.
Hunk #2 FAILED at 184.
Hunk #3 FAILED at 216.
Hunk #4 succeeded at 184 with fuzz 2 (offset -105 lines).
Hunk #5 FAILED at 231.
4 out of 5 hunks FAILED -- saving rejects to file release/src/router/nvram/nvram_linux.c.rej
Patch failed!  Please fix /home/michael/Software/Linksys/openwrt/buildroot/sources/openwrt-wrt54g-router.patch!
make: *** [/home/michael/Software/Linksys/openwrt/buildroot/build_mipsel/WRT54G/.prepared] Error 1

Could anybody help me?

Thanks in advance

cheers

Michael

I think that the patches were made for the Linksys source wrt54gs.2.07.1.tgz and I have the ver. wrt54gv2_2.00.8.tgz. That's why I got errors in the patching process. I solved this probles patching "by hand" the files that that the patch specified. In fact I just only apllied the openwrt-linux-patch to make the openwrt partition work. So I made my own firmware based in openwrt to have a read-write partition. That was what I looked for.

Hi
Are the patches only made for wrt54gs?
How can I change this. I red on the homepage:

The openwrt-g-code.bin is for the WRT54G, openwrt-gs-code.bin is for the WRT54GS (speedbooster).

It seems to be that in the "Getting started description"
the installation procedure is not completely described.
I changed some values in make/openwrt.mk:

WRT54G_SOURCE=wrt54g.2.02.7.tgz
WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.7
WRT54G_DIR=$(BUILD_DIR)/WRT54G
#WRT54G_DIR=$(BUILD_DIR)/WRT54GS

Maybe I have change other configuration files to get openwrt
up and running. I already try to patch the files by hand, but
after that other patches went wrong.

Please help me !


thanks

Michael

I get stuck here:

Applying /usr/src/openwrt/buildroot/sources/uClibc-sigaction.patch using plaintext:
patching file libc/sysdeps/linux/mips/Makefile
Hunk #1 FAILED at 28.
1 out of 1 hunk FAILED -- saving rejects to file libc/sysdeps/linux/mips/Makefile.rej
Patch failed!  Please fix /usr/src/openwrt/buildroot/sources/uClibc-sigaction.patch!
make: *** [/usr/src/openwrt/buildroot/build_mipsel/uClibc/.unpacked] Error 1

This is after I got this error message:

wget --passive-ftp -P /usr/src/openwrt/buildroot/sources/dl http://www.uclibc.org/downloads/snapshots/uClibc-20040807.tar.bz2
--20:16:47--  http://www.uclibc.org/downloads/snapshots/uClibc-20040807.tar.bz2
           => `/usr/src/openwrt/buildroot/sources/dl/uClibc-20040807.tar.bz2'
Resolving www.uclibc.org... 166.70.99.138, 166.70.154.59
Connecting to www.uclibc.org[166.70.99.138]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
20:16:48 ERROR 404: Not Found.

make: *** [/usr/src/openwrt/buildroot/sources/dl/uClibc-20040807.tar.bz2] Error 1

I edited buildroot/make/uclibc.mk to get it's snapshot like so:

#ifneq ($(strip $(USE_UCLIBC_SNAPSHOT)),)
# Be aware that this changes daily....
#UCLIBC_DIR:=$(BUILD_DIR)/uClibc
#UCLIBC_SOURCE:=uClibc-$(strip $(USE_UCLIBC_SNAPSHOT)).tar.bz2
#UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
#else
#UCLIBC_DIR:=$(BUILD_DIR)/uClibc-0.9.26
#UCLIBC_SOURCE:=uClibc-0.9.26.tar.bz2
#UCLIBC_SITE:=http://www.uclibc.org/downloads
#endif
UCLIBC_DIR:=$(BUILD_DIR)/uClibc
UCLIBC_SOURCE:=uClibc-snapshot.tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots

On the whole I'm finding the make procedure for compiling OpenWRT VERY VERY VERY frustrating at this point.  It seems that when I fix one thing, another problem pops up - is there someplace I can look to find out a complete list of which tarballs I should download and where I should save or untar them to?  I'm quite sick and tired of having to guess at fixes for compilation errors.  I tried using CVS and that doesn't seem to work either.

tradeoff we get to have the newest packages :-(

Because it uses links from other packages and many are also 'latest' experimental ones, it will continue to break like this.

Hopefully, it will stablize to 'released' version of packages and that upstreams don't remove them at will.

to compile cvs

1. update the main Makefile (the one at the root level of the buildroot) so that SNAPSHOT is defined as something recent.  i just used 091304 and it compiled with no problem.

2. comment out this line from make/uclibc.mk

$(SOURCE_DIR)/patch-kernel.sh $(UCLIBC_DIR) $(SOURCE_DIR) uClibc-sigaction.patch

Thank you very much Sam, I did that and it worked like a treat.  Now to get on with some real dev work. smile

The discussion might have continued from here.