====== Ethernet on M2X ====== ===== Introduction ===== This document mainly introduces the usage of Ethernet on [[https://www.khadas.com/product-page/m2x-extension-board | M2X]] . Mainly about how to use it under Ubuntu. ===== Ubuntu ===== ==== System Configuration ==== Please make sure you use the latest image, if not please follow [[/products/sbc/common/configurations/upgrade-system|Upgrade The System]] to upgrade your system. ===== For 4.9 kernel ===== ==== Enable M2X Eth ==== Open ''/boot/env.txt'', add ''m2x-eth'' to overlay. ```shell $ sudo vim /boot/env.txt overlays=uart3 pwm_f i2c3 os08a10 --> overlays=uart3 pwm_f i2c3 os08a10 m2x-eth ``` ```shell $ sync ``` Reboot to effect. ===== For 5.15 kernel ===== ==== Enable M2X Eth ==== Open ''kvim*.dtb.overlay.env'', add ''m2x-eth'' to overlay,take VIM3 as an example. ```shell $ sudo vim /boot/dtb/amlogic/kvim3.dtb.overlay.env fdt_overlays=m2x-eth ``` ```shell $ sync ``` Reboot to effect. ==== Check ==== Get IP addresss. ```shell khadas@Khadas:~$ ifconfig eth0: flags=4163 mtu 1500 inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::c531:9c16:df20:94f9 prefixlen 64 scopeid 0x20 ether 02:42:82:4b:1d:2f txqueuelen 1000 (Ethernet) RX packets 113 bytes 13320 (13.3 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 122 bytes 10072 (10.0 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 14 ``` Go online! ```shell khadas@Khadas:~$ ping www.khadas.com PING td-balancer-sv5-61-96.wixdns.net (185.230.61.96) 56(84) bytes of data. 64 bytes from 185.230.61.96 (185.230.61.96): icmp_seq=1 ttl=241 time=183 ms 64 bytes from 185.230.61.96 (185.230.61.96): icmp_seq=2 ttl=241 time=164 ms 64 bytes from 185.230.61.96 (185.230.61.96): icmp_seq=3 ttl=241 time=165 ms ... ```