Yocto on milk-v duo

When we can expect yocto buildsysrem for milk-v duo?

The duo support is under review.

2 Likes

Here are some enhancements too

Recipe for mainline kernel is included, based on the accepted patches documented here. (Except for the board reset and Ethernet driver)

2 Likes

Iā€™ve created an overlay for these enhancements and also instructions to build an image from scratch using OpenEmbedded/Yocto.

2 Likes

Hey! Just suscribed to thank you, nice repo, and you write killer documentation which is worth giving props!

cheers!

1 Like

Hi, I followed the instructions on the README and flashed my duo 64m. The led in fact starts blinking but I cannot manage to connect via ssh (using USB network) as I normally did before with the default images. Is there extra configuration I need to set it up ?

What ip address are you connecting to?

It should be 192.168.42.1. Check if you can ping that address.

Yes, I am using the default ip 192.168.42.1 , ping is also failing:

~/oe
 > zcat build/tmp-musl/deploy/images/milkv-duo/core-image-minimal-milkv-duo.rootfs.wic.gz | \
  sudo dd of=/dev/sdb bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
[sudo] password for marcos: 
230686720 bytes (231 MB, 220 MiB) copied, 17 s, 13.6 MB/s
58+1 records in
58+1 records out
245785600 bytes (246 MB, 234 MiB) copied, 18.1323 s, 13.6 MB/s
 ~/oe
 > ping 192.168.42.1
PING 192.168.42.1 (192.168.42.1) 56(84) bytes of data.
^C
--- 192.168.42.1 ping statistics ---
83 packets transmitted, 0 received, 100% packet loss, time 84002ms

I executed ping after the led started blinking on the board.

Please show the output of

ip addr

once the board has booted up.

Do you have access to the serial port?

 ~/oe
 > ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 08:97:98:79:8d:ea brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 10:63:c8:81:da:47 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.116/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp4s0
       valid_lft 42577sec preferred_lft 42577sec
    inet6 2001:4bc9:914:1e1a:ee3:9ba:8709:4d21/64 scope global temporary dynamic 
       valid_lft 258867sec preferred_lft 60147sec
    inet6 2001:4bc9:914:1e1a:f795:17c6:f563:cdfa/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 258867sec preferred_lft 60147sec
    inet6 fe80::691e:ce50:8851:ad1/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether aa:f6:35:23:71:54 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::412f:2dc0:cf4f:f8f/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The usb network appears but still canā€™t connect ssh or ping it.

The output when I use another image (from the usual SDK) which I can connect with ssh:

> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 08:97:98:79:8d:ea brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 10:63:c8:81:da:47 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.116/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp4s0
       valid_lft 41778sec preferred_lft 41778sec
    inet6 2001:4bc9:914:1e1a:ee3:9ba:8709:4d21/64 scope global temporary dynamic 
       valid_lft 258970sec preferred_lft 60250sec
    inet6 2001:4bc9:914:1e1a:f795:17c6:f563:cdfa/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 258970sec preferred_lft 60250sec
    inet6 fe80::691e:ce50:8851:ad1/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
6: enx6a50b7284ea5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 6a:50:b7:28:4e:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.16/24 brd 192.168.42.255 scope global dynamic noprefixroute enx6a50b7284ea5
       valid_lft 3576sec preferred_lft 3576sec
    inet6 fe80::81e1:be45:b0ce:798/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

In this case an ip address was asigned with the network, I donā€™t know why in the first case it doesnā€™t.

Unfortunately I donā€™t have the uart - usb adapter now to check the serial port.

Please show the output of dmesg and lsusb after the board is plugged in.

dmesg:

 ~/oe
 > sudo dmesg
[  493.512510] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[  493.644977] usb 1-2: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 5.10
[  493.644995] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  493.645003] usb 1-2: Product: RNDIS/Ethernet Gadget
[  493.645009] usb 1-2: Manufacturer: Linux 5.10.215 with 4340000.usb
[  493.744722] cdc_subset 1-2:1.0: probe with driver cdc_subset failed with error -22
[  493.746713] cdc_subset 1-2:1.1 usb0: register 'cdc_subset' at usb-0000:05:00.3-2, Linux Device, 26:d1:4e:79:7a:36
[  493.746861] usbcore: registered new interface driver cdc_subset
[  493.747332] cdc_ether 1-2:1.0: probe with driver cdc_ether failed with error -16
[  493.747440] usbcore: registered new interface driver cdc_ether

