Skip to contentSkip to conversation

one commit to make kernel repo change easy

PATCH In review [email protected] 4 participants 9 messages Jan 16, 2013 – Jan 21, 2013

lore
Share & tools
lore
#0 lore raw

cover one commit to make kernel repo change easy

From: Nitin A Kamble <[email protected]>

Here is a commit to make changing of the the linux-yocto v3.4 kernel repository easy.

Thanks,
Nitin

The following changes since commit 9f263a60e3521b800121a6f527a7b30dc9b62432:

oprofile: add AArch64 support (2013-01-16 16:10:39 +0000)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/misc
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

 meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-3.4.git/;protocol=file"

---
 meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +2 -1
index 70ed967..92129b6 100644
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
 SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
 SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-3.4.git;protocol=git"
+SRC_URI = "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
 
 LINUX_VERSION ?= "3.4.24"
 
Signature · 1 line
1.7.3.4
#2 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 18 lines · On 01/16/2013 11:46 AM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-3.4.git/;protocol=file"

---
  meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 70ed967..92129b6 100644

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f" · line 16

Quoted 7 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +2 -1
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
  SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
  SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-3.4.git;protocol=git"
+SRC_URI = "git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"
 

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in your local.conf file:

Quoted 1 line

SRC_URI_linux-yocto = "/home/nitin/linux-yocto-3.4.git/;protocol=file

;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Yes, it might require a little cut paste of the nocheck... part.

Sau!

Quoted 3 lines

LINUX_VERSION ?= "3.4.24"

#3 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 50 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:19 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 7 lines · On 01/16/2013 11:46 AM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-

3.4.git/;protocol=file"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?=

Quoted 12 lines
---
  meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 70ed967..92129b6 100644
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=

"5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 4 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -1
  SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
  SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma chine,meta"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 14

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 15

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+SRC_URI =

"git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${ KMETA};name=machine,meta"

Quoted 1 line

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in your local.conf file:

Quoted 7 lines
Quoted 1 line

SRC_URI_linux-yocto = "/home/nitin/linux-yocto-3.4.git/;protocol=file

;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Yes, it might require a little cut paste of the nocheck... part.

Sau!

Saul,
This way same settings can be used for any BSP. And shouldn't we make life of YP developer easy?

Thanks,
Nitin

Quoted 5 lines
Quoted 5 lines

LINUX_VERSION ?= "3.4.24"

#4 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 53 lines · Nitin A
Quoted 53 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:19 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 7 lines · On 01/16/2013 11:46 AM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-

3.4.git/;protocol=file"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?=

Quoted 12 lines
---
   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 70ed967..92129b6 100644
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=

"5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 4 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -1
   SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
   SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma chine,meta"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 14

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 15

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+SRC_URI =

"git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${ KMETA};name=machine,meta"

Quoted 1 line

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in your local.conf file:

Quoted 1 line

SRC_URI_linux-yocto = "/home/nitin/linux-yocto-3.4.git/;protocol=file

;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Quoted 9 lines
Quoted 4 lines

Yes, it might require a little cut paste of the nocheck... part.

Sau!

Saul,
This way same settings can be used for any BSP. And shouldn't we make life of YP developer easy?

This just seems like an extra variable that then needs to be documented when the SRC_URI already exists for this purpose.

Sau!

Quoted 10 lines

Thanks,
Nitin

Quoted 5 lines
Quoted 5 lines

   LINUX_VERSION ?= "3.4.24"
#5 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 73 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:37 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 32 lines · Nitin A
Quoted 32 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:19 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 7 lines · On 01/16/2013 11:46 AM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-

3.4.git/;protocol=file"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?=

Quoted 12 lines
---
   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 70ed967..92129b6 100644
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=

"5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 5 lines
Quoted 5 lines

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 4 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -1
   SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
   SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma

Quoted 5 lines
Quoted 5 lines

chine,meta"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 14

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git"

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+SRC_URI =

"git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${

Quoted 18 lines
Quoted 16 lines

KMETA};name=machine,meta"

Quoted 1 line

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in your local.conf file:

Quoted 2 lines

SRC_URI_linux-yocto =
"/home/nitin/linux-yocto-3.4.git/;protocol=file

;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Yes, it might require a little cut paste of the nocheck... part.

Sau!

Quoted 6 lines
Quoted 2 lines

