How to getting SoCKit to act as a gadget

I’m trying to get the Arrow SoCKit to connect to my PC as a gadget. I’d like to get it to look like a gadget_zero but haven’t found any good instructions on how to do this. So for For starters, I followed these instructions in an attempt to get it to look like a mass storage device.

I’ve got 14.1 GSRD loaded on the board.

Things seemed like they were going okay. I did get an error when I wrote the partition table:

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Inappropriate ioctl for device

But when I plug the USB cable into my windows box, the kernel crashes with this output:

root@socfpga-cyclone5:~# dwc2 ffb40000.usb: new device is high-speed
Unable to handle kernel paging request at virtual address c08cb000
pgd = 80004000
[c08cb000] *pgd=3f816811, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1] SMP ARM
Modules linked in: g_mass_storage libcomposite gpio_altera
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.31-ltsi-02861-g801a40f #1
task: 806c98c0 ti: 806be000 task.ti: 806be000
PC is at __raw_readsl+0x40/0x100
LR is at s3c_hsotg_rx_data+0x88/0x118
pc : [<802846e8>]    lr : [<8034bb24>]    psr: 600b0193
sp : 806bfda8  ip : 00000000  fp : 806bfdd4
r10: 00000000  r9 : 806c63b8  r8 : 00000000
r7 : bf818000  r6 : c08cb000  r5 : bfb1c380  r4 : 00000008
r3 : 00000000  r2 : 00000000  r1 : bfb18ddc  r0 : c08cb000
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 3f2d404a  DAC: 00000015
Process swapper/0 (pid: 0, stack limit = 0x806be240)
Stack: (0x806bfda8 to 0x806c0000)
fda0:                   0000051f 80f48658 00000000 00000010 00000010 bf97e810

Any help is appreciated. If you can see what I’m doing wrong or point me to some documentation on how to do this.

Did you ever figure this out. I am getting the exact same problem

Nope. Our solution was to connect to our device via Ethernet then moved on to other projects and never got back to this.