Kernel is kernel-source-2.4.17_ps2-26 used in BBN software downloadable
from http://www.sony.net/Products/Linux/Download/PlayStation_BB_Navigator.html
I added bridge and netfilter support as modules, so you can chose between
ipchains and iptables, you will still need userland programs, when I find
rpms I will upload them. I also added bluetooth modules from bluez-kernel-2.3.
Note that this is VERY old version of Bluez, but it is the last one wich
was not included in the kernel source.
To actually build external kernel modules you need to tweak kernel source
a bit. in /usr/src/linux/arch/ you need to softlink misc to mipsel, like
"ln -s mips mipsel" and edit Makefile in that directory:
so you need to change GCCFLAGS in /usr/src/linux/arch/mips/Makefile
from: -G 0 -mno-abicalls -fno-pic
to: -G0 -mno-abicalls -fno-pic -mlong-calls -msoft-float
Here is a patch:
--- Makefile Mon Jan 23 22:24:09 2006
+++ Makefile.fix Sun Jan 22 04:52:23 2006
@@ -37,7 +37,7 @@
# machines may also. Since BFD is incredibly buggy with respect to
# crossformat linking we rely on the elf2ecoff tool for format
conversion.
#
-GCCFLAGS := -G 0 -mno-abicalls -fno-pic
+GCCFLAGS := -G0 -mno-abicalls -fno-pic -mlong-calls -msoft-float
LINKFLAGS += -static
MODFLAGS += -mlong-calls
LD := $(LD) -G 0
Note: You need to change this because otherwise you will get Relocation
overflow of type 4, a known issue with mips little-endian architecture.
Lets try something, create hello.c
#---start---
#include "/usr/include/linux/module.h"
#if defined(MODULE_LICENSE)
MODULE_LICENSE("GPL");
#endif
int printk(const char *fmt, ...);
int init_module(void)
{
printk("<5>Hello, world\n");
return 0;
};
void cleanup_module(void) { printk("<5>Goodbye cruel world\n"); };
#---end---
first compile with: gcc -c -fno-pic -mno-abicalls -G0 -mips2 -D__KERNEL__ -DMODULE -DLINUX -Wall hello.
and then insmod it, I am pretty sure you will get an error. :)
then compile with: gcc -c -fno-pic -mno-abicalls -mlong-calls -G0 -msoft-float -mips2 -D__KERNEL__ -DMODULE -DLINUX -Wall hello.c
and you have a working external kernel module wich cryes into syslog :)
Ok now that we sorted compiling issues lets move on to setup:
If I have not mentiond it yet, you will need a CSR based usb bluetooth
dongle, preferably a little older one, as 2.0+EDR ones are not supported. :)
It is possible that Broadcom based would also work, but do not hold me for
it, I can only test and confirm it for CSR ones, as this is what I have
and use. I tested it with D-Link DBT-120 and DBT-122 and 3Com 3CREB96.
You need to add this into /etc/modules.conf
alias hci_usb
alias usb-controller usb-uhci
alias net-pf-31 bluez
alias bt-proto-0 l2cap
alias bt-proto-2 sco
alias bt-proto-3 rfcomm
alias bt-proto-4 bnep
Or preferably load them in some rc script as hotplug is not yet available. :)
The modules you need are usb-uhci for usb, hci_usb for host controller
interface to usb bluetooth dongle and bluez for core functionaloty, then
l2cap for transport and higher protocols as rfcomm for serial services and
bnep for pan/dun profiles, sco is for audio and I doubt it will find
usefullness in that particular setup.
You will also need to install userland bluez-*.rpm packages. Libs provide
libs, utils provide utils :) and sdp provides sdp deamon and client,
pan provides pan service and client. You will need bridge utils if you
plan to create a bridging setup, that would be GN (Group Network), if you
plan to create a NAP (Network Access Point) then simple forwarding with
firewall rule and turned on forwarding is enough. More on that setups will
follow shortly, just bare with me. :)