On Sun, Jul 30, 2000 at 05:31:11PM +0200, Marcus Brinkmann wrote:
> On Sat, Jul 29, 2000 at 07:05:27PM +0200, Mark Kettenis wrote:
> > You'll probably need to provide alternatives for more (all) of the
> > functions in oskit-0.97.20000505/dev/x86/synch.c in the oskit-mach
> > synch.c.
>
> This would be osenv_intr_save_disable(), which is the only one not defined i
> oskit-mach?
Yow! It works.
Now there are two new problems, but this is when trying to link the kernel
binary, so we are really close!
i386-gnu-gcc -nostdlib -nostartfiles -r -o oskit-kernel.o \
-Wl,-\( kernel.o clib-routines.o -loskit_clientos -loskit_c -loskit_kern
-loskit_lmm -loskit_com -loskit_unsupp -loskit_dev -loskit_linux_dev -loskit_diskpart
-Wl,-\) -lgcc
i386-gnu-ld -Ttext 100000 -o kernel oskit-kernel.o /usr/i386-gnu/lib/oskit/crtn.o
oskit-kernel.o: In function `alloc_for_oskit':
oskit-kernel.o(.text+0x3a0f4): undefined reference to `ffs'
oskit-kernel.o: In function `picinit':
oskit-kernel.o(.text+0x50ba7): undefined reference to `cli'
make[1]: *** [kernel] Error 1
Where ffs and cli are functions called in oskit/osenv_mem.c and
i386/i386/pic.c respectively.
ffs is find first set bit in word, and prototyped in string.h. It is also
prototyped in oskit/freebsd/string.h, but only if neither _ANSI_SOURCE nor
_POSIX_SOURCE is defined. So how do we get this into the kernel?
cli is OSKIT_INLINE (extern __inline) and declared in oskit/x86/proc_reg.h,
which is already included by i386/i386/pic.c
picinit()
{
cli();
form_pic_mask();
/*
** 1a. Select current SPL.
*/
curr_ipl = SPLHI;
curr_pic_mask = pic_mask[SPLHI];
pic_set_irqmask(curr_pic_mask);
}
Note the strange formatting. But why isn't it correctly recognized as an
inline function? [I better don't ask if this should be osenv_intr_disable,
because I have no clue what the code does anyway).
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server
Marcus Brinkmann GNU http://www.gnu.org for public PGP Key
[EMAIL PROTECTED], [EMAIL PROTECTED] PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ [EMAIL PROTECTED]