Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Kai Kang <kai.kang@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] nss: avoid to use the hardcode kernel version
Date: Mon, 31 Mar 2014 17:10:18 +0200	[thread overview]
Message-ID: <20140331151018.GG2425@jama> (raw)
In-Reply-To: <1396275649-32352-2-git-send-email-kai.kang@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 2593 bytes --]

On Mon, Mar 31, 2014 at 10:20:49PM +0800, Kai Kang wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> When native package is built, use the uname to return the kernel version.
> 
> When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion
> to avoid to use the hardcode kernel version.

Doesn't it make nss MACHINE_ARCH like most virtual/kernel providers are?

> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index 404decc..f24da68 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\
>  inherit siteinfo
>  PR = "r0"
>  DEPENDS = "sqlite3 nspr zlib nss-native"
> +DEPENDS_append_class-target += "virtual/kernel"
>  DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
>  RDEPENDS_${PN} = "perl"
>  
> @@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}"
>  do_compile_prepend_class-native() {
>      export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
>      export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
> +    export OS_RELEASE=`uname -r`
>  }
>  
>  do_compile_prepend_class-nativesdk() {
>      export LDFLAGS=""
>  }
>  
> +do_compile_prepend_class-target() {
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
> +}
> +
> +do_install_prepend_class-native() {
> +    export OS_RELEASE=`uname -r`
> +}
> +
> +do_install_prepend_class-target() {
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
> +}
>  do_compile() {
>      export CROSS_COMPILE=1
>      export NATIVE_CC="gcc"
> @@ -57,7 +70,6 @@ do_compile() {
>      export NSS_USE_SYSTEM_SQLITE=1
>      export NSS_ENABLE_ECC=1
>  
> -    export OS_RELEASE=3.4
>      export OS_TARGET=Linux
>      export OS_ARCH=Linux
>  
> @@ -97,7 +109,6 @@ do_install() {
>      export NSS_USE_SYSTEM_SQLITE=1
>      export NSS_ENABLE_ECC=1
>  
> -    export OS_RELEASE=3.4
>      export OS_TARGET=Linux
>      export OS_ARCH=Linux
>  
> -- 
> 1.8.1.2
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  parent reply	other threads:[~2014-03-31 15:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 14:20 [PATCH] nss: avoid to use the hardcode kernel version Kai Kang
2014-03-31 14:20 ` Kai Kang
2014-03-31 14:33   ` Otavio Salvador
2014-03-31 15:10   ` Martin Jansa [this message]
2014-03-31 16:32     ` Richard Purdie
2014-04-01  1:40       ` Kang Kai
2014-03-31 20:49     ` Otavio Salvador
2014-04-02  2:35   ` Kang Kai
2014-04-02  3:35     ` Khem Raj
2014-04-03 12:00     ` Richard Purdie
2014-04-03 13:13       ` Paul Eggleton
2014-04-03 13:49         ` Phil Blundell
2014-04-03 13:53           ` Paul Eggleton
2014-04-04  2:53       ` Kang Kai
2014-03-31 16:30 ` Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2014-02-13  3:48 rongqing.li
2014-02-13 11:45 ` David Nyström
2014-02-13 12:04 ` Richard Purdie
2014-02-13  3:34 rongqing.li
2014-02-13  5:04 ` Rongqing Li

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=20140331151018.GG2425@jama \
    --to=martin.jansa@gmail.com \
    --cc=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox