Hi !
We are facing problems to run properly a cryptographic device (USB Key Token) manufactured by Watchdata in BeagleBone board HW revision A6a and KERNEL: Linux beaglebone 3.2.28 #1 Tue Sep 11 13:08:30 CEST 2012 armv7l GNU/Linux
We received from the manufacturer Watchdata a driver source-code that is attached.
Unfortunately we did not find the kernel source of "Angstrom" distribution and had to compile the kernel on a PC and use a CROSS COMPILER.
We followed the steps as below but we have not succeeded and we are guessing that there is some problem related to BSP kernel chosen.
Steps used as the video found on YouTube: http://www.youtube.com/watch?v=HJ9nUqYMjqs
- PC with ubuntu 4.12 KERNEL used to generate the new kernel to the BeagleBone.
- git clone git://github.com/RobertCNelson/linux-dev.git
- git checkout origin/am33x-v3.2 -b am33x-v3.2
- git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
- gedit system.sh
CC=arm-linux-gnueabi
LINUX_GIT=~/beaglebone/linux-stable/
ZRELADDR=0x80008000
- ./build_kernel.sh
- insert the SD-Card to deploy kernel
- ./tools/install_image.sh
Then the kernel of the following became: Linux beaglebone 3.2.31-psp24 #1 Fri Oct 12 09:47:02 BRT 2012 armv7l GNU/Linux
We don't know if the above procedure is correct and what would be appropriate.
The same source code of driver (USB Token) works perfectly on PC but fails on BeagleBone.
1. This is a part captured via dmesg CORRECTLY generated by driver on a PC (see line below highlighted):
[10024.153387] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_read WD read retval=10
[10024.159500] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_write 6F 07 00 00 00 00 00 00 00 00 00 A4 00 00 02 00 60
[10024.160321] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c: wrote 7
[10024.160324] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_write WD write bytes_written=7
[10024.160330] linha:366
[10024.160332] linha:373
[10024.160334] linha:384
[10024.160336] linha:396
[10024.162334] Read return:0, count: 12, buff: 80 02 00 00 00 00 00 00 00 00 90 00
[10024.162348] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_read retval=0,need_len=2048
2. Log in BeagleBone WITH ERROR.
Note below the presence of a byte "00" at the end of the buffer received from the USB:
10024.153387] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_read WD read retval=10
[10024.159500] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_write 6F 07 00 00 00 00 00 00 00 00 00 A4 00 00 02 00 60
[10024.160321] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c: wrote 7
[10024.160324] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_write WD write bytes_written=7
[10024.160330] linha:366
[10024.160332] linha:373
[10024.160334] linha:384
[10024.160336] linha:396
[10024.162334] Read return:0, count: 12, buff: 80 02 00 00 00 00 00 00 00 00 90 00 00
[10024.162348] /var/lib/dkms/wdtoken/1.0.0/build/wdtoken.c WD_read retval=0,need_len=2048
We tried to correct this behavior (byte "00") directly in the source code that could be an error resulting from the programming. But the same code works perfectly on PC.
We have already done several attempts but it seems that the error is in the hardware layer (BSP). We look forward some news as soon as possible. Thanks
Regards,
Letice