Is core-image will modify the default configuration and how to resolve it?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is core-image will modify the default configuration and how to resolve it?

1,964件の閲覧回数
yanggao
Contributor III

Hi,

I'm working with LS1043A and yocto poky, and I'm blocked by the following problem.

I add a new meta-layer in order to generate a custom image that integrates gdb and gdbserver. 

I have written my custom-image.bb is like follows in a new meta-custom directory:

---------------------------------------------------------------------------------------------------

SUMMARY = "A FIT image comprising the Linux image, dtb and rootfs"
LICENSE = "MIT"

KERNEL_IMAGETYPE := "Image"

KERNEL_IMAGE ?= "${KERNEL_IMAGETYPE}"
ROOTFS_IMAGE := "fsl-image-core"
KERNEL_ITS ?= "kernel.its"

SRC_URI = "file://${KERNEL_ITS}"

IMAGE_FEATURES +="dev-pkgs dbg-pkgs package-management tools-debug tools-sdk"
IMAGE_INSTALL += "\
    packagegroup-core-buildessential \
    packagegroup-core-tools-debug \
    packagegroup-core-tools-profile \
        "

inherit core-image custom-share-image

export IMAGE_BASENAME = "custom-image"

------------------------------------------------------------------------------------------------------------

And my custom-share-image.bbclass is like this:

---------------------------------------------------------------------------------------------------

PACKAGE_ARCH = "${MACHINE_ARCH}"

inherit deploy

do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"
do_populate_sysroot[noexec] = "1"
do_package[noexec] = "1"
do_packagedata[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_deb[noexec] = "1"
do_package_write_rpm[noexec] = "1"

do_fetch[nostamp] = "1"
do_unpack[nostamp] = "1"
do_deploy[nostamp] = "1"
do_deploy[depends] += "virtual/kernel:do_build ${ROOTFS_IMAGE}:do_build"

do_deploy () {
    install -d ${DEPLOYDIR}
    cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE} .
    rm -f ${KERNEL_IMAGE}.gz
    gzip ${KERNEL_IMAGE}
    for DTS_FILE in ${KERNEL_DEVICETREE}; do
        DTB_FILE="${KERNEL_IMAGETYPE}-`basename ${DTS_FILE}`";
        ITB_BASENAME=kernel-`basename ${DTS_FILE} |sed -e 's,.dtb$,,'`-${DATETIME}
        ITB_SYMLINk=kernel-`basename ${DTS_FILE} |sed -e 's,.dtb$,,'`

        cp ${WORKDIR}/${KERNEL_ITS} kernel.its
        sed -i -e "s,kernel-image.gz,${KERNEL_IMAGE}.gz," kernel.its
        sed -i -e "s,freescale.dtb,${DEPLOY_DIR_IMAGE}/${DTB_FILE}," kernel.its
        sed -i -e "s,rootfs.ext2.gz,${DEPLOY_DIR_IMAGE}/${ROOTFS_IMAGE}-${MACHINE}.ext2.gz," kernel.its

        mkimage -f kernel.its ${ITB_BASENAME}.itb

        install -m 644 ${ITB_BASENAME}.itb ${DEPLOYDIR}/
        ln -sf ${ITB_BASENAME}.itb ${DEPLOYDIR}/${ITB_SYMLINk}.itb
    done
}
addtask deploy before build

COMPATIBLE_MACHINE = "(fsl-lsch2|fsl-lsch3)"

-----------------------------------------------------------------------------------

When I run

$ bitbake custom-image

The deploy() of custom-share-image.bbclass is not executed and the kernel.itb is not generated. While, if I deleted "inherit core-image" in custom-image.bb file, deploy() is exectued but gdb and gdbserver are not integrated in rootfs. I think maybe some environment configurations are changed because core-image is inherited, but I can't locate it. Is there someone have the same problem like me? How do you resolve it? 

Thanks in advance! 

0 件の賞賛
返信
1 返信

1,694件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello yang gao,

Please add "packagegroup-core-tools-debug“  in the variable IMAGE_INSTALL_append of recipe meta-freescale/recipes-fsl/images/fsl-image-core.bb, please refer to the following, then rebuild itb image with the command "bitbake fsl-image-kernelitb".

IMAGE_INSTALL_append = " \
    packagegroup-fsl-tools-core \
    packagegroup-fsl-benchmark-core \
    packagegroup-fsl-networking-core \
    packagegroup-core-tools-debug \
"

Please refer to package list in poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb.

RDEPENDS_${PN} = "\
    gdb \
    gdbserver \
    strace \
    ${MTRACE} \
    "


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信