Hi

The freemware kernel module won't compile on recent 2.3-kernels. It gives
the following error:
make[1]: Entering directory `/home/tmp2/freemware/kernel'
gcc -c -g -O2 -D__KERNEL__ -I/usr/src/linux/include -DCPU=586 -DMODULE -I./include 
-DHOST_LINUX host-linux.c
host-linux.c: In function `fmw_mmap':
host-linux.c:341: structure has no member named `vm_offset'
host-linux.c:342: structure has no member named `vm_offset'
host-linux.c:347: structure has no member named `vm_offset'
host-linux.c:348: structure has no member named `vm_offset'
host-linux.c:351: structure has no member named `vm_offset'
host-linux.c:356: structure has no member named `vm_offset'
make[1]: *** [host-linux.o] Error 1

To make it build without complaining, I replaced "vm_offset" with
"vm_pgoff", having seen a similar patch for the 3dfx device driver.

The freemware.o logged the following when loading (my linewrap): 
Dec  6 03:25:03 hex kernel: freemware: start: c8035a70 end: c803b014:
init: c8035a70 pages: 7 

The user-program seemed not to work as it said this:
oysteivi@hex:/tmp2/freemware/user$ ./user
Loading guest code: ../guest/virtcode/virtcode.elf
Allocating 0x1378 bytes of memory for reading file
ok, this is an ELF-Binary
Opening VM
error: open returned error

My patch is attached, but I believe it breaks the module for
2.2-kernels, and as the "user" program returned an error, so I wouldn't
commit it to CVS as it stands. Support for 2.3/4 should be a goal, as
freemware is not likely to be usable before the 2.4-kernel is released,
but currently support for 2.2 would seem more important.

Virtcode.elf segfaults when run under my linux-kernel, but I'm not sure if
that means anything at all.

Oystein
-- 
"It's pudding time, children!"

My little patch

Reply via email to