Skip to contentSkip to conversation

Microblaze target arch support

PATCH In review Adrian Alonso 4 participants 14 messages May 5, 2011 – May 9, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

cover Microblaze target arch support

* Microblaze big-endian soft-cpu support
* Only external-toolchain support using meta-xilinx layer
* meta-xilinx layer provides an initramfs-image descriptor so only a limited subset of packages can be built due to basic glibc support
* To use set in user local.conf
POKYMODE = "xilinx-external"
XILINX_TOOLCHAIN "Absolute path of prebuilt toolchain"
* Prebuilt toolchain can be found at:
git://git.xilinx.com/xldk/microblaze_v2.0.git

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: aalonso/external-toolchain
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=aalonso/external-toolchain

Thanks,
Adrian Alonso <[email protected]>
---

Adrian Alonso (7):
insane: add micrblaze target info
kernel-arch: add microblaze to valid archs
siteinfo: add microblaze target info
linux-libc-headers: add microblaze ARCH definition
image-mklibs: add microblaze arch support
package_rpm: use target vendor information
readline: update version

 meta/classes/image-mklibs.bbclass                  |    2 +-
 meta/classes/insane.bbclass                        |    4 +++-
 meta/classes/kernel-arch.bbclass                   |    3 ++-
 meta/classes/package_rpm.bbclass                   |    3 ++-
 meta/classes/siteinfo.bbclass                      |    1 +
 meta/recipes-core/readline/readline_6.2.bb         |    6 ++++++
 .../linux-libc-headers_2.6.37.2.bb                 |    3 ++-
 7 files changed, 17 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-core/readline/readline_6.2.bb
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 1/7 insane: add micrblaze target info

* package_qa_get_machine_dict
* Add microblaze dic entry for QA
* Prebuilt toolchain triplet microblaze-unknown-linux-gnu-
* TARGET_OS is linux-gnu for this toolchain

---
 meta/classes/insane.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
meta/classes/insane.bbclass +3 -1
index 742be5e..e9d4bfa 100644
@@ -85,7 +85,9 @@ def package_qa_get_machine_dict():
             "linux-uclibcspe" : {
                         "powerpc":    (20,     0,    0,          False,         32),
                       },
-
+            "linux-gnu" :       {
+                        "microblaze": (47787,  0,    0,          False,         32),
+                      },
        }
 
 
Signature · 1 line
1.7.4.4
#2 lore raw

Re: [PATCH 1/7] insane: add micrblaze target info

Quoted 15 lines · Adrian Alonso

* package_qa_get_machine_dict
* Add microblaze dic entry for QA
* Prebuilt toolchain triplet microblaze-unknown-linux-gnu-
* TARGET_OS is linux-gnu for this toolchain

---
  meta/classes/insane.bbclass |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
meta/classes/insane.bbclass +0 -0
index 742be5e..e9d4bfa 100644

meta/classes/insane.bbclass def package_qa_get_machine_dict(): · line 90

Quoted 7 lines
meta/classes/insane.bbclass +3 -1
@@ -85,7 +85,9 @@ def package_qa_get_machine_dict():
              "linux-uclibcspe" : {
                          "powerpc":    (20,     0,    0,          False,         32),
                        },
-
+            "linux-gnu" :       {
+                        "microblaze": (47787,  0,    0,          False,         32),
+                      },

we generally use *-*-linux except for arm and ppc (with spe ) can microblaze just use the same triplet ?

Quoted 3 lines
meta/classes/insane.bbclass +0 -0
         }
 
 
#3 lore raw

Re: [PATCH 1/7] insane: add micrblaze target info

Hi,

I'm integrating a third party toolchain which triplet is:
microblaze-unknown-linux-gnu-
Setting
TARGET_OS = "linux-gnu"; TARGET_VENDOR = "-unknown" resolves the toolchain triplet in bitbake.conf and I'm able to integrate the toolchain without
messing around with the third party toolchain.

Let me work if I can override insane.bbclass to be less third party toolchain specific.

Regards

Quoted 41 lines · Khem Raj
Quoted 15 lines · Adrian Alonso

* package_qa_get_machine_dict
* Add microblaze dic entry for QA
* Prebuilt toolchain triplet microblaze-unknown-linux-gnu-
* TARGET_OS is linux-gnu for this toolchain

---
 meta/classes/insane.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
meta/classes/insane.bbclass +0 -0
index 742be5e..e9d4bfa 100644

meta/classes/insane.bbclass def package_qa_get_machine_dict(): · line 93

Quoted 10 lines
meta/classes/insane.bbclass +3 -1
@@ -85,7 +85,9 @@ def package_qa_get_machine_dict():
             "linux-uclibcspe" : {
                         "powerpc":    (20,     0,    0,          False,
      32),
                       },
-
+            "linux-gnu" :       {
+                        "microblaze": (47787,  0,    0,          False,
      32),
+                      },
 

we generally use *-*-linux except for arm and ppc (with spe ) can microblaze just use the same triplet ?

Quoted 4 lines
        }

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Signature · 2 lines
Adrian Alonso
Secret Lab Technologies Ltd.
#4 lore raw

PATCH 2/7 kernel-arch: add microblaze to valid archs

In reply to Adrian Alonso

* Add Microblaze target to valid arch list definition

---
 meta/classes/kernel-arch.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/kernel-arch.bbclass +2 -1
index d6ae2e7..692d4fb 100644
@@ -12,7 +12,8 @@ valid_archs = "alpha cris ia64 \
                m32r mips \
 	       sh sh64 um h8300   \
 	       parisc s390  v850 \
-	       avr32 blackfin"
+	       avr32 blackfin \
+              microblaze"
 
 def map_kernel_arch(a, d):
 	import re
Signature · 1 line
1.7.4.4
#5 lore raw

PATCH 3/7 siteinfo: add microblaze target info

In reply to Adrian Alonso

* Add microblaze target info
* Microblaze soft CPU can be configured as big-endian/little-endian
* Currently target info support for microblaze big endian, using prebuilt toolchains.

---
 meta/classes/siteinfo.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/classes/siteinfo.bbclass +1 -0
index 892abc1..436bc39 100644
@@ -40,6 +40,7 @@ def get_siteinfo_list(d):
                "i486-linux-uclibc":       "endian-little bit-32 common-uclibc ix86-common",\
                "i586-linux-uclibc":       "endian-little bit-32 common-uclibc ix86-common",\
                "i686-linux-uclibc":       "endian-little bit-32 common-uclibc ix86-common",\
+               "microblaze-linux-gnu":    "endian-big bit-32 common-glibc microblaze-common",\
                "mipsel-linux":            "endian-little bit-32 common-glibc mips-common",\
                "mipsel-linux-uclibc":     "endian-little bit-32 common-uclibc mips-common",\
                "mips-linux":              "endian-big bit-32 common-glibc mips-common",\
Signature · 1 line
1.7.4.4
#6 lore raw

PATCH 4/7 linux-libc-headers: add microblaze ARCH definition

In reply to Adrian Alonso

* Add Microblaze ARCH definition
* Bump PR

---
 .../linux-libc-headers_2.6.37.2.bb                 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb +2 -1
index 888d9e4..51c4926 100644
@@ -2,7 +2,7 @@ require linux-libc-headers.inc
 
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS += "unifdef-native"
-PR = "r0"
+PR = "r1"
 
 SRC_URI += " file://connector-msg-size-fix.patch"
 
@@ -26,6 +26,7 @@ set_arch() {
 		x86_64*)  ARCH=x86_64 ;;
 		avr32*)   ARCH=avr32 ;;
 		bfin*)    ARCH=blackfin ;;
+		microblaze*) ARCH=microblaze ;;
 	esac
 }
 
Signature · 1 line
1.7.4.4
#7 lore raw

PATCH 5/7 image-mklibs: add microblaze arch support

In reply to Adrian Alonso

* In function mklibs_optimize_image_doit
* Add microblaze arch case for setting the dynamic_loader used by "mklibs" call

---
 meta/classes/image-mklibs.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/image-mklibs.bbclass +1 -1
index 0e72b01..9f5a4ea 100644
@@ -16,7 +16,7 @@ mklibs_optimize_image_doit() {
 		> ${WORKDIR}/mklibs/executables.list
 
 	case ${TARGET_ARCH} in
-		powerpc | mips )
+		powerpc | mips | microblaze )
 			dynamic_loader="/lib/ld.so.1"
 			;;
 		x86_64)
Signature · 1 line
1.7.4.4
#8 lore raw

PATCH 6/7 package_rpm: use target vendor information

In reply to Adrian Alonso

* Instead of hardcoding target vendor string "-poky" use TARGET_VENDOR information in case of using external toolchains

---
 meta/classes/package_rpm.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/package_rpm.bbclass +2 -1
