Hi everyone,
I am having a lot of trouble installing linux.sys after having added some functionality.
In the end I would like to be able to create a module in colinux that directly opens a socket connection with a remote host.
I have succefully patched the kernel, added new symbols to handle the new functionality.
On the colinux side, I inspired my changes the way the call co_os_get_time() is implemented.
I have therefore created a new socket.c file in .../src/colinux/os/winnt/kernel/lowlevel which contains functions that handle windows socket calls.
Here is the beginning of this file with the example of the co_os_socket() call:
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <winsock2.h>
#include <colinux/common/common.h>
unsigned long co_os_socket()
        SOCKET sockfd;
        if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
          return -1;
        return (unsigned long) sockfd;
The Makefile in the same directory has been enhanced to include this new file and I have also modified the link command with:
$(BUILD_PATH)/lowlevel.o : $(LOCAL_OBJS)
        $(TOOL_LD_RELOC) \
to dynamically link with the ws2_32.dll.
Both colinux-daemon.exe and linux.sys are built properly.
Problem is that the newly produced linux.sys driver cannot be installed on the host system when performing the command "colinux-daemon.exe --install-driver" I have traced the problem down to the call to StartService() in the file .../src/colinux/os/winnt/user/daemon/driver.c. This call returns the error code 2: "File not found".
By comparing the "strings" results of linux.sys with and without the socket extension, I noticed that the file ws2_32.dll is present in the first one and not in the second. Looks like the ws2_32.dll cannot be loaded. Strange thing is that this file does indeed exist in c:\WINNT\system32. I tried to copy it in the same directory as colinux-daemon.exe but it did not fix the problem.
Any idea how to solve this?
I am using colinux 0.6.2-pre6 (snapshot 20041024), because I want it to run under 2.6.8
Best Regards,
Avec mes meilleures salutations
Gilbert Cavedon
Siemens Suisse SA, Business Innovation Center, BIC C31
Gilbert Cavedon
Avenue des Baumettes 5, CH-1020 Renens
Téléphone +41 (0) 585 568 423, Fax +41 (0) 585 548 205
mailto:gilbert.cavedon@siemens.com, Internet http://www.siemens.ch/