You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Yocto构建i.MX93添加DS1337驱动无报错但设备树未修改求助

问题:添加DS1337 RTC驱动后imx93.dtsi未被修改

背景

我是Yocto新手,已按照Variscite的指南(替换为langdale分支与imx-6.1.1-1.0.1.xml)成功构建i.MX93的Yocto镜像,构建命令如下:

$ mkdir -p ~/bin
$ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH
$ mkdir ~/var-fsl-yocto
$ cd ~/var-fsl-yocto
$ repo init -u https://github.com/varigit/variscite-bsp-platform.git -b langdale -m imx-6.1.1-1.0.1.xml
$ repo sync -j$(nproc)
$ cd ~/var-fsl-yocto
$ MACHINE=imx93-var-som DISTRO=fsl-imx-xwayland . var-setup-release.sh build_xwayland
$ cd ~/var-fsl-yocto
$ source setup-environment build_xwayland
$ bitbake fsl-image-gui

自定义层配置

现需添加DS1337 RTC驱动,我创建了新层var-fsl-yocto/sources/meta-test,包含以下文件:

layer.conf

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
            ${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-test"
BBFILE_PATTERN_meta-test = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-test = "6"

LAYERDEPENDS_meta-test = "core"
LAYERSERIES_COMPAT_meta-test = "kirkstone langdale"

ds1337.patch

--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi

@@ -293,17 +293,12 @@
                clock-names = "pclk", "fast_clk", "slow_clk";
                status = "disabled";
            };
-
-           lpi2c1: i2c@44340000 {
-               compatible = "fsl,imx93-lpi2c", "fsl,imx7ulp-lpi2c";
-               reg = <0x44340000 0x10000>;
-               interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
-               clocks = <&clk IMX93_CLK_LPI2C1_GATE>,
-                    <&clk IMX93_CLK_BUS_AON>;
-               clock-names = "per", "ipg";
-               dmas = <&edma1 7 0 0>, <&edma1 8 0 1>;
-               dma-names = "tx","rx";
-               status = "disabled";
+           
+           &i2c1 {
+               rtc: ds1337@68 {
+               compatible = "dallas,ds1337";
+               reg = <0x68>;
+               };
            };
 
            lpi2c2: i2c@44350000 {

rtc.cfg

CONFIG_RTC_DRV_DS1337=y

linux-variscite_%.bbappend

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "file://rtc.cfg \
            file://ds1337.patch"

执行操作及问题

执行以下命令后无报错,但imx93.dtsi文件未被修改:

$ bitbake fsl-image-gui -c cleansstate
$ bitbake fsl-image-gui -c patch

请问我的操作路径是否正确?


内容的提问来源于stack exchange,提问作者user27460468

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 20:33:13