> I'm not able to make the Linux aaccli work under any recent FreeBSD.

heck, seems like I got it, you need _both_



  options COMPAT_LINUX

because the linking of aac_linux.o (or whatever it's called) into the
kernel binary is dependent on COMPAT_LINUX - see /usr/src/sys/conf/files.
I guess removing the compat_linux tag from /usr/src/sys/conf/files would
work too.

As a side effect (really the main effect) of COMPAT_LINUX, the linux ABI
apparently becomes statically linked to the kernel, as opposed to modular,
which is the default with the stock install.

I had to find out the hard way. Being a newbie, I use instrumentation
wherever I should really use the kernel debugger. This time, I put several
watches at interesting points in the code - to see where the aac driver
thinks the ioctl handler entry point is and to see if the Linux ABI init
routine finds it in its input chain of ioctl handlers.

        printf("FRR: registering linux ioctl handler at 0x%x\n",
               (unsigned int) h->func);

/* removed the 'static' keyword */
/*static struct linux_ioctl_handler aac_linux_handler =
struct linux_ioctl_handler aac_linux_handler = {aac_linux_ioctl,

#include <machine/../linux/linux.h>
extern struct linux_ioctl_handler aac_linux_handler;

        printf("FRR: the aac linux ioctl handler is at 0x%x\n",
                (unsigned int) aac_linux_handler.func);

Now the linker yelled upon linking - it complained about
"unknown symbol aac_linux_handler".
That's where it started to dawn on me that I should fumble
in the Makefiles and config data.

I got it working a few minutes later.
At least, it works in 4.8. I have yet to test it in different
FreeBSD versions. I have to leave that for tomorrow.

Frank Rysanek

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to