UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 61920

Zynq-7000 - Errors when running PS USB Peripheral Driver Examples in (Xilinx Answer 58277)

Description

I am following the steps in (Xilinx Answer 58277) to run PS USB Peripheral Driver Examples in OSL 2014.2.
 
However, I am receiving the following errors:
 
root@zynq:/mnt# insmod g_mass_storage.ko file=/tmp/my_file
g_mass_storage: Unknown symbol fsg_common_set_ops (err 0)
g_mass_storage: Unknown symbol fsg_common_set_sysfs (err 0)
g_mass_storage: Unknown symbol fsg_common_run_thread (err 0)
g_mass_storage: Unknown symbol fsg_common_free_luns (err 0)
g_mass_storage: Unknown symbol fsg_common_create_luns (err 0)
g_mass_storage: Unknown symbol fsg_common_set_cdev (err 0)
g_mass_storage: Unknown symbol fsg_common_free_buffers (err 0)
g_mass_storage: Unknown symbol fsg_common_set_nluns (err 0)
g_mass_storage: Unknown symbol fsg_common_remove_luns (err 0)
g_mass_storage: Unknown symbol fsg_common_set_inquiry_string (err 0)
g_mass_storage: Unknown symbol fsg_common_set_num_buffers (err 0)
g_mass_storage: Unknown symbol fsg_config_from_params (err 0)
insmod: can't insert 'g_mass_storage.ko': unknown symbol in module, or unknown parameter
 
 
 

Solution

The example in (Xilinx Answer 58277) was running on an older kernel version.

For later branch kernels, (for example xilinx-v2014.2) some .ko files should be inserted first.

Refer to below wiki link for more information on the Zynq Linux USB Device Driver.

http://www.wiki.xilinx.com/Zynq+Linux+USB+Device+Driver

 

Below are the required commands for the USB examples for mass storage and Ethernet in OSL 2014.2.

Mass storage:

insmod configfs.ko

insmod libcomposite.ko
insmod usb_f_mass_storage.ko
dd if=/dev/zero of=/tmp/my_file bs=1024 count=4096
insmod /mnt/g_mass_storage.ko file=/tmp/my_file
 
Ethernet:
 
insmod configfs.ko

insmod libcomposite.ko
insmod u_ether.ko
insmod usb_f_ss_lb.ko
insmod usb_f_ecm.ko
insmod usb_f_ecm_subset.ko
insmod usb_f_eem.ko
insmod usb_f_rndis.ko
insmod g_ether.ko

Linked Answer Records

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
58277 Zynq-7000 PS USB Peripheral Driver Examples - Mass Storage and Ethernet N/A N/A
AR# 61920
Date Created 09/03/2014
Last Updated 10/22/2014
Status Active
Type General Article
Devices
  • SoC