[Openswan Users] linksys WRT54G openswan
Paul Wouters
paul at xelerance.com
Sat May 22 20:04:33 CEST 2004
On Sat, 22 May 2004, Ferdinand O. Tempel wrote:
> Well, ipsec setup start and stop returned to the commandline immediately
> without doing much. After diving into things a bit I noticed that it
> might be missing /var/run to dump its pid files in, so I created it. All
Ah right. make a symlink form /var/run to /tmp/run and one from /var/lock/
and /var/lock/subsys to /tmp.
> @OpenWrt:/usr/lib/ipsec# ipsec setup --status
> IPsec running
> but...
> orphaned Pluto running!
That is probably because of the lockfile /etc/init.d/S60ipsec failed to
create.
> @OpenWrt:/usr/libexec/ipsec# ./pluto
> (overflow)libc.so.6: aborted attempt to load ./pluto!
libc.so.6 ? pluto should not be requiring libc.so.6. It should only
need libc.so.0 / uclibc. As a temp workaround, you can try linking libc6
to libc0.
I'll re-install my APs later today and see if I can reproduce your errors.
> I think I hit a wall. Any good ideas? :-)
> Maybe compiling the openswan package against my own buildroot helps. Do
> you happen to have instructions on how to do that? (and a source copy of
> your openswan build tree might help too).
You will need openswan-2.1.2. Set the appropriate cross compile variables, such
as LD,CC,AR and RANLIB to the uclibc versions (in staging_dir). Edit Makefile.inc
and change these lines:
DESTDIR?=/usr/local/your/dest/dir
USERCOMPILE?=-O3 -L/usr/local/openwrt/buildroot/build_mipsel/root/lib/ -L/opt/gmp/lib -I/usr/local/openwrt/buildroot/build_mipsel/root/include -I/opt/gmp/include
CC=/usr/local/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-gcc
CFLAGS=-L/usr/local/openwrt/buildroot/build_mipsel/root/lib/ -L/opt/gmp/lib -I/usr/local/openwrt/buildroot/build_mipsel/root/include -I/opt/gmp/include
RANLIB=/usr/local/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ranlib
AR=/usr/local/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ar
LD=/usr/local/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ld
KLIPSCOMPILE=-O3
USE_LWRES?=false
USE_KERNEL26?=false
HAVE_THREADS?=true
USE_NAT_TRAVERSAL_TRANSPORT_MODE?=true
ARCH=mips
You will have to merge these CFLAGs with the ones in programs/pluto:
CFLAGS = -g -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \
-Wcast-qual -Wmissing-declarations -Wwrite-strings \
-Wstrict-prototypes -L/usr/local/openwrt/buildroot/build_mipsel/root/lib -L/opt/gmp/lib -I/usr/local/openwrt/buildroot/build_mipsel/root/include -I/opt/gmp/include # -Wundef
LDFLAGS= -L/usr/local/openwrt/buildroot/build_mipsel/root/lib -L/opt/gmp/lib
There are a few occurances of "gmp.h" you need to change to <gmp.h> in the pluto
directory.
You will also need mps compiled gmp on your system to link against. I had cross compiled
that with the CC from above, and installed it in /opt/gmp/lib. Compile with the option
--host=mipsel-linux-uclibc
Paul
More information about the Users
mailing list