All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Cochran <yocto@mindchasers.com>
To: meta-freescale@yoctoproject.org
Subject: Re: [meta-fsl-ppc][PATCH v2 11/12] inherit qoriq_build_64bit_kernel for kernel/module recipes
Date: Mon, 14 Jul 2014 00:52:45 -0400	[thread overview]
Message-ID: <53C3621D.7030506@mindchasers.com> (raw)
In-Reply-To: <1405303731-32598-3-git-send-email-ting.liu@freescale.com>

On 07/13/2014 10:08 PM, ting.liu@freescale.com wrote:
> From: Ting Liu <b28495@freescale.com>
>
> ppce6500 is a specific core which only support 64bit kernel, the duplicate
> hack codes were packaged into qoriq_build_64bit_kernel.bbclass, use it.

A few questions about this:

Isn't the e5500-64b impacted in addition to the e6500?

The python function that you removed is slightly different than the one 
supplied by the class.  It's not clear to me whether there would be be 
side effects.

I see in 
sdk1.6:meta-fsl-ppc-toolchain/conf/distro/include/tcmode-external-fsl.inc that 
the variable BUILD_64BIT_KERNEL will be set to 1 for the e5500-64b.  I 
haven't found it elsewhere.  Should it be set?


>
> Signed-off-by: Ting Liu <b28495@freescale.com>
> ---
> Changes in v2: add commit msg
>
>   recipes-bsp/ipc/ipc-modules.inc               |   20 +-------------------
>   recipes-kernel/asf/asf_git.bb                 |   21 +--------------------
>   recipes-kernel/ceetm/ceetm_git.bb             |   21 +--------------------
>   recipes-kernel/linux/linux-qoriq.inc          |   25 +------------------------
>   recipes-kernel/lttng/lttng-modules_%.bbappend |   18 +-----------------
>   recipes-kernel/pkc-host/pkc-host_git.bb       |   21 +--------------------
>   recipes-kernel/qoriq-debug/qoriq-debug_git.bb |   21 +--------------------
>   recipes-kernel/skmm-host/skmm-host_git.bb     |   21 +--------------------
>   8 files changed, 8 insertions(+), 160 deletions(-)
>
> diff --git a/recipes-bsp/ipc/ipc-modules.inc b/recipes-bsp/ipc/ipc-modules.inc
> index 015a91b..3d7dfa6 100644
> --- a/recipes-bsp/ipc/ipc-modules.inc
> +++ b/recipes-bsp/ipc/ipc-modules.inc
> @@ -5,27 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10"
>
>   require ipc.inc
>
> -inherit  module
> +inherit  module qoriq_build_64bit_kernel
>
>   S = "${WORKDIR}/git"
> -python () {
> -        ma = d.getVar("DISTRO_FEATURES", True)
> -        arch = d.getVar("OVERRIDES", True)
> -
> -        # the : after the arch is to skip the message on 64b
> -        if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch):
> -                raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -        promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -        if promote_kernel == "1":
> -                d.setVar('KERNEL_CC_append', ' -m64')
> -                d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -        error_qa = d.getVar('ERROR_QA', True)
> -        if 'arch' in error_qa:
> -                d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -}
>
>   do_compile_prepend () {
>       cd ${S}/kernel
> diff --git a/recipes-kernel/asf/asf_git.bb b/recipes-kernel/asf/asf_git.bb
> index 743ce62..9597257 100644
> --- a/recipes-kernel/asf/asf_git.bb
> +++ b/recipes-kernel/asf/asf_git.bb
> @@ -9,32 +9,13 @@ SRCREV = "f107bc7dac7fe74d765dc09f66dca84951921d2c"
>   DEPENDS="virtual/kernel"
>   RDEPENDS_${PN} += "ipsec-tools"
>
> -inherit module
> +inherit module qoriq_build_64bit_kernel
>
>   S = "${WORKDIR}/git/asfmodule"
>
>   EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
>   export KERNEL_PATH = "${STAGING_KERNEL_DIR}"
>
> -python () {
> -    ma = d.getVar("DISTRO_FEATURES", True)
> -    arch = d.getVar("OVERRIDES", True)
> -
> -    # the : after the arch is to skip the message on 64b
> -    if not "multiarch" in ma and "e6500:" in arch:
> -        raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -    promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -    if promote_kernel == "1":
> -        d.setVar('KERNEL_CC_append', ' -m64')
> -        d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -    error_qa = d.getVar('ERROR_QA', True)
> -    if 'arch' in error_qa:
> -        d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -}
> -
>   do_install(){
>   	mkdir -p ${D}/usr/driver/asf
>   	cp -rf ${S}/bin/full ${D}/usr/driver/asf
> diff --git a/recipes-kernel/ceetm/ceetm_git.bb b/recipes-kernel/ceetm/ceetm_git.bb
> index 7620cdb..266261e 100644
> --- a/recipes-kernel/ceetm/ceetm_git.bb
> +++ b/recipes-kernel/ceetm/ceetm_git.bb
> @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287"
>
>   DEPENDS="virtual/kernel"
>
> -inherit module
> +inherit module qoriq_build_64bit_kernel
>
>   SRC_URI = "git://git.freescale.com/ppc/sdk/ceetm.git;nobranch=1"
>   SRCREV =  "ecf55c9ca0cd42a212653e1f99c19cd611e3a008"
> @@ -14,25 +14,6 @@ S = "${WORKDIR}/git"
>   EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} SYSROOT=${STAGING_DIR_TARGET}"
>   export KERNEL_PATH = "${STAGING_KERNEL_DIR}"
>
> -python () {
> -    ma = d.getVar("DISTRO_FEATURES", True)
> -    arch = d.getVar("OVERRIDES", True)
> -
> -    # the : after the arch is to skip the message on 64b
> -    if not "multiarch" in ma and "e6500:" in arch:
> -        raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -    promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -    if promote_kernel == "1":
> -        d.setVar('KERNEL_CC_append', ' -m64')
> -        d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -    error_qa = d.getVar('ERROR_QA', True)
> -    if 'arch' in error_qa:
> -        d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -}
> -
>   do_install(){
>   	mkdir -p ${D}/usr/driver/ceetm
>   	mkdir -p ${D}/${libdir}/tc
> diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc
> index 00fe526..9e463dd 100644
> --- a/recipes-kernel/linux/linux-qoriq.inc
> +++ b/recipes-kernel/linux/linux-qoriq.inc
> @@ -1,4 +1,4 @@
> -inherit kernel
> +inherit kernel qoriq_build_64bit_kernel
>   require recipes-kernel/linux/linux-dtb.inc
>
>   DESCRIPTION = "Linux kernel for Freescale platforms"
> @@ -9,29 +9,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>   KSRC ?= ""
>   S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}'
>
> -python () {
> -	ma = d.getVar("DISTRO_FEATURES", True)
> -	arch = d.getVar("OVERRIDES", True)
> -
> -	# the : after the arch is to skip the message on 64b
> -	if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch):
> -		raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -	promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -	if promote_kernel == "1":
> -		d.setVar('KERNEL_CC_append', ' -m64')
> -		d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -	error_qa = d.getVar('ERROR_QA', True)
> -	if 'arch' in error_qa:
> -		d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -
> -	all_qa = d.getVar('ALL_QA', True)
> -	if 'arch' in all_qa:
> -		d.setVar('ALL_QA', all_qa.replace(' arch', ''))
> -}
> -
>   DEPENDS_append = " libgcc"
>   KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
>   KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
> diff --git a/recipes-kernel/lttng/lttng-modules_%.bbappend b/recipes-kernel/lttng/lttng-modules_%.bbappend
> index 5415f16..5ff765d 100644
> --- a/recipes-kernel/lttng/lttng-modules_%.bbappend
> +++ b/recipes-kernel/lttng/lttng-modules_%.bbappend
> @@ -1,18 +1,2 @@
> -inherit distro_features_check
> +inherit qoriq_build_64bit_kernel
>
> -REQUIRED_DISTRO_FEATURES_append_e6500 ?= "multiarch"
> -
> -python () {
> -
> -        promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -        if promote_kernel == "1":
> -                d.appendVar('KERNEL_CC', ' -m64')
> -                d.appendVar('KERNEL_LD', ' -melf64ppc')
> -
> -
> -        error_qa = d.getVar('ERROR_QA', True)
> -        if 'arch' in error_qa:
> -            d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -
> -}
> diff --git a/recipes-kernel/pkc-host/pkc-host_git.bb b/recipes-kernel/pkc-host/pkc-host_git.bb
> index 9535005..2e579c1 100644
> --- a/recipes-kernel/pkc-host/pkc-host_git.bb
> +++ b/recipes-kernel/pkc-host/pkc-host_git.bb
> @@ -3,7 +3,7 @@ SECTION = "pkc-host"
>   LICENSE = "GPLv2"
>   LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=6a26ed8e76a8ea2e019c525369ed0f03"
>
> -inherit  module
> +inherit  module qoriq_build_64bit_kernel
>
>   SRC_URI = "git://git.freescale.com/ppc/sdk/pkc-host.git;nobranch=1"
>   SRCREV = "cae512c94e2a26cc6b0d6393d307cdea2d7282c9"
> @@ -12,25 +12,6 @@ S = "${WORKDIR}/git"
>
>   EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
>
> -python () {
> -        ma = d.getVar("DISTRO_FEATURES", True)
> -        arch = d.getVar("OVERRIDES", True)
> -
> -        # the : after the arch is to skip the message on 64b
> -        if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch):
> -                raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -        promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -        if promote_kernel == "1":
> -                d.setVar('KERNEL_CC_append', ' -m64')
> -                d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -        error_qa = d.getVar('ERROR_QA', True)
> -        if 'arch' in error_qa:
> -                d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -}
> -
>   do_install() {
>           install -d ${D}/lib/modules/c2x0
>           install -d ${D}/etc/crypto
> diff --git a/recipes-kernel/qoriq-debug/qoriq-debug_git.bb b/recipes-kernel/qoriq-debug/qoriq-debug_git.bb
> index 5dd2468..c08f057 100644
> --- a/recipes-kernel/qoriq-debug/qoriq-debug_git.bb
> +++ b/recipes-kernel/qoriq-debug/qoriq-debug_git.bb
> @@ -3,7 +3,7 @@ SECTION = "qoriq-debug"
>   LICENSE = "GPLv2+"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba"
>
> -inherit module autotools-brokensep
> +inherit module autotools-brokensep qoriq_build_64bit_kernel
>
>   SRC_URI = "git://git.freescale.com/ppc/sdk/qoriq-debug.git;nobranch=1"
>   SRCREV = "20615c1ea332102635f8314cee5787c48c1a4254"
> @@ -13,22 +13,3 @@ S = "${WORKDIR}/git"
>   EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_DIR}"
>   EXTRA_OEMAKE += 'SYSROOT="${D}"'
>
> -python () {
> -	ma = d.getVar("DISTRO_FEATURES", True)
> -	arch = d.getVar("OVERRIDES", True)
> -
> -	# the : after the arch is to skip the message on 64b
> -	if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch):
> -		raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -	promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -	if promote_kernel == "1":
> -		d.setVar('KERNEL_CC_append', ' -m64')
> -		d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -	error_qa = d.getVar('ERROR_QA', True)
> -	if 'arch' in error_qa:
> -		d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -}
> -
> diff --git a/recipes-kernel/skmm-host/skmm-host_git.bb b/recipes-kernel/skmm-host/skmm-host_git.bb
> index 9ce8a1d..a1c43f3 100644
> --- a/recipes-kernel/skmm-host/skmm-host_git.bb
> +++ b/recipes-kernel/skmm-host/skmm-host_git.bb
> @@ -3,7 +3,7 @@ SECTION = "c293-skmm-host"
>   LICENSE = "Freescale-EULA"
>   LIC_FILES_CHKSUM = "file://Makefile;endline=7;md5=edffaac1da9e809ade0d2fcfcc18d8df"
>
> -inherit  module
> +inherit  module qoriq_build_64bit_kernel
>
>   SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-host.git;nobranch=1"
>   SRCREV = "97c9241a359edccdf8913cb9accbfe4ceb511523"
> @@ -12,23 +12,4 @@ S = "${WORKDIR}/git"
>
>   EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
>
> -python () {
> -	ma = d.getVar("DISTRO_FEATURES", True)
> -	arch = d.getVar("OVERRIDES", True)
> -
> -	# the : after the arch is to skip the message on 64b
> -	if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch):
> -		raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
> -
> -	promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
> -
> -	if promote_kernel == "1":
> -		d.setVar('KERNEL_CC_append', ' -m64')
> -		d.setVar('KERNEL_LD_append', ' -melf64ppc')
> -
> -	error_qa = d.getVar('ERROR_QA', True)
> -	if 'arch' in error_qa:
> -		d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
> -}
> -
>   FILES_${PN} += "/etc/skmm/"
>



  reply	other threads:[~2014-07-14  4:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14  2:08 [meta-fsl-ppc][PATCH v2 04/12] conf/machine/: move common bits to inc files ting.liu
2014-07-14  2:08 ` [meta-fsl-ppc][PATCH v2 09/12] set IMAGE_CLASSES = "image_types_uboot" as defaut ting.liu
2014-07-14  2:08 ` [meta-fsl-ppc][PATCH v2 11/12] inherit qoriq_build_64bit_kernel for kernel/module recipes ting.liu
2014-07-14  4:52   ` Bob Cochran [this message]
2014-07-14  5:10     ` ting.liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53C3621D.7030506@mindchasers.com \
    --to=yocto@mindchasers.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.