How to get USB OTG port to work in Device mode?

No, that’s too late - that’s when it’s building the rootfs. It’s finished the kernel by then

ok, I thought so, can you tell me the line which comes when I need to stop the build ?
atleast how much time it takes before that comes, the avg. build time for me is 1 hour

If you’ve built it once then just modify the files now and rebuild. The only reason to start it is to allow the script to get Linux download for you rather than doing it by hand

Ok, I will try again

this is what is there in my log reg. the drivers

drivers/amlogic/usb/dwc_otg/310/dwc_otg_hcd.o
CC drivers/amlogic/usb/dwc_otg/310/dwc_otg_hcd_linux.o
CC sound/soc/soc-dapm.o
CC drivers/amlogic/usb/dwc_otg/310/dwc_otg_hcd_intr.o
CC drivers/amlogic/usb/dwc_otg/310/dwc_otg_hcd_queue.o
CC drivers/amlogic/usb/dwc_otg/310/dwc_otg_hcd_ddma.o
CC sound/soc/soc-jack.o
CC drivers/amlogic/usb/dwc_otg/310/dwc_otg_adp.o
CC sound/soc/soc-cache.o
CC drivers/amlogic/usb/dwc_otg/310/common_port/dwc_common_linux.o
CC sound/soc/soc-utils.o
LD drivers/amlogic/usb/dwc_otg/310/dwc_otg.o
CC sound/soc/soc-pcm.o
LD drivers/amlogic/usb/dwc_otg/310/built-in.o
CC drivers/amlogic/usb/phy/usbphy.o
CC drivers/amlogic/usb/phy/phy-aml-usb.o
CC drivers/amlogic/usb/phy/phy-aml-usb2.o
CC sound/soc/soc-io.o
CC drivers/amlogic/usb/phy/phy-aml-usb3.o
CC sound/soc/soc-devres.o
CC drivers/amlogic/usb/phy/phy-aml-new-usb.o
CC drivers/amlogic/usb/phy/phy-aml-new-usb2.o
CC sound/soc/soc-ops.o
CC drivers/amlogic/usb/phy/phy-aml-new-usb3.o
LD sound/soc/adi/built-in.o
LD sound/soc/amd/built-in.o
CC sound/soc/amlogic/auge/audio_controller.o
CC drivers/amlogic/usb/phy/phy-aml-new-usb-v2.o
CC sound/soc/amlogic/auge/audio_io.o
CC sound/soc/amlogic/auge/audio_clks.o
CC drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.o
CC sound/soc/amlogic/auge/axg,clocks.o
CC sound/soc/amlogic/auge/g12a,clocks.o
CC drivers/amlogic/usb/phy/phy-aml-new-usb3-v2.o
CC sound/soc/amlogic/auge/tl1,clocks.o
CC sound/soc/amlogic/auge/sm1,clocks.o
LD drivers/amlogic/usb/phy/built-in.o
LD drivers/amlogic/usb/built-in.o

USB-OTG

works fine with mainline kernel only for VIM3 VIM3L

VIM1 VIM2 - still need a patch https://github.com/hyphop/khadas-linux-kernel/blob/master/patches/linux-5.4.5/0010-vim1-vim2-add-usb-otg-mode1.patch

im not sure about latest situation but think its same as every time

SOME ADDITIONAL INFO : krescue use mainline kernel + some patches => and use USB-OTG for network + storage -> to user HOST

u can check krescue kernel config + dtb // https://github.com/hyphop/khadas-linux-kernel/releases/tag/krescue_last

or check how its works inside krescue

so it works out of the box ?
we need it to appear as a RNDIS device on the computer so that we can SSH it,

yes its was always in krescue !!! for VIM1 VIM2 VIM3 VIM3L

master@peace:~$ ifconfig usb0 | grep inet
master@peace:~$ route -n | grep usb
172.22.1.0      0.0.0.0         255.255.255.0   U     101    0        0 usb0
master@peace:~$ ssh root@172.22.1.1 -p 22


BusyBox v1.28.4 () built-in shell (ash)

 OpenWrt 18.06.3, r7798-97ae9e0ccb

     __ _____  Khadas ## hyphop ## 
    / //_/ _ \___ ___ ______ _____ 
   / ,< / , _/ -_|_-</ __/ // / -_)
  /_/|_/_/|_|\__/___/\__/\_,_/\__/ 
                                   
 extreme tiny and fast rescue system

BUILD: Tue May 26 08:39:33 UTC 2020

[i] POST_CONFIG: 

=== WARNING! =====================================
There is no root password defined on this device!
Use the passwd command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------

root@Krescue:~# 

1 Like

Hmm, i just finished writing my image on a SD card i will see if it works now.

Nope still not working, i don’t understand what’s going on with it, must be some problem

@hyphop the white led is blinking, does that mean it is successful to boot ?

You will need a DHCP server to give it an IP address or a static one?

what, I don’t know

where is usb0, could you explain this step a little more,

I will upload my image if you can please test it for me,

Is it emmc or SD card based? Don’t have any SD cards spare here if it’s as based sorry. Also - you made it private so cant see it

If it’s emmc I will have a look.

If it’s as based then when it boots up - just try running the script and see what the output from there is

Its SD card based, sorry my fault,
ok I tried to pinpoint anything that went wrong,
and I need to ask because it is has a different name in the Github links,
do I need to modify kvim3_linux.dts or kvim_linux.dts

Ok I think I got it working, in my device manager I get generic EEM adapter in the network adapters

its the kvim3_linux.dts

am getting some error in the windows side, it is saying Error for the device, also blinking stopped for it

…and it starts blinking again