On 2017年12月28日 15:50, Martin Jansa wrote:
> No,some MACHINEs not support qemu usermode

That's not what I was asking.

You're disabling whole build-time postinst when qemu-usermode is in MACHINE_FEATURES with: ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true','false', d)}
Hi,
It seems that the built-time postinst will be disable when qemu-usermode is *not* in MACHINE_FEATURES.
If anywhere wrong, please correct me.

Thanks.

and in that case read-only images will fail to build and even if you remove that error (failed postinst scripts are causing errors when the image is configured to be read-only), then the image is still bad for runtime, because with read-only rootfs you cannot generate fontcache even on the device.


On Thu, Dec 28, 2017 at 8:42 AM, Jibin Xu <jibin...@windriver.com <mailto:jibin...@windriver.com>> wrote:

    I will send a right one for the typos.

    "Does this mean that MACHINEs which use qemu usermode won't be
    able to use read-only images where this postinst cannot be
    executed on read-only rootfs?"

    No,some MACHINEs not support qemu usermode, when used, it will
    lead to a qemu core dump: "qemu: uncaught target signal 11
    (Segmentation fault) - core dumped".

    so when use qemu usermode,check whether the machine supports it
    first.

    Thanks,

    Jibin

    On 2017年12月28日 15:11, Martin Jansa wrote:
    There are 2 typos in "qemu".

    Does this mean that MACHINEs which use qemu usermode won't be
    able to use read-only images where this postinst cannot be
    executed on read-only rootfs?

    On Thu, Dec 28, 2017 at 3:21 AM, Jibin Xu <jibin...@windriver.com
    <mailto:jibin...@windriver.com>> wrote:

        fontcache uses quemu usermode by default, but some architecture
        such as Intel skylake does not support qemu usermode, this can
        lead to a build warning as below:
        "WARNING: The postinstall intercept hook 'update_font_cache'
        failed".

        Add a judgement of qemu usermode to fix the build warning.

        Signed-off-by: Jibin Xu <jibin...@windriver.com
        <mailto:jibin...@windriver.com>>
        ---
         meta/classes/fontcache.bbclass | 18 +++++++++++-------
         1 file changed, 11 insertions(+), 7 deletions(-)

        diff --git a/meta/classes/fontcache.bbclass
        b/meta/classes/fontcache.bbclass
        index e76331131e..3eb868fa08 100644
        --- a/meta/classes/fontcache.bbclass
        +++ b/meta/classes/fontcache.bbclass
        @@ -17,13 +17,17 @@ FONTCONFIG_CACHE_PARAMS ?= "-v"
         FONTCONFIG_CACHE_ENV ?= "FC_DEBUG=1"
         fontcache_common() {
         if [ -n "$D" ] ; then
        -       $INTERCEPT_DIR/postinst_intercept update_font_cache
        ${PKG} mlprefix=${MLPREFIX} \
        -               'bindir="${bindir}"' \
        -               'libdir="${libdir}"' \
        -               'base_libdir="${base_libdir}"' \
        -               'fontconfigcachedir="${FONTCONFIG_CACHE_DIR}"' \
        -             
         'fontconfigcacheparams="${FONTCONFIG_CACHE_PARAMS}"' \
        -               'fontconfigcacheenv="${FONTCONFIG_CACHE_ENV}"'
        +       if ${@bb.utils.contains('MACHINE_FEATURES',
        'qemu-usermode', 'true','false', d)}; then
        +               $INTERCEPT_DIR/postinst_intercept
        update_font_cache ${PKG} mlprefix=${MLPREFIX} \
        +                       'bindir="${bindir}"' \
        +                       'libdir="${libdir}"' \
        +  'base_libdir="${base_libdir}"' \
        +  'fontconfigcachedir="${FONTCONFIG_CACHE_DIR}"' \
        +  'fontconfigcacheparams="${FONTCONFIG_CACHE_PARAMS}"' \
        +  'fontconfigcacheenv="${FONTCONFIG_CACHE_ENV}"'
        +       else
        +               exit 1
        +       fi
         else
                ${FONTCONFIG_CACHE_ENV} fc-cache
        ${FONTCONFIG_CACHE_PARAMS}
         fi
        --
        2.13.0

        --
        _______________________________________________
        Openembedded-core mailing list
        Openembedded-core@lists.openembedded.org
        <mailto:Openembedded-core@lists.openembedded.org>
        http://lists.openembedded.org/mailman/listinfo/openembedded-core
        <http://lists.openembedded.org/mailman/listinfo/openembedded-core>







--
---------------------
Thanks,
Zhixiong Chi
Tel: +86-10-8477-7036

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to