This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X- Linix Support

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

  • Letice Kubert said:

    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.

    The instructions can be found by following the directions at http://beagleboard.org/project/angstrom. It is helpful to know that the on-going kernel development is happening at http://github.com/beagleboard/kernel.

    Future Angstrom releases will include the kernel sources within the image making it easy to create a kernel module built on the target.

    The following exact instructions worked for me: https://github.com/beagleboard/kernel/tree/6682025752d0b807119c1e363a0b1b9bfe2ab453.

    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.

    It is debatable, depending on your goals. If you want to get your code into the releases, it is suggested that you submit your patches into http://github.com/beagleboard/kernel using pull requests. They are maintained in a way that organizes them as files in directories and a script that applies them. This is seen as helpful by the maintainers.

    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

    To engage the most BeagleBone kernel developers, it is recommended to work against the 3.7 branch on http://github.com/beagleboard/kernel and use the discuss@beagleboard.org mailing list to report issues. In cases of errors in subsystems, it is recommended to copy the linux subsystem mailing lists.