Changes

Jump to: navigation, search

Embedded Linux tips and tricks

1,569 bytes added, 10:56, 14 March 2022
Configuring the network subsystem
Disable the Connection Manager (ConnMan) sevice to prevent conflict issues:
<pre class="board-terminal">
root@orca:~# systemctl disable connman.service
root@orca:~# systemctl stop connman.service
[ 5809.162942] imx-dwmac 30bf0000.ethernet eth1: Link is Down
root@orca:~# systemctl status connman.service
* connman.service - Connection service
Loaded: loaded (/lib/systemd/system/connman.service; disabled; vendor preset: enabled)
Active: inactive (dead)
</pre>
Create the configuration file for the network interface of interest (<code>eth1</code> in this case). In the example):, the file was <code>/etc/systemd/network/20-eth0.network</code>
<pre class="board-terminal">
[Match]
Name=eth1
 
# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot
 
[Network]
Address=192.168.0.163/24
Gateway=192.168.0.254
DNS=192.168.0.1
</pre>
Start (or restart) <code>systemd-networkd</code> and <code>systemd-resolved</code>:
<pre class="board-terminal">
root@orca:~# systemctl restart systemd-networkd
root@orca:~# [ 5867.637252] imx-dwmac 30bf0000.ethernet eth1: PHY [stmmac-1:07] driver [Microchip KSZ9131 Gigabit PHY]
[ 5867.661532] imx-dwmac 30bf0000.ethernet eth1: No Safety Features support found
[ 5867.668779] imx-dwmac 30bf0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[ 5867.677316] imx-dwmac 30bf0000.ethernet eth1: registered PTP clock
[ 5867.683639] imx-dwmac 30bf0000.ethernet eth1: configuring for phy/rgmii-id link mode
[ 5867.692915] 8021q: adding VLAN 0 to HW filter on device eth1
[ 5867.704764] Micrel KSZ8081 or KSZ8091 30be0000.ethernet-1:03: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=30be0000.ethernet-1:03, irq=POLL)
[ 5871.775856] imx-dwmac 30bf0000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 5871.784156] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
root@orca:~# systemctl restart systemd-resolved
</pre>
Dec 15 21:34:32 orca systemd[1]: Started Network Name Resolution.
</pre>
 
===Configuring <code>apt</code>===
Edit the file <code>/etc/apt/apt.conf</code> like this:
4,650
edits

Navigation menu