LS1043A lsdk2108 调试记录

LS1043A lsdk2108  ubuntu20.04配置开机启动:

把配置写入ramdisk_fs只把需要执行的代码放在/etc/profile的文件末尾,即可实现开机自启动 

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
cd /
echo "123" > 1.txt

 网口顺序及名称修改配置文件:

root@localhost:/# cat /etc/udev/rules.d/72-fsl-dpaa-persistent-networking.rules
# Rules for handling naming the DPAA FMan ethernet ports in a consistent way
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae0000", NAME="eth0"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae2000", NAME="eth1"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae4000", NAME="eth2"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae6000", NAME="eth3"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1ae8000", NAME="eth4"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1aea000", NAME="eth5"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1af0000", NAME="eth6"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="1af2000", NAME="eth7"

# Rename macless0 to "macless0"
SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0"

配置网络:

root@localhost:/# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# The primary network interface 
auto eth0 
iface eth0 inet static 
address 192.168.0.188 
gateway 192.168.0.1 
netmask 255.255.255.0

配置DNS:(此方法重启失效)

root@localhost:/# cat /etc/resolv.conf 
# This file is managed by man:systemd-resolved(8). Do not edit.

# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 192.168.0.1
options edns0 trust-ad

resolv.conf 现在归systemd管,需要修改/etc/systemd/resolved.conf 文件

root@localhost:/# cat /etc/systemd/resolved.conf 
#  This file is part of systemd.
# See resolved.conf(5) for details

[Resolve]
DNS=192.168.0.1
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=no-negative
#DNSStubListener=yes
#ReadEtcHosts=yes

然后重启服务

systemctl restart systemd-resolved.service

查看结果:

root@localhost:/# systemd-resolve --status
Global
       LLMNR setting: no                  
MulticastDNS setting: no                  
  DNSOverTLS setting: no                  
      DNSSEC setting: no                  
    DNSSEC supported: no                  
         DNS Servers: 192.168.0.1         
          DNSSEC NTA: 10.in-addr.arpa     
                      16.172.in-addr.arpa 
                      168.192.in-addr.arpa

重启网络:

root@localhost:/# /etc/init.d/networking restart
Restarting networking (via systemctl): networking.service.

安装I2C报错

error while loading shared libraries: libi2c.so.0: cannot open shared object file: No such file or directory

将i2c-tools-4.0/lib/libi2c.so.0.1.1复制到/usr/lib/下, 重命名为libi2c.so.0, 并修改权限为777:

sudo cp lib/libi2c.so.0.1.1 /usr/lib/libi2c.so.0

sudo chmod 777 /usr/lib/libi2c.so.0

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值