Date: Thu, 2 Oct 2003 17:04:39 +0200 (CEST) From: rysanek@fccps.cz To: Scott Long <scott_long@btc.adaptec.com> Cc: Buki <dev@null.cz> Subject: Re: can't get the Linux aaccli to work under 4.8-RELEASE, 4.9-RC1, 5.1-RELEASE Message-ID: <Pine.LNX.4.33.0310021621020.3518-100000@usti.fccps.cz> In-Reply-To: <Pine.LNX.4.33.0310021025400.2527-100000@usti.fccps.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
> I'm not able to make the Linux aaccli work under any recent FreeBSD. heck, seems like I got it, you need _both_ options AAC_COMPAT_LINUX _and_ 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. compat/linux/linux_ioctl.c: =========================== linux_ioctl_register_handler() { ... printf("FRR: registering linux ioctl handler at 0x%x\n", (unsigned int) h->func); ... } dev/aac/aac_linux.c: ==================== /* removed the 'static' keyword */ /*static struct linux_ioctl_handler aac_linux_handler = {aac_linux_ioctl,*/ struct linux_ioctl_handler aac_linux_handler = {aac_linux_ioctl, ... dev/aac/aac_pci.c: ================== #include <machine/../linux/linux.h> extern struct linux_ioctl_handler aac_linux_handler; aac_pci_attach() { ... 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.33.0310021621020.3518-100000>