OpenWRT Makefile

Jann Traschewski jann at gmx.de
Fri Nov 6 13:18:33 CET 2009


Ok, so far I think we need four separate packages for OpenWRT:
- bird
- birdc (depends libncurses/libreadline)
- bird6
- birdc6 (depends libncurses/libreadline)

They should be chooseable through "menuconfig". I don't know whether this is
possible using just one single Makefile?

>> Further I figured out how to handle the readline dependency.
> Probably ncurses have to be handled in the same way.

You can savely drop my line "PKG_BUILD_DEPENDS:=libreadline" from the
Makefile. I just checked out the buildroot again, put the birds Makefile
into the package/bird directory and did a new full compile run. It is just
important to have "DEPENDS:=+libncurses +libreadline" in the file... OpenWRT
will build the necessary libs before compiling bird. If you look in
menuconfig at the package bird there is a new line: "Selects:
PACKAGE_libreadline && PACKAGE_libncurses". Further you can look at the libs
and you can't unselect the needed libs anymore. E.g. libreadline has a line
with "Selected by: PACKAGE_gdb || PACKAGE_bird". I did have some problems
before because libreadline wasn't included on my old buildroot from Kamikaze
7.09. So I needed to compile it manually. Now I workt with 8.09.

> I think that bird without birdc is not really useful, but

Maybe an option would be starting birdc on the users local desktop and
connect it via tcpip to the router running bird? Yes, security needs to be
implemented...

> probably it might be useful to compile birdc without 
> libncurses and libreadline (or perhaps just without libreadline).

Do you want to link it statically? I did try this with libreadline:

libreadline linked into the binary:
root at OpenWrt:~# ls -alh /usr/sbin/birdc
-rwxr-xr-x    1 root     root       284.1k Oct 22 10:38 /usr/sbin/birdc

libreadline dynamically linked:
root at OpenWrt:~# ls -alh ./birdc
-rwxr-xr-x    1 root     root        21.1k Nov  4 18:42 ./birdc

root at OpenWrt:~# ls -ahl $(opkg files libreadline|tail -5)
lrwxrwxrwx    1 root     root           17 Nov  6 11:41
/usr/lib/libhistory.so.5 -> libhistory.so.5.2
-r-xr-xr-x    1 root     root        34.9k Jan 14  2009
/usr/lib/libhistory.so.5.2
lrwxrwxrwx    1 root     root           18 Nov  6 11:41
/usr/lib/libreadline.so.5 -> libreadline.so.5.2
-r-xr-xr-x    1 root     root       246.8k Jan 14  2009
/usr/lib/libreadline.so.5.2

You will save about 20k if you link it statically. I think it is better to
leave it dynamically linked.

Bye,
Jann


--
Jann Traschewski, Drosselstr.1, D-90513 Zirndorf, Germany
Tel.: +49-911-696971, Mobile: +49-170-1045937, E-Mail: jann at gmx.de
Ham: DG8NGN / DB0VOX, http://www.qsl.net/dg8ngn, ICQ UIN: 4130182 
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4358 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20091106/afe551a3/attachment-0001.bin>


More information about the Bird-users mailing list