2008-03-29 00:05:10     sockets not working??

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-03-29 00:05:10     sockets not working??


Message: 53284    Hi

I installed the latest blackfin toolchain and uClibc rpms. I wrote a simple client code using sockets for the blackfin. The code compiled without any problems.

But when i run the code, perror gives me the following error:

Function not implemented.


And this is at the very first step of creating the scoket i.e. when calling the socket() function.


Am guessing that there is some linking error and/or I need to some settings after installing the toolchain rpms?


I compile the code using:

bfin-uclinux-gcc -Wl,-elf2flt client.c -o client.






2008-03-29 00:07:59     Re: sockets not working??

Mike Frysinger (UNITED STATES)

Message: 53285    you probably didnt update your kernel


please read the FAQ (Why do I need to use the same version of toolchain/kernel/uClibc/U-boot/uClinux-dist?):





2008-03-29 01:49:36     Re: sockets not working??


Message: 53293    After I compiled the new kernel and loaded it using uboot, the kernel starts. But after displaying the line:

"loading kernel at"

it displays garbage and halts. What is going wrong?




2008-03-29 02:05:02     Re: sockets not working??

Mike Frysinger (UNITED STATES)

Message: 53295    you're probably using the wrong baud rate.  verify that the baud rate you're using in u-boot is the same you're using in the kernel.  the default is 57600 in both places.


another option is you're trying to load a kernel for the wrong processor -- verify you've selected the right processor/board.


otherwise you can check the kernel log from u-boot:





2008-03-29 23:02:38     Re: sockets not working??


Message: 53331    baud rate was the problem. Am having other problems though.


When i try writing any file or when i say mkdir, it says the filesystem is read only. I tried searching through the configuration file but could not figure out where there is an option that i need to set for a read/write file system?

Also, although I had chosen many device drivers /dev does not seem to have them loaded.

Also, I want to enable the gpio device driver for certain ports. Where in the configuration file are the options?


Although I had chosen 0x1000 as the kernel load address in the configuration file (the option under processor options -> board customizations -> kernel load address for booting), it seems to be booting at a different address. Why is that? How should I correct it?






2008-03-29 23:17:16     Re: sockets not working??

Mike Frysinger (UNITED STATES)

Message: 53332    there is no option in any of the configuration files.  filesystem options are purely runtime.  you can either use the kernel command line to control the default root filesystem mount options (see linux-2.6.x/Documentation/kernel-parameters.txt), or you can just do things dynamically at runtime using `mount`.  this is how standard Linux systems work: they boot up with a read only root filesystem and then at runtime, remount it to be read write.


by default, /dev only respresents devices that are loaded and detected.  if you havent loaded the driver, then you dont get a device node.


the load address is not the same thing as the kernel entry point.  the load address is by default at 0x1000 but often times the entry point will be much higher.