openeuler embedded构建镜像并部署到ok3588上面的问题

尝试按照在线文档 bitbake openeuler-image 进行操作,刚一开始就会报错!


注释掉 src/yocto-meta-rockchip/classes/local-git.bbclass 第11行

Copyright (C) 2021, Rockchip Electronics Co., Ltd

Released under the MIT license (see COPYING.MIT for the terms)

python () {
from bb.fetch2 import git
from bb.fetch2 import Fetch
from bb.fetch2 import runfetchcmd
import shlex

git = git.Git()

注释掉的 bb.fetch2.get_srcrev(d)

fetcher = Fetch(d.getVar('SRC_URI').split(), d)
urldata = fetcher.ud
for u in urldata:
    if not urldata[u].method.supports_srcrev():
        continue

    ud = urldata[u]
    if ud.proto.lower() != 'file' or ud.type != 'git':
        continue

    if not os.path.exists(ud.clonedir):
        continue

    repourl = git._get_repo_url(ud)

    # 尝试提前进行完整获取
    fetch_cmd = "LANG=C %s fetch %s" % (ud.basecmd, shlex.quote(repourl))
    try:
        runfetchcmd(fetch_cmd, d, workdir=ud.clonedir)
    except bb.fetch2.FetchError:
        # 忽略错误
        return

成功编译下去,但生成的镜像烧录后,和官网提供的 ok3588 镜像一样,没有包管理器,系统虽然能跑,但完全无法使用。于是我在 build/conf/local.conf 中将

PACKAGE_CLASSES ?= “package_rpm”

修改为

PACKAGE_CLASSES = “package_rpm package_ipk”
EXTRA_IMAGE_FEATURES += " package-management "

编译完成后,镜像提示已支持 dnf 和 rpm 命令,但 DNS 解析出现问题了。。。

现在就想搞清楚到底该怎么解决这个问题。