Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

OpenCL Work Flow on Sockit: system hangs when I do "source ./init_opencl.sh"

Hi,

I just got the OpenCL BSP for Sockit and tried to test the OpenCL work flow on this board.

After I setup the environment parameters on my PC, I can get "aoc --list-boards" output "sockit".

But when I burned the img to my sd card and try to do "source ./init_opencl.sh", the system hangs there, I cannot stop it via ctrl+c also, no response at all.

I checked the init_opencl.sh file and runned the commands one by one, it seems "insmod $AOCL_BOARD_PACKAGE_ROOT/driver/aclsoc_drv.ko" caused this.

I tried to recompile the linux kernel and linux device driver myself using "socfpga-3.13-rel14.0 git files. I followed the steps in this file "http://www.altera.com/literature/hb/opencl-sdk/ug_aocl_c5soc_devkit_platform.pdf". After the recompile, I copied zImage and regenerated aclsoc_drv.ko to my sd card.

Now if i run "insmod aclsoc_drv.ko", the system hangs up again, the same as before.

But if i try to insmod the old aclsoc_drv.ko file, the console says:

aclsoc_drv: version magic '3.13.0-00298-g3c7cbb9-dirty SMP mod_unload ARMv7 p2v8' should be '3.13.0-00298-g3c7cbb9'

Error: could not insert module aclsoc_drv.ko: Invalid module format.

This means i generated the matched version kernel zImage and device driver.

But still, what should i do then? Any ideas or comment?

Or did i miss something?

Thanks

Qin

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It proves I set the wrong FPGA configuration mode, after i change it to 01010, it works.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    First, thank you a lot for the post.

    Actually, I'm trying to run OpenCL on an Arrow SoCkit. But I still can't make it work.

    Using this package http://mail.terasic.com.cn/~wyzhou/sockit.zip. I followed the read-me file steps. Everything was okay until I wanted to execute "source ./init_opencl.sh". And here, the system hangs as you explained.

    The point is that the driver "aclsoc_drv.ko" does not exist in the package. Trying to solve it, I did the following steps:

    1) I recompiled the linux kernel and copied the zImage to the FAT32 partition. But when i do like this the boot hangs at zImage learning !!

    But, It worked with an other package that I used for the remaing steps,(grsd;http://rocketboards.org/foswiki/documentation/arrowsockitevaluationboardlinuxgettingstarted#configuring_the_board).

    2) After that, I recoompiled the driver using the linux_socfpga source files without any problem

    (I followed the instructions in the file http://www.altera.com/literature/hb/opencl-sdk/ug_aocl_c5soc_devkit_platform.pdf)

    3) I copied the OpenCl ncessary files from the sockit.zip package to the SD card (opencl_arm32_rtl, init_opencl.sh, hello_world,...)

    the "aclsoc_drv.ko" file is now present.

    3) Finally, when applying the command "source ./init_opencl.sh", it hangs again.

    Could you please tell me if I missed something and I will be thankfull if you could explain in detail what you did to get it work.

    Best regards,