Yocto似乎并不完全考虑我的自定义层
我正在关注” shawn Hymel的嵌入Linux简介。在那里,他创建了一个新图层meta-custom
,添加了从core> core-image-minimal.bb
复制的图像配方,并将密码添加到root用户。为了使密码添加有效,他从image_features
中删除debug-tweaks
。然后,他继续进行BitBake custom-image
。
我做了上述所有事情;构建没有错误,启动很好,但是在串行控制台上,我仍然没有任何密码提示。
以为登录系统本身有问题,我只是继续使用a 按照部分的部分,其中定义了一个新的简单应用程序。我可以看到它是编译的,但是图像中缺少最终可执行文件。
对我来说,Bitbake似乎确实识别custom-image
是食谱,但忽略了任何自定义。怎么了?
如果我在教程中使用了相同的STM32MP157D-DK1董事tn-imx-yocto-manifest/tree/hardknott_5.10.y stable“ rel =“ nofollow noreferrer”>指令建议使用供应商特定的食谱>。我应该以某种方式基于imx-image-full
制作图像食谱吗? (我不能简单地继承imx-image-full
,因为它不是.bbclass)
这是我的build> build/conf/conf/conf/conf/local.conf
:
MACHINE ??= 'pico-imx7'
DISTRO ?= 'fsl-imx-wayland'
PACKAGE_CLASSES ?= 'package_rpm'
#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-system-native = " sdl"
CONF_VERSION = "1"
BASE_BOARD ?= "pi"
DISPLAY_INFO ?= "lcd"
RF_FIRMWARES ?= "qca ath-pci"
SOUNDCARD ?= "voicehat"
NFC ?= "nfc"
PA_TOKEN ?= "SbtQ_mC4fvJRA88_9jB7"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
# TechNexion setup-environment.sh wrapper: Further modification to bblayers.conf and local.conf
BBMASK += "meta-tn-imx-bsp/recipes-containers/docker-disk/docker-disk.bb"
BBMASK += "meta-tn-imx-bsp/recipes-containers/docker/docker-ce_%.bbappend"
# TechNexion Setup BSP Release: Further modification to local.conf and bblayers.conf
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
build> build> build/conf/conf/conf/bblayers 。
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"
BBFILES ?= ""
BBLAYERS = " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-poky \
\
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-multimedia \
${BSPDIR}/sources/meta-openembedded/meta-python \
\
${BSPDIR}/sources/meta-freescale \
${BSPDIR}/sources/meta-freescale-3rdparty \
${BSPDIR}/sources/meta-freescale-distro \
\
${BSPDIR}/sources/meta-custom \
"
# setup i.MX Yocto Project Release layers in bblayers.conf
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-bsp"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-sdk"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-ml"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-v2x"
#BBLAYERS += "${BSPDIR}/sources/meta-nxp-demo-experience"
BBLAYERS += "${BSPDIR}/sources/meta-browser/meta-chromium"
BBLAYERS += "${BSPDIR}/sources/meta-clang"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-gnome"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-networking"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-filesystems"
BBLAYERS += "${BSPDIR}/sources/meta-qt5"
BBLAYERS += "${BSPDIR}/sources/meta-python2"
BBLAYERS += "${BSPDIR}/sources/meta-virtualization"
# setup Technexion i.MX Yocto Project Release Layers in bblayers.conf
BBLAYERS += " ${BSPDIR}/sources/meta-tn-imx-bsp "
# setup NXP nfc release layer in bblayers.conf
BBLAYERS += " ${BSPDIR}/sources/meta-nxp-nfc "
# 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-custom"
BBFILE_PATTERN_meta-custom = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-custom = "6"
LAYERDEPENDS_meta-custom = "core"
LAYERSERIES_COMPAT_meta-custom = "hardknott"
SUMMARY = "My custom Linux image."
IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
IMAGE_LINGUAS = " "
LICENSE = "MIT"
inherit core-image
inherit extrausers
# Change root password
EXTRA_USERS_PARAMS = "usermod -P 'toor' root;"
I'm following the "Introduction to Embedded Linux" by Shawn Hymel. There, he creates a new layer meta-custom
, adds an image recipe copied from core-image-minimal.bb
and adds a password to the root user. To make the password addition effective, he removes debug-tweaks
from IMAGE_FEATURES
. He then proceeds to bitbake custom-image
.
I did all of the above; the build has no errors and the startup is fine, but on the serial console I still don't get any password prompt.
Thinking there was something wrong with the login system itself, I just continued with a following part of the tutorial where a new simple app is defined. I can see it is compiled, but the final executable is missing from the image.
To me it seems that Bitbake does recognize custom-image
as a recipe but ignores any customization. What is going wrong?
Maybe it would work if I had the same STM32MP157D-DK1 board used in the tutorial, but I have a TechNexion PICO-IMX7, based on NXP i.MX7, whose instructions recommend the use of vendor-specific recipes like imx-image-full
. Should I somehow make my image recipe based on imx-image-full
instead? (I cannot simply inherit imx-image-full
as it's not a .bbclass)
Here is my build/conf/local.conf
:
MACHINE ??= 'pico-imx7'
DISTRO ?= 'fsl-imx-wayland'
PACKAGE_CLASSES ?= 'package_rpm'
#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-system-native = " sdl"
CONF_VERSION = "1"
BASE_BOARD ?= "pi"
DISPLAY_INFO ?= "lcd"
RF_FIRMWARES ?= "qca ath-pci"
SOUNDCARD ?= "voicehat"
NFC ?= "nfc"
PA_TOKEN ?= "SbtQ_mC4fvJRA88_9jB7"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
# TechNexion setup-environment.sh wrapper: Further modification to bblayers.conf and local.conf
BBMASK += "meta-tn-imx-bsp/recipes-containers/docker-disk/docker-disk.bb"
BBMASK += "meta-tn-imx-bsp/recipes-containers/docker/docker-ce_%.bbappend"
# TechNexion Setup BSP Release: Further modification to local.conf and bblayers.conf
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
build/conf/bblayers.conf
:
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"
BBFILES ?= ""
BBLAYERS = " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-poky \
\
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-multimedia \
${BSPDIR}/sources/meta-openembedded/meta-python \
\
${BSPDIR}/sources/meta-freescale \
${BSPDIR}/sources/meta-freescale-3rdparty \
${BSPDIR}/sources/meta-freescale-distro \
\
${BSPDIR}/sources/meta-custom \
"
# setup i.MX Yocto Project Release layers in bblayers.conf
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-bsp"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-sdk"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-ml"
BBLAYERS += "${BSPDIR}/sources/meta-imx/meta-v2x"
#BBLAYERS += "${BSPDIR}/sources/meta-nxp-demo-experience"
BBLAYERS += "${BSPDIR}/sources/meta-browser/meta-chromium"
BBLAYERS += "${BSPDIR}/sources/meta-clang"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-gnome"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-networking"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-filesystems"
BBLAYERS += "${BSPDIR}/sources/meta-qt5"
BBLAYERS += "${BSPDIR}/sources/meta-python2"
BBLAYERS += "${BSPDIR}/sources/meta-virtualization"
# setup Technexion i.MX Yocto Project Release Layers in bblayers.conf
BBLAYERS += " ${BSPDIR}/sources/meta-tn-imx-bsp "
# setup NXP nfc release layer in bblayers.conf
BBLAYERS += " ${BSPDIR}/sources/meta-nxp-nfc "
sources/meta-custom/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-custom"
BBFILE_PATTERN_meta-custom = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-custom = "6"
LAYERDEPENDS_meta-custom = "core"
LAYERSERIES_COMPAT_meta-custom = "hardknott"
sources/meta-custom/recipes-core/images/custom-image.bb
:
SUMMARY = "My custom Linux image."
IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
IMAGE_LINGUAS = " "
LICENSE = "MIT"
inherit core-image
inherit extrausers
# Change root password
EXTRA_USERS_PARAMS = "usermod -P 'toor' root;"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论