Buildroot tiny rootfs has no boot folder for USB3.0 serial Gadget to be Configured LS1021a

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Buildroot tiny rootfs has no boot folder for USB3.0 serial Gadget to be Configured LS1021a

1,835 Views
jiye
Contributor V

Hi,

Recently I used

flex-builder -i mkrfs -r buildroot:tiny -a arm32    # generate arm32 little-endian rootfs as per qoriq_arm64_devel_defconfig

to generate a rootfs then after I use make ARCH=arm menuconfig to get every modules compiled

then I loaded into the linux but I found out that there is no /boot directory for me to configure the device tree file in order to make the usb3.0 works as serial gadget.

So once I loaded modprobe g_serial

it thrown me error [    0.200027] dwc3 3100000.usb3: Failed to get clk 'ref': -2

Can anyone help?

0 Kudos
Reply
6 Replies

1,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Elias Bitbaker,

Please run "flex-builder -i merge-component -a arm32" to merge kernel modules into target userland.

Would you please provide your console log of inserting these Kernel modules?

Thanks,

Yiping

0 Kudos
Reply

1,633 Views
jiye
Contributor V

(1) I tried your command then I got this

I do not know what this command use for if you can tell me a bit more

pastedImage_2.png

(2) this is my console log:

pastedImage_3.png

modprobe g_serial

pastedImage_4.png

pastedImage_5.png

if you see Failed to get clk ref:-2 because I need to change this in the ls1021atwr.dtb file?

pastedImage_6.png

but I do not have the /boot directory when I use flex-builder -i mkrfs -r buildroot:tiny -a arm32   I manually created the folder then copied and pasted the dtb file into it but it did not work

How to add modprobe g_serial upon start up since I do not have /etc/modules file

0 Kudos
Reply

1,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

It's impossible to use device (or Gadget) mode on LS1021ATWR, because there is a USB hub on this board.

0 Kudos
Reply

1,634 Views
jiye
Contributor V

i know but my main question is I do have a ls1021a stand alone processor, why this build root image does not have boot partition for me to configure the device tree files ?

0 Kudos
Reply

1,634 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following procedure

     Update kernel menuconfig

pastedImage_1.png

pastedImage_3.png

pastedImage_4.png

Device tree

Device Tree update, change property dr_mode’s data from “host” to “peripheral”, add property maximum-speed = “super-speed”; as below

pastedImage_5.png

Build whole Linux kernel, below KO will be compiled:

LD [M] drivers/usb/gadget/function/usb_f_acm.ko

LD [M] drivers/usb/gadget/function/u_serial.ko

LD [M] drivers/usb/gadget/function/usb_f_obex.ko

LD [M] drivers/usb/gadget/function/usb_f_serial.ko

LD [M] drivers/usb/gadget/legacy/g_serial.ko

Insmod ko on Layerscape board console

insmod libcomposite.ko

insmod u_serial.ko

insmod usb_f_acm.ko

insmod usb_f_obex.ko

insmod usb_f_serial.ko

insmod g_serial.ko

pastedImage_6.png

0 Kudos
Reply

1,634 Views
jiye
Contributor V

I found out that the build root rootfs is ubuntu based.

How can I change to debian based?

0 Kudos
Reply