树莓派4b,安装ubuntu 20.04 + raspi-config,出现dtparam no found 的根治办法

背景:raspi os 的更新比较慢,使用ros不方便,于是想到用ubuntu20.04 server + raspi-config尝试

1. 关于dtparam 这里有比较详细的介绍

docs/0012_dtparam_dtoverlay_DTS动态设备树.md · LowLevelOfLogic/RaspberryPi - Gitee.com

2. 根本问题是缺少dtparm相关的程序

直接 git clone https://github.com/raspberrypi/userland

 然后 ./buildme 就可以

然后会在 /opt/vc 下发现install的结果,也能在/opt/vc/bin下看到dtparam

3. 让sudo下dtparam能找到

sudo chmod +w /etc/sudoers

sudo vim /etc/sudoers

修改 secure_path ,增加 /opt/vc/bin

Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/vc/bin"

sudo chmod -w /etc/sudoers

4. 然后sudo raspi-config 正常

5. 用命令尝试也ok

sudo dtparam -v i2c_arm=on


DTOVERLAY[debug]: using platform 'bcm2711'
DTOVERLAY[debug]: overlay map loaded
run_cmd: which dtoverlay-pre >/dev/null 2>&1 && dtoverlay-pre
run_cmd: dtc -I fs -O dtb -o '/tmp/.dtoverlays/base.dtb' /proc/device-tree 1>/dev/null 2>&1
DTOVERLAY[debug]: loading file '/tmp/.dtoverlays/base.dtb'
DTOVERLAY[debug]: found override i2c_arm
DTOVERLAY[debug]:   override i2c_arm: string target 'status'
DTOVERLAY[debug]: wrote 162 bytes to '/tmp/.dtoverlays/2_dtparam.dtbo'
DTOVERLAY[debug]: wrote 174 bytes to '/sys/kernel/config/device-tree/overlays/2_dtparam/dtbo'
run_cmd: which dtoverlay-post >/dev/null 2>&1 && dtoverlay-post
 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值