index 70170d1..1cf9f79 100644
@@ -761,13 +761,14 @@ python do_package_rpm () {
 	# Setup the rpmbuild arguments...
 	rpmbuild = bb.data.getVar('RPMBUILD', d, True)
 	targetsys = bb.data.getVar('TARGET_SYS', d, True)
+	targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
 	pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
 	pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
 	bb.mkdirhier(pkgwritedir)
 	os.chmod(pkgwritedir, 0755)
 
 	cmd = rpmbuild
-	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
+	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + targetvendor + "-linux-gnu --buildroot " + pkgd
 	cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
 	cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
 	cmd = cmd + " --define '_use_internal_dependency_generator 0'"
Signature · 1 line
1.7.4.4
#9 lore raw

Re: [PATCH 6/7] package_rpm: use target vendor information

Hi Adrian,

One issue below:

Quoted 16 lines · Adrian Alonso

* Instead of hardcoding target vendor string "-poky" use TARGET_VENDOR information in case of using external toolchains

---
 meta/classes/package_rpm.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/package_rpm.bbclass +0 -0
index 70170d1..1cf9f79 100644
@@ -761,13 +761,14 @@ python do_package_rpm () {
 	# Setup the rpmbuild arguments...
 	rpmbuild = bb.data.getVar('RPMBUILD', d, True)

meta/classes/package_rpm.bbclass python do_package_rpm () { · line 771

Quoted 10 lines
meta/classes/package_rpm.bbclass +2 -1
 	targetsys = bb.data.getVar('TARGET_SYS', d, True)
+	targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
 	pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
 	pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
 	bb.mkdirhier(pkgwritedir)
 	os.chmod(pkgwritedir, 0755)
 
 	cmd = rpmbuild
-	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
+	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + targetvendor + "-linux-gnu --buildroot " + pkgd

You need:
+ "-" + targetvendor

otherwise you'll merge pkgarch and targetvendor together without a delimiter. Better yet, just format the string in one go and reduce the potential for error:

cmd = "%s --nodeps --short-circuit --target %s-%s-linux-gnu --buildroot %s" % \
(rpmbuild, pkgarch, targetvendor, pkgd)

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

PATCH 6/7 package_rpm: use target vendor information

Op forgot replay all

---------- Forwarded message ----------
From: Adrian Alonso <[email protected]>
Date: Fri, May 6, 2011 at 12:49 PM
Subject: Re: [poky] [PATCH 6/7] package_rpm: use target vendor information
To: Darren Hart <[email protected]>

Hi Darren,

In poky-default.inc target vendor is set as:

TARGET_VENDOR="-poky"

In xilinx-meta layer is set as

TARGET_VENDOR="-unknown"

So the result string is correct if TARGET_VENDOR assignment is consistent as in poky-default.inc

Regards

Quoted 53 lines · Darren Hart

Hi Adrian,

One issue below:

Review

Quoted 10 lines · Adrian Alonso

* Instead of hardcoding target vendor string "-poky" use TARGET_VENDOR information in case of using external toolchains

---
 meta/classes/package_rpm.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/meta/classes/package_rpm.bbclass

meta/classes/package_rpm.bbclass python do_package_rpm () { · line 765

Quoted 9 lines

index 70170d1..1cf9f79 100644

meta/classes/package_rpm.bbclass +1 -0
@@ -761,13 +761,14 @@ python do_package_rpm () {
      # Setup the rpmbuild arguments...
      rpmbuild = bb.data.getVar('RPMBUILD', d, True)
      targetsys = bb.data.getVar('TARGET_SYS', d, True)
+     targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
      pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}',

d)

meta/classes/package_rpm.bbclass python do_package_rpm () {

Quoted 6 lines
meta/classes/package_rpm.bbclass +0 -1
      pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
      bb.mkdirhier(pkgwritedir)
      os.chmod(pkgwritedir, 0755)
 
      cmd = rpmbuild
-     cmd = cmd + " --nodeps --short-circuit --target " + pkgarch +

"-poky-linux-gnu --buildroot " + pkgd

meta/classes/package_rpm.bbclass python do_package_rpm () { · line 771

Quoted 1 line
meta/classes/package_rpm.bbclass +1 -0
+     cmd = cmd + " --nodeps --short-circuit --target " + pkgarch +

targetvendor + "-linux-gnu --buildroot " + pkgd

You need:
+ "-" + targetvendor

otherwise you'll merge pkgarch and targetvendor together without a delimiter.
Better yet, just format the string in one go and reduce the potential for error:

cmd = "%s --nodeps --short-circuit --target %s-%s-linux-gnu --buildroot %s" % \
(rpmbuild, pkgarch, targetvendor, pkgd)

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Signature · 8 lines
Adrian Alonso
Secret Lab Technologies Ltd.



-- 
Adrian Alonso
Secret Lab Technologies Ltd.
#12 lore raw

Re: [PATCH 6/7] package_rpm: use target vendor information

Quoted 11 lines · Adrian Alonso

Op forgot replay all

---------- Forwarded message ----------
From: *Adrian Alonso* <[email protected] <mailto:[email protected]>>
Date: Fri, May 6, 2011 at 12:49 PM
Subject: Re: [poky] [PATCH 6/7] package_rpm: use target vendor information
To: Darren Hart <[email protected] <mailto:[email protected]>>

Hi Darren,

Quoted 7 lines

In poky-default.inc target vendor is set as:

TARGET_VENDOR="-poky"

In xilinx-meta layer is set as

TARGET_VENDOR="-unknown"

ew... embedded delimiters.

Quoted 3 lines

So the result string is correct if TARGET_VENDOR assignment is consistent as in poky-default.inc

OK, works as it did before I suppose.

--
Darren

Quoted 80 lines

Regards

On Fri, May 6, 2011 at 12:19 PM, Darren Hart <[email protected] <mailto:[email protected]>> wrote:

Hi Adrian,

One issue below:

On 05/05/2011 12:11 PM, Adrian Alonso wrote:
> * Instead of hardcoding target vendor string "-poky"
> use TARGET_VENDOR information in case of using external
> toolchains
>
> Signed-off-by: Adrian Alonso <[email protected] <mailto:[email protected]>>
> ---
> meta/classes/package_rpm.bbclass | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-) >
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 70170d1..1cf9f79 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -761,13 +761,14 @@ python do_package_rpm () {
> # Setup the rpmbuild arguments...
> rpmbuild = bb.data.getVar('RPMBUILD', d, True)
> targetsys = bb.data.getVar('TARGET_SYS', d, True)
> + targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
> pkgwritedir =
bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
> pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
> bb.mkdirhier(pkgwritedir)
> os.chmod(pkgwritedir, 0755)
>
> cmd = rpmbuild
> - cmd = cmd + " --nodeps --short-circuit --target " + pkgarch
+ "-poky-linux-gnu --buildroot " + pkgd
> + cmd = cmd + " --nodeps --short-circuit --target " + pkgarch
+ targetvendor + "-linux-gnu --buildroot " + pkgd

You need:
+ "-" + targetvendor

otherwise you'll merge pkgarch and targetvendor together without a delimiter.
Better yet, just format the string in one go and reduce the potential for error:

cmd = "%s --nodeps --short-circuit --target %s-%s-linux-gnu --buildroot %s" % \
(rpmbuild, pkgarch, targetvendor, pkgd)

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

Signature · 15 lines
Adrian Alonso
Secret Lab Technologies Ltd.



-- 
Adrian Alonso
Secret Lab Technologies Ltd.



_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#13 lore raw

Re: [PATCH 6/7] package_rpm: use target vendor information

In reply to Darren Hart
Quoted 1 line · Darren Hart

Hi Adrian,

With the issue fixed below, this looks like a good change to me.

--Mark

Quoted 39 lines

One issue below:

Quoted 16 lines · Adrian Alonso

* Instead of hardcoding target vendor string "-poky" use TARGET_VENDOR information in case of using external toolchains

---
 meta/classes/package_rpm.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/package_rpm.bbclass +0 -0
index 70170d1..1cf9f79 100644
@@ -761,13 +761,14 @@ python do_package_rpm () {
 	# Setup the rpmbuild arguments...
 	rpmbuild = bb.data.getVar('RPMBUILD', d, True)

meta/classes/package_rpm.bbclass python do_package_rpm () { · line 771

Quoted 10 lines
meta/classes/package_rpm.bbclass +2 -1
 	targetsys = bb.data.getVar('TARGET_SYS', d, True)
+	targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
 	pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
 	pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
 	bb.mkdirhier(pkgwritedir)
 	os.chmod(pkgwritedir, 0755)
 
 	cmd = rpmbuild
-	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
+	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + targetvendor + "-linux-gnu --buildroot " + pkgd

You need:
+ "-" + targetvendor

otherwise you'll merge pkgarch and targetvendor together without a delimiter. Better yet, just format the string in one go and reduce the potential for error:

cmd = "%s --nodeps --short-circuit --target %s-%s-linux-gnu --buildroot %s" % \
(rpmbuild, pkgarch, targetvendor, pkgd)

#14 lore raw

PATCH 7/7 readline: update version

In reply to Adrian Alonso

* Readline new recipe version 6.2

---
 meta/recipes-core/readline/readline_6.2.bb |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/readline/readline_6.2.bb
meta/recipes-core/readline/readline_6.2.bb new file +6 -0
new file mode 100644
index 0000000..5e32bb5
@@ -0,0 +1,6 @@
+require readline.inc
+
+PR = "r0"
+
+SRC_URI[md5sum] = "67948acb2ca081f23359d0256e9a271c"
+SRC_URI[sha256sum] = "79a696070a058c233c72dd6ac697021cc64abd5ed51e59db867d66d196a89381"
Signature · 1 line
1.7.4.4