lsusb:

 > lsusb 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04ca:3016 Lite-On Technology Corp. 
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 006: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget
Bus 001 Device 002: ID 0408:a060 Quanta Computer, Inc. HD Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This is the output on the default image:

> sudo dmesg
[  918.069579] usb 1-5: new high-speed USB device number 8 using xhci_hcd
[  918.732569] usb 1-5: device descriptor read/64, error -71
[  918.966996] usb 1-5: New USB device found, idVendor=3346, idProduct=100c, bcdDevice= 5.10
[  918.967013] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  918.967020] usb 1-5: Product: NCM
[  918.967027] usb 1-5: Manufacturer: Cvitek
[  918.967033] usb 1-5: SerialNumber: 0123456789
[  919.087916] cdc_ncm 1-5:1.0: MAC-Address: a6:ac:93:0b:21:ad
[  919.088917] cdc_ncm 1-5:1.0 usb0: register 'cdc_ncm' at usb-0000:05:00.3-5, CDC NCM (NO ZLP), a6:ac:93:0b:21:ad
[  919.090145] usbcore: registered new interface driver cdc_ncm
[  919.090212] cdc_acm 1-5:1.2: ttyACM0: USB ACM device
[  919.090928] usbcore: registered new interface driver cdc_acm
[  919.090934] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[  919.105740] usbcore: registered new interface driver cdc_wdm
[  919.110143] usbcore: registered new interface driver cdc_mbim
[  919.131043] cdc_ncm 1-5:1.0 enxa6ac930b21ad: renamed from usb0
 > lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 3346:100c Cvitek NCM > lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 3346:100c Cvitek NCM
Bus 001 Device 004: ID 04ca:3016 Lite-On Technology Corp. 
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 0408:a060 Quanta Computer, Inc. HD Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 004: ID 04ca:3016 Lite-On Technology Corp. 
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 0408:a060 Quanta Computer, Inc. HD Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So I guess is something about my PC actually.

What OS are you using?
Hereā€™s the output on my machine:

dmesg:

[823886.132509] usb 1-2.2: new high-speed USB device number 102 using xhci_hcd
[823886.251295] usb 1-2.2: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 5.10
[823886.251308] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[823886.251314] usb 1-2.2: Product: RNDIS/Ethernet Gadget
[823886.251319] usb 1-2.2: Manufacturer: Linux 5.10.215 with 4340000.usb
[823886.322098] cdc_ether 1-2.2:1.0 usb0: register 'cdc_ether' at usb-0000:04:00.3-2.2, CDC Ethernet Device, be:5d:01:dc:98:81
[823886.349660] cdc_ether 1-2.2:1.0 enxbe5d01dc9881: renamed from usb0

lsusb:

Bus 001 Device 102: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

Since the device shows on lsusb, I think you just need to reconfigure the network interface.

1 Like

I am running PopOS on this machine itā€™s supposed to be based on ubuntu 22.04. I will change to ubuntu definitely to avoid this issues in the future.
Thks a lot for your help :sweat_smile:

Or it could be due to a usb cable issue :wink:

1 Like

It was an issue that it didnā€™t automatically assigned the IP to the interface (weird). To solve it I manually assigned it:

> sudo ip route add 192.168.42.0/24 dev enx4ed36c8a5a6c
> sudo ip addr add 192.168.42.100/24 dev enx4ed36c8a5a6c

Where enx4ed36c8a5a6c is the name of the interface showed in ip addr. After that I could connect normally with ssh.

Thks for the help !!

1 Like

Hello @kinsa Regarding Yocto for milkv : Is there any special configuration for milkv-duo 256 mega version ?

1 Like

You would likely need to modify these lines:

to accommodate the new ram size.

I havenā€™t tested this though, patches are welcome.

1 Like

Hello @kinsa , Thanks for feedback. :grinning:
I will test the patches as soon as possible.

1 Like