[EMAIL PROTECTED] wrote:
> which linux kernel version do you use?
> Are you using "Wago-Linux-Dist V3"?
Out of curiosity, what is Wago-Linux-Dist V3 and how
does it relate to uclinux? Is there a changelog
(or even better a svn or git repository) somewhere?
I am using the BSP CD I got with the 750-860 plus a few
patches I got directly from Wago. However, I already found
a few wago-specific patches and I'd like to be able to track
the differences.
My reason is that I have to be able to generate applications
that are running (and are debuggable) in both the 750-860
and other devices, including the SkyEye emulator. Being
able to track the Wago patches to the uclinux tree
would help.
Another question: did you try to compile and use the kernel
using recent (4.2.1) compiler? I am running into difficulties
using 4.2.1 applications against the Wago-compiled
kernel (probably using some 3.3 gcc). Most probably
there was some ABI change and calling the syscalls with
many arguments (sendto) does not work.
An example:
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
int main(int argc, char **argv)
{
int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (sock < 0)
{
perror("Socket");
}
struct sockaddr_in sock_addr;
memset(&sock_addr, 0, sizeof(sock_addr));
sock_addr.sin_family = AF_INET;
sock_addr.sin_port = htons(61444);
sock_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
for (int i=0; i < 10; ++i)
{
int r = sendto(sock, (const char *) &i, 4, 0, (struct sockaddr
*)&sock_addr,
sizeof(sock_addr));
printf("."); fflush(stdout);
if (r < 0)
perror("sendto");
sleep(1);
}
}
This code only produces
sendto: Invalid argument.
The same code works without problems on SkyEye and 'real'
linux. I am able to work around this using sendmsg, where
I first assemble the arguments into a structure and give
it to the syscall, but it is annoying and I have no idea
what causes this.
Thanks
--
Stano
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev