/meta/classes/image.bbclass中的ParseError无法继承文件类/ image_types_uboot.bbclass?

时间:2017-12-12 10:18:36

标签: bitbake angstrom-linux imx6

更新:它开始咬点了!! 我现在得到以下错误,它停止在中间bitbake core-image-minimal:

    Initialising tasks: 100% |##################################################################################################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: systemd-1_232-r0 do_patch: Command Error: 'quilt --quiltrc /home/rama/repositories/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/systemd/1_232-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0001-systemd-udevd.service.in-set-MountFlags-shared.patch
patching file units/systemd-udevd.service.in
Hunk #1 FAILED at 21.
1 out of 1 hunk FAILED -- rejects in file units/systemd-udevd.service.in
Patch 0001-systemd-udevd.service.in-set-MountFlags-shared.patch does not apply (enforce with -f)
ERROR: systemd-1_232-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/rama/repositories/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/systemd/1_232-r0/temp/log.do_patch.1928
ERROR: Task (/home/rama/repositories/poky/meta/recipes-core/systemd/systemd_232.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1156 tasks of which 1105 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/rama/repositories/poky/meta/recipes-core/systemd/systemd_232.bb:do_patch
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

这是bitbake的构建配置输出我终于得到了:

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal-4.8"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "apalis-imx6"
DISTRO            = "poky"
DISTRO_VERSION    = "2.3.2"
TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard cortexa9"
TARGET_FPU        = "hard"
meta              
meta-poky         
meta-yocto-bsp    
meta-toradex      = "pyro:a75a2f4272226e924d8c9deb699a19ca9e606a5b"
meta-mender-core  = "pyro:302111e4a79e4844cad536fcc9475764eb254611"
meta-freescale    = "pyro:06178400afbd641a6709473fd21d893dcd3cfbfa"
meta-freescale-3rdparty = "pyro:9613dbc02ca970122a01c935bc9e5789ced73a9d"
编辑:正如@Anders所建议的那样,我用meta-freescale-3rdparty取代了meta-fsl-arm和meta-fsl-arm-extra,它们位于pyro分支上(我检查过)。我现在收到以下错误:

ERROR: Layer 'fsl-arm-extra' depends on layer 'freescale-layer', but this layer is not enabled in your configuration
ERROR: Layer 'fsl-arm-extra' depends on layer 'freescale-layer', but this layer is not enabled in your configuration

编辑:它说文件丢失所以我从这里提供了以下文件http://cgit.openembedded.org/openembedded-core/tree/meta/classes/image_types_uboot.bbclass?h=daisy

创建了一个文件,现在我收到以下错误:

ERROR: /home/rama/repositories/poky/meta-fsl-arm/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'sdimg' - possibly invalid type name or missing support class
ERROR: Failed to parse recipe: /home/rama/repositories/poky/meta-fsl-arm/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb

我尝试过bitbaking文件,当我这样做时,我收到以下错误:

ERROR: ParseError at /home/rama/repositories/poky/meta/classes/image.bbclass:185: Could not inherit file classes/image_types_uboot.bbclass  

我有以下元图层,所有都在pyro分支上,我尝试使用分支,我仍然得到同样的错误:

  1. 元修理者芯
  2. 元toradex
  3. 元FSL-臂
  4. 元FSL-臂额外
  5. 元QT5
  6. 如果我将meta-angstrom添加到上面,我会收到以下错误:

    ERROR: ExpansionError during parsing /home/rama/repositories/poky/meta-angstrom/recipes-angstrom/angstrom/angstrom-version.bb
    Traceback (most recent call last):
    bb.data_smart.ExpansionError: Failure expanding variable do_install, expression was     install -d /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc
        echo "Angstrom 2.3.2 (Core edition)" > /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/angstrom-version
        echo "Built from branch: pyro" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/angstrom-version
        echo "Revision: a75a2f4272226e924d8c9deb699a19ca9e606a5b" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/angstrom-version
        echo "Target system: arm-poky-linux-gnueabi" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/angstrom-version
    
        echo "${@get_layers(bb, d)}" > /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/angstrom-build-info
    
        echo "VERSION=\"2.3.2\"" > /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
        echo "VERSION_ID=\"2.3.2\"" > /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
        echo "NAME=\"Angstrom\"" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
        echo "ID=\"angstrom\"" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
        echo "PRETTY_NAME=\"The Ångström Distribution 2.3.2\"" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
        echo "ANSI_COLOR=\"1;35\"" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
        echo "HOME_URL=\"http://www.angstrom-distribution.org\"" >> /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/etc/os-release
    
        install -d /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/usr/bin
        install -m 0755 /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/lsb_release /home/rama/repositories/poky/build/tmp/work/apalis_imx6-poky-linux-gnueabi/angstrom-version/2_2.3.2-r12/image/usr/bin/
     which triggered exception AttributeError: 'module' object has no attribute 'getVar'
    

    我需要bitbake文件并将其安装在我的apalis imx6上,我是否需要这个meta-angstrom图层?

    如果我将机器更改为qemux64并且我删除了toradex,fsl,angstrom图层,它就会开始变得很好!所以这绝对是这些层的问题。

    感谢任何帮助!

    我在Ubuntu 14.04上执行此操作

    编辑:在meta-angstrom上切换到主分支我能够解决第二个错误但是我仍然得到第一个错误。希望这有助于其他人。

    编辑:似乎问题再次出现,不知道为什么还在调查

    编辑:当我咬一口时,我会得到这样的东西:

    Loading cache: 100% |############################################################################################################################################| Time: 0:00:00
    Loaded 158 entries from dependency cache.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.                    | ETA:  0:00:16
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qtdeclarative_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    

    没有关于图层的信息。

    我的图层都是最新的,我已将它们切换为主图层。 我怎样才能获得图层信息?

    编辑: 这是我从bitbake得到的,没有任何其他信息

    bitbake core-image-minimal
    WARNING: Host distribution "ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.                    | ETA:  0:00:16
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qtwebkit-examples_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qtwebkit-examples_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.                    | ETA:  0:00:17
    NOTE: /home/rama/repositories/poky/meta-qt5/recipes-qt/qt5/qttools_git.bb: base_contains is deprecated, please use bb.utils.contains instead.
    

    编辑:local.conf

    MACHINE ?= "apalis-imx6"
    MENDER_FEATURES_ENABLE_append = " mender-uboot"
    DISTRO ?= "poky"
    PACKAGE_CLASSES ?= "package_rpm"
    #SDKMACHINE ?= "i686"
    
    EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
    
    USER_CLASSES ?= "buildstats image-mklibs image-prelink"
    PATCHRESOLVE = "noop"
    
    BB_DISKMON_DIRS = "\
        STOPTASKS,${TMPDIR},1G,100K \
        STOPTASKS,${DL_DIR},1G,100K \
        STOPTASKS,${SSTATE_DIR},1G,100K \
        STOPTASKS,/tmp,100M,100K \
        ABORT,${TMPDIR},100M,1K \
        ABORT,${DL_DIR},100M,1K \
        ABORT,${SSTATE_DIR},100M,1K \
        ABORT,/tmp,10M,1K"
    
    PACKAGECONFIG_append_pn-qemu-native = " sdl"
    PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
    
    MENDER_ARTIFACT_NAME = "demo-mender-artifact"
    
    INHERIT += "mender-full"
    INHERIT += "rm_work"
    DISTRO_FEATURES_append = " systemd"
    VIRTUAL-RUNTIME_init_manager = "systemd"
    DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
    VIRTUAL-RUNTIME_initscripts = ""
    
    IMAGE_FSTYPES = "ext4"
    

    bblayers.conf:

    # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
    # changes incompatibly
    POKY_BBLAYERS_CONF_VERSION = "2"
    
    BBPATH = "${TOPDIR}"
    BBFILES ?= ""
    
    BBLAYERS ?= " \
      /home/rama/repositories/poky/meta \
      /home/rama/repositories/poky/meta-poky \
      /home/rama/repositories/poky/meta-yocto-bsp \
      /home/rama/repositories/meta-mender/meta-mender-core \
      /home/rama/repositories/poky/meta-toradex \
      /home/rama/repositories/poky/meta-fsl-arm \
      /home/rama/repositories/poky/meta-fsl-arm-extra \
      /home/rama/repositories/poky/meta-qt5 \
      "
    

    我从图层中删除了meta-angstrom,它似乎也给了我一些其他错误。

    我错过了一些图层吗? 我尝试添加meta-openembedded层,如meta-oe等,我遇到了一些错误,如:

    ERROR: ParseError at /home/rama/repositories/poky/meta-openembedded/meta-oe/recipes-support/maliit/maliit-plugins_git.bb:7: Could not inherit file classes/qt4x11.bbclass
    

    所以我也删除了它。

1 个答案:

答案 0 :(得分:2)

您的错误:

ERROR: /home/rama/repositories/poky/meta-fsl-arm/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'sdimg' - possibly invalid type name or missing support class
ERROR: Failed to parse recipe: /home/rama/repositories/poky/meta-fsl-arm/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb

表示您的某个图层未更新为pyro。进一步了解您的问题,meta-fsl-arm严重过时了! (没有pyro分支等)。此图层已由meta-freescale替换。

您可能还需要仔细查看例如meta-fsl-arm-extra,看看它目前是否已维护和更新。

这就是我向您询问每个图层的确切分支和版本的原因。 <{1}}没有pyro分支!