[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=216810]
[링크 : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_File_Storage]
[링크 : https://www.kernel.org/doc/Documentation/usb/mass-storage.txt]
[링크 : https://linux-sunxi.org/USB_Gadget/Mass_storage]
# modprobe g_mass_storage file=/dev/mmcblk0p1 removable=y # dmesg [ 41.197852] Mass Storage Function, version: 2009/09/11 [ 41.197867] LUN: removable file: (no medium) [ 41.197950] LUN: removable file: /dev/mmcblk0p1 [ 41.197956] Number of LUNs=1 [ 41.197965] Number of LUNs=1 [ 41.198085] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11 [ 41.198092] g_mass_storage gadget: userspace failed to provide iSerialNumber [ 41.198097] g_mass_storage gadget: g_mass_storage ready [ 41.504544] USB RESET [ 41.583840] usb 1-1.3: new high-speed USB device number 3 using dwc_otg [ 41.587991] USB RESET [ 41.685839] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage [ 41.686316] usb-storage 1-1.3:1.0: USB Mass Storage device detected [ 41.686873] usb-storage 1-1.3:1.0: Quirks match for vid 0525 pid a4a5: 10000 [ 41.686927] scsi0 : usb-storage 1-1.3:1.0 [ 42.684797] scsi 0:0:0:0: Direct-Access Linux File-Stor Gadget 0316 PQ: 0 ANSI: 2 [ 42.688020] sd 0:0:0:0: [sda] 262144 512-byte logical blocks: (134 MB/128 MiB) [ 42.688133] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process [ 42.696834] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 42.794589] sd 0:0:0:0: [sda] Write Protect is off [ 42.794603] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00 [ 42.794783] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process [ 42.904614] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 42.906940] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process [ 43.014729] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process [ 43.125146] sda: [ 43.127871] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process [ 43.235032] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process [ 43.344734] sd 0:0:0:0: [sda] Attached SCSI removable disk # lsmod Module Size Used by sg 31094 0 g_mass_storage 2587 0 usb_f_mass_storage 35010 2 g_mass_storage libcomposite 46311 2 usb_f_mass_storage,g_mass_storage ir_lirc_codec 4934 3 lirc_dev 10879 1 ir_lirc_codec ir_mce_kbd_decoder 3426 0 ir_rc6_decoder 2010 0 ir_sanyo_decoder 1657 0 ir_sony_decoder 1663 0 ir_jvc_decoder 1725 0 ir_rc5_decoder 1586 0 ir_nec_decoder 1789 0 meson_ir 3356 0 w1_gpio 3801 0 wire 28614 1 w1_gpio gxbb_wdt 3395 0 meson_gpiomem 4040 0 sch_fq_codel 7827 2 ip_tables 17220 0 ipv6 387317 18 autofs4 27592 2 # rmmod g_mass_storage root@odroid:~# lsmod Module Size Used by sg 31094 0 usb_f_mass_storage 35010 0 libcomposite 46311 1 usb_f_mass_storage ir_lirc_codec 4934 3 lirc_dev 10879 1 ir_lirc_codec ir_mce_kbd_decoder 3426 0 ir_rc6_decoder 2010 0 ir_sanyo_decoder 1657 0 ir_sony_decoder 1663 0 ir_jvc_decoder 1725 0 ir_rc5_decoder 1586 0 ir_nec_decoder 1789 0 meson_ir 3356 0 w1_gpio 3801 0 wire 28614 1 w1_gpio gxbb_wdt 3395 0 meson_gpiomem 4040 0 sch_fq_codel 7827 2 ip_tables 17220 0 ipv6 387317 18 autofs4 27592 2 # modprobe g_mass_storage file=/dev/mmcblk0p1 removable=y modprobe: ERROR: could not insert 'g_mass_storage': Device or resource busy |
[링크 : https://developer.ridgerun.com/wiki/index.php?title=How_to_use_mass_storage_gadget]
'embeded > odroid' 카테고리의 다른 글
odroid c2 gpio 와 wiringpi (0) | 2021.09.29 |
---|---|
g_mass_storage rpi - odroid c2 (0) | 2021.09.28 |
odroid c2 ubuntu 18.04, 20.04 kernel 버전 정보 (0) | 2021.09.27 |
odroid c2 usb otg, libcomposite usb hid (0) | 2021.09.26 |
odorid c2 usb otg gadget keyboard as hid (0) | 2021.09.23 |