[Klone-users] insmod or launching a script on the foxboard

smlabs smlabs at libero.it
Wed Sep 24 16:56:04 EDT 2008


Thanks Stefano.
You are right I compiled for the wrong CPU.

I tried to run "make cris-axis-linux-gnuuclibc" in the directoy of 
klapp-minimal-lib-1.1.0
but I received the following:
make: *** No rule to make target `cris-axis-linux-gnuuclib'.  Stop.

why?




before nake

Stefano Barbato ha scritto:
>> [root at axis /mnt/flash]711# ./kloned ./kloned: 1: Syntax error: "(" 
>> unexpected
>
> This usually happens on the FoxBoard when running applications 
> compiled for the wrong CPU (for example if you try to run x86 code on 
> the FOX) or applications compiled for the GNU libc when uClibc is in 
> use (or vice versa).
>
> See:    http://tech.groups.yahoo.com/group/foxboard/message/1358
>
> bye,
> s
>
>
>
>
> On 24/set/08, at 22:05, smlabs wrote:
>
>> Hello again,
>>
>> using the full path end checjking the ruturn status I achieved the 
>> same error:
>>
>> [root at axis /mnt/flash]711# ./kloned ./kloned: 1: Syntax error: "(" 
>> unexpected
>>
>>
>> maybe the "cdBluez-start" script  it doesn't right. In the following 
>> the script:
>>
>> #! /bin/sh
>> /sbin/insmod /lib/modules/2.4.31/kernel/net/bluetooth/bluetooth.ko
>> /sbin/insmod /lib/modules/2.4.31/kernel/net/bluetooth/l2cap.ko
>> /sbin/insmod /lib/modules/2.4.31/kernel/net/bluetooth/rfcomm/rfcomm.ko
>> /sbin/insmod /lib/modules/2.4.31/kernel/drivers/bluetooth/hci_usb.ko
>> hciconfig hci0 up name fox
>>
>> any suggestions?
>>
>>
>>
>> smlabs ha scritto:
>>> thanks thomas. I'll try.
>>> In your opinion to launch a bash script is better system or exec or 
>>> shell_exec?
>>>
>>> regards
>>>
>>> thomas fossati ha scritto:
>>>> Hi,
>>>>
>>>> On Sep 24, 2008, at 7:45 AM, smlabs wrote:
>>>>> In particular I downloaded the project  klapp-minimal-lib-1.1.0/ 
>>>>> (from klone wiki) and I added in my.c the following functions:
>>>>> /void functionBlue(void)
>>>>> {
>>>>>  system("cd /mnt/flash/");
>>>>>  system("./cdBluez-start");
>>>>>  return;
>>>>> }
>>>>
>>>> It'd be better to call system(3) once with the full path of the 
>>>> script, also check the return status of the syscall:
>>>>
>>>> int rc;
>>>> switch ((rc = system("/mnt/flash/cdBluez-start")))
>>>> {
>>>>    case -1:
>>>>        warn("waitpid or fork failure: %s", strerror(errno));
>>>>        break;
>>>>    case 0:  /* this should be ok */
>>>>        break;
>>>>    case 127:
>>>>        warn("shell execution failed");
>>>>        break;
>>>>    default:
>>>>        warn("cdBluez-start returned with status %d", rc);
>>>>        break;
>>>> }
>>>>
>>>> Otherwise, since system(3) spawns a different shell each time it is 
>>>> invoked, the first "cd /mnt/flash" is lost when the 
>>>> "./cdBluez-start" is called.
>>>>
>>>>> The compiling process doesn't give any errors.
>>>>> But when I launch kloned from the konsole on my foxboard I received:
>>>>> /[root at axis /mnt/flash]706# ./kloned
>>>>> ./kloned: 1: Syntax error: "(" unexpected
>>>>
>>>> the unexpected "(" is an error message coming from the bourne 
>>>> shell, it depends on your script.
>>>>
>>>> Hope it helps, t.
>>>>
>>>>
>>>> _______________________________________________
>>>> Klone-users mailing list
>>>> Klone-users at koanlogic.com
>>>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>>>
>>>
>>> _______________________________________________
>>> Klone-users mailing list
>>> Klone-users at koanlogic.com
>>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>>
>>
>> _______________________________________________
>> Klone-users mailing list
>> Klone-users at koanlogic.com
>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>
>
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>




More information about the klone-users mailing list