Saul,
This way same settings can be used for any BSP. And shouldn't we make

life of YP developer easy?

Quoted 1 line

This just seems like an extra variable that then needs to be documented when the SRC_URI already exists for this purpose.

And this new variable is going to make kernel developer's life easy to just replace the kernel repository while keeping all the kernel repo branch names same.

As a kernel/BSP developer it definitely makes my life easier.

Thanks,
Nitin

Quoted 13 lines

Sau!

Quoted 10 lines

Thanks,
Nitin

Quoted 5 lines
Quoted 5 lines

   LINUX_VERSION ?= "3.4.24"
#6 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 76 lines · Nitin A
Quoted 76 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:37 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 32 lines · Nitin A
Quoted 32 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:19 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 7 lines · On 01/16/2013 11:46 AM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to use your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-

3.4.git/;protocol=file"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?=

Quoted 12 lines
---
   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 70ed967..92129b6 100644
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=

"5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 5 lines
Quoted 5 lines

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 4 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -1
   SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
   SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma

Quoted 5 lines
Quoted 5 lines

chine,meta"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 14

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git"

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+SRC_URI =

"git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${

Quoted 12 lines
Quoted 12 lines

KMETA};name=machine,meta"

Quoted 1 line

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in your local.conf file:

Quoted 2 lines

SRC_URI_linux-yocto =
"/home/nitin/linux-yocto-3.4.git/;protocol=file

;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Quoted 8 lines
Quoted 4 lines

Yes, it might require a little cut paste of the nocheck... part.

Sau!

Saul,
This way same settings can be used for any BSP. And shouldn't we make

life of YP developer easy?

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

This just seems like an extra variable that then needs to be documented when the SRC_URI already exists for this purpose.

And this new variable is going to make kernel developer's life easy to just replace the kernel repository while keeping all the kernel repo branch names same.

As a kernel/BSP developer it definitely makes my life easier.

I'm not taking things like this which solve a given specialist use case but would need to result in every recipe changing where someone wanted to do this. To be blunt, your choice of variable name also sucks.

Embrace the power of the scripting we have, there are much more interesting ways to solve this problem generically. For example, I wrote this piece of code in a few minutes (admittedly untested):

urlremapper.bbclass:

python () {
mod = False
newsrcuri = []
srcuri = (d.getVar("SRC_URI", True) or "").split() maps = d.getVarFlags("URLREMAP")
for uri in srcuri:
for u in maps:
if uri.startswith(u):
uri.replace(u, maps[u])
mod = True
newsrcuri.append(uri)
if mod:
d.setVar("SRC_URI", " ".join(newsrcuri))
}

URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] = "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"

which should do what you want but in a generic way which doesn't require us to hack each recipe. You can do it completely locally if you create a classes directory alongside your conf directory and place the .bbclass there, then add INHERIT += "urlremapper" in local.conf.

Cheers,

Richard

#7 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 25 lines

Embrace the power of the scripting we have, there are much more interesting ways to solve this problem generically. For example, I wrote this piece of code in a few minutes (admittedly untested):

urlremapper.bbclass:

python () {
mod = False
newsrcuri = []
srcuri = (d.getVar("SRC_URI", True) or "").split() maps = d.getVarFlags("URLREMAP")
for uri in srcuri:
for u in maps:
if uri.startswith(u):
uri.replace(u, maps[u])
mod = True
newsrcuri.append(uri)
if mod:
d.setVar("SRC_URI", " ".join(newsrcuri)) }

URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] = "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"

Quoted 9 lines

which should do what you want but in a generic way which doesn't require us to hack each recipe. You can do it completely locally if you create a classes directory alongside your conf directory and place the .bbclass there, then add INHERIT += "urlremapper" in local.conf.

Cheers,

Richard

Richard,
I understand your point. And this newer solution should work. If possible I would like to push this class in the oecore layer so that I don't have to maintain it myself. Also can this be done selectively for a BSP by using the bspname override?

Thanks,
Nitin

#8 lore raw

Re: [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

In reply to Richard Purdie
Quoted 89 lines · Richard Purdie
Quoted 20 lines · Nitin A
Quoted 20 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:37 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 10 lines · Nitin A
Quoted 10 lines

-----Original Message-----
From: Saul Wold [mailto:[email protected]]
Sent: Friday, January 18, 2013 9:19 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] linux-yocto_3.4: use ${KSRC_linux_yocto_3_4_repo} based SRC_URI

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines · On 01/16/2013 11:46 AM, [email protected] wrote:
Quoted 4 lines

From: Nitin A Kamble <[email protected]>

This makes replacing kernel git repository easy.
For example you can add the following line in your local.conf to

use

Quoted 28 lines
Quoted 28 lines
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines

your own local kernel repository:

KSRC_linux_yocto_3_4_repo = "/home/nitin/linux-yocto-

3.4.git/;protocol=file"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?=

Quoted 12 lines
---
   meta/recipes-kernel/linux/linux-yocto_3.4.bb |    3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -0
index 70ed967..92129b6 100644
@@ -11,7 +11,8 @@ SRCREV_machine_qemux86-64 ?=

"5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 5 lines
Quoted 5 lines

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"

Quoted 4 lines
meta/recipes-kernel/linux/linux-yocto_3.4.bb +0 -1
   SRCREV_machine ?= "5432e2acb6053f9f7563cf63abd101ed2fdc1b6f"
   SRCREV_meta ?= "7e0cd2990798aae80565baa17d3b6c771874f284"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git;nocheckout=1;branch=${KBRANCH},${KMETA};name=ma

Quoted 5 lines
Quoted 5 lines

chine,meta"

meta/recipes-kernel/linux/linux-yocto_3.4.bb SRCREV_machine_qemux86-64 ?= · line 14

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+KSRC_linux_yocto_3_4_repo ?= "git.yoctoproject.org/linux-yocto-

3.4.git;protocol=git"

Quoted 1 line
meta/recipes-kernel/linux/linux-yocto_3.4.bb +1 -0
+SRC_URI =
Quoted 7 lines
Quoted 7 lines

"git://${KSRC_linux_yocto_3_4_repo};nocheckout=1;branch=${KBRANCH},${

Quoted 6 lines
Quoted 6 lines

KMETA};name=machine,meta"

Quoted 1 line

Nitin,

Can't the same be accomplished by setting SRC_URI-yocto-linux in

your

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

local.conf file:

Quoted 2 lines

SRC_URI_linux-yocto =
"/home/nitin/linux-yocto-3.4.git/;protocol=file

;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta"

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines

Yes, it might require a little cut paste of the nocheck... part.

Sau!

Saul,
This way same settings can be used for any BSP. And shouldn't we

make

Quoted 6 lines
Quoted 4 lines

life of YP developer easy?

Quoted 1 line

This just seems like an extra variable that then needs to be documented when the SRC_URI already exists for this purpose.

And this new variable is going to make kernel developer's life easy to

just replace the kernel repository

Quoted 3 lines

while keeping all the kernel repo branch names same.

As a kernel/BSP developer it definitely makes my life easier.

Quoted 9 lines

I'm not taking things like this which solve a given specialist use case but would need to result in every recipe changing where someone wanted to do this. To be blunt, your choice of variable name also sucks.

Embrace the power of the scripting we have, there are much more interesting ways to solve this problem generically. For example, I wrote this piece of code in a few minutes (admittedly untested):

Agreed! I'm not even sure how I missed that this was to the *oe-core* linux-yocto
recipes (Nitin: you need to cc' me, or let me stage and merge changes to these
recipes as a general rule), but I wouldn't have let this in either.

I admit to having such things in local/hack layers, but they definitely are not something
I'd ever have wanted to see in main recipes.

Cheers,

Bruce

Quoted 38 lines

urlremapper.bbclass:

python () {
mod = False
newsrcuri = []
srcuri = (d.getVar("SRC_URI", True) or "").split() maps = d.getVarFlags("URLREMAP")
for uri in srcuri:
for u in maps:
if uri.startswith(u):
uri.replace(u, maps[u])
mod = True
newsrcuri.append(uri)
if mod:
d.setVar("SRC_URI", " ".join(newsrcuri))
}

URLREMAP[git://git.yoctoproject.org/linux-yocto-3.4.git] = "git:///home/nitin/linux-yocto-3.4.git/;protocol=file"

which should do what you want but in a generic way which doesn't require us to hack each recipe. You can do it completely locally if you create a classes directory alongside your conf directory and place the .bbclass there, then add INHERIT += "urlremapper" in local.conf.

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"