diff mbox

arch/microblaze: add new architecture

Message ID 9c93e18b3d68b19303f3.1348113870@localhost.localdomain
State Accepted
Commit 7e41a188bd7c
Headers show

Commit Message

David Holsgrove Sept. 20, 2012, 4:04 a.m. UTC
# HG changeset patch
# User David Holsgrove <david.holsgrove@xilinx.com>
# Date 1348113698 -36000
# Node ID 9c93e18b3d68b19303f37bf604c0ad907451872a
# Parent  06b663f297adb76149f089136a78e7d5999c63bd
arch/microblaze: add new architecture

Add Microblaze architecture support.

This depends on EXPERIMENTAL, as upstream projects do not yet
include full support to build a modern microblaze compiler.
This is in the process of being updated, but is not currently
publicly accessible.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>


--
For unsubscribe information see http://sourceware.org/lists.html#faq

Comments

Yann E. MORIN Sept. 22, 2012, 10:38 p.m. UTC | #1
David, All,

On Thursday 20 September 2012 06:04:30 David Holsgrove wrote:
> # HG changeset patch
> # User David Holsgrove <david.holsgrove@xilinx.com>
> # Date 1348113698 -36000
> # Node ID 9c93e18b3d68b19303f37bf604c0ad907451872a
> # Parent  06b663f297adb76149f089136a78e7d5999c63bd
> arch/microblaze: add new architecture

Applied as #7e41a188bd7c. Thank you!

Regards,
Yann E. MORIN.
Stephan Linz Oct. 3, 2012, 9:34 a.m. UTC | #2
Am Sonntag, den 23.09.2012, 00:38 +0200 schrieb Yann E. MORIN: 
> David, All,
> 
> On Thursday 20 September 2012 06:04:30 David Holsgrove wrote:
> > # HG changeset patch
> > # User David Holsgrove <david.holsgrove@xilinx.com>
> > # Date 1348113698 -36000
> > # Node ID 9c93e18b3d68b19303f37bf604c0ad907451872a
> > # Parent  06b663f297adb76149f089136a78e7d5999c63bd
> > arch/microblaze: add new architecture
> 
> Applied as #7e41a188bd7c. Thank you!
> 
> Regards,
> Yann E. MORIN.
> 

Hello David,
Hello Nagaraju,

are there more patches in queue to submit?

I've played a little bit with the new architecture to rebuild the Xilinx
Microblaze toolchains as provided on Git:

  http://git.xilinx.com/?p=microblaze-gnu.git;a=tree;f=binaries 

Unfortunately I run into some issues:

1) Mainstream gcc-4.6.2 doesn't supoorts -mbig-endian/-mlittle-endian
options. The old Petalogix port (gcc-4.1.2) have had added a patch set
for this. I've solved it temporary with a QnD hack in microblaze.sh in
scripts/build/arch: set CT_ARCH_ENDIAN_CFLAG and CT_ARCH_ENDIAN_LDFLAG
empty (grrr, hack hack hack). Here is the gcc error message:

#prompt> touch tt.c
#prompt> microblaze-unknown-linux-gnu-gcc -mbig-endian tt.c
cc1: error: unrecognized command line option '-mbig-endian'

#prompt> microblaze-unknown-linux-gnu-gcc -EB tt.c
microblaze-unknown-linux-gnu-gcc: error: unrecognized option '-EB'

See attachment microblaze-unknown-linux-gnu-gcc--target-help-dump.txt
too.

2) With ./ct-ng libc_start_files I run into eGlibc problems. It tells
me: configure: error: The microblaze is not supported. Does eGlibc
mainline support Microblaze at all?


So it seems some stuff is missing, or not? Can anybody help me or give
me a hint where I can found gcc/eglibc patches (ongoing development
repositories) for Microblaze?
Yann E. MORIN Oct. 3, 2012, 9:48 p.m. UTC | #3
Stephan, David, Nagaraju, All,

On Wednesday 03 October 2012 11:34:02 Stephan Linz wrote:
> Am Sonntag, den 23.09.2012, 00:38 +0200 schrieb Yann E. MORIN: 
> > On Thursday 20 September 2012 06:04:30 David Holsgrove wrote:
> > > # HG changeset patch
> > > # User David Holsgrove <david.holsgrove@xilinx.com>
> > > # Date 1348113698 -36000
> > > # Node ID 9c93e18b3d68b19303f37bf604c0ad907451872a
> > > # Parent  06b663f297adb76149f089136a78e7d5999c63bd
> > > arch/microblaze: add new architecture
> > 
> > Applied as #7e41a188bd7c. Thank you!

> are there more patches in queue to submit?

As was stated in the commit log, microblaze support is in the process of
being pushed upstream for the different components impacted:

    ---8<---
    This depends on EXPERIMENTAL, as upstream projects do not yet
    include full support to build a modern microblaze compiler.
    This is in the process of being updated, but is not currently
    publicly accessible.
    ---8<---

Thus, it is expected that the build fails.

David said he'd provide sample defconfigs as soon as he knows the
versions of each components that have microblaze support.

In the meantime, you may want to sneak the Xilinx' binutils, gcc, eglibc
and linux, (from the tree you pointed above) in place of the upstream ones:

    ct-ng menuconfig               <- prepare the versions matching the
                                      ones in the Xilinx tree
    ct-ng +libc_check_config       <- this will extract everything
    cd .build/src                  <- remove the binutils, gcc, eglibc and
                                      linux dirs, and substitute with the
                                      Xilinx ones
    cd ../..
    ct-ng build                    <- restart the build, now with the Xilinx'
                                      sources

No promise on buildability. YMMV, as they use to say...

Of course, David and Nagaraju. if I talked with my ass, feel free to
correct me.

Regards,
Yann E. MORIN.
David Holsgrove Oct. 4, 2012, 2:01 a.m. UTC | #4
Hi Stephan, Yann, All

On 4 October 2012 07:48, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Stephan, David, Nagaraju, All,
>
> On Wednesday 03 October 2012 11:34:02 Stephan Linz wrote:
>> Am Sonntag, den 23.09.2012, 00:38 +0200 schrieb Yann E. MORIN:
>> > On Thursday 20 September 2012 06:04:30 David Holsgrove wrote:
>> > > # HG changeset patch
>> > > # User David Holsgrove <david.holsgrove@xilinx.com>
>> > > # Date 1348113698 -36000
>> > > # Node ID 9c93e18b3d68b19303f37bf604c0ad907451872a
>> > > # Parent  06b663f297adb76149f089136a78e7d5999c63bd
>> > > arch/microblaze: add new architecture
>> >
>> > Applied as #7e41a188bd7c. Thank you!
>
>> are there more patches in queue to submit?
>
> As was stated in the commit log, microblaze support is in the process of
> being pushed upstream for the different components impacted:
>
>     ---8<---
>     This depends on EXPERIMENTAL, as upstream projects do not yet
>     include full support to build a modern microblaze compiler.
>     This is in the process of being updated, but is not currently
>     publicly accessible.
>     ---8<---
>
> Thus, it is expected that the build fails.
>
> David said he'd provide sample defconfigs as soon as he knows the
> versions of each components that have microblaze support.
>

Yann's correct Stephan, there are no other microblaze specific patches
for crosstool-NG queued
for submission, aside from the sample defconfigs which I cant submit
yet without knowing the
version numbers.

I'll speak with Nagaraju with regards the source we're hosting on the
git.xilinx.com page, I believe it
may need updating. There are build scripts and sample configs there
which should build against
the source tarballs we're providing as a stop gap until microblaze
support is added / updated in
mainline.

> In the meantime, you may want to sneak the Xilinx' binutils, gcc, eglibc
> and linux, (from the tree you pointed above) in place of the upstream ones:
>
>     ct-ng menuconfig               <- prepare the versions matching the
>                                       ones in the Xilinx tree
>     ct-ng +libc_check_config       <- this will extract everything
>     cd .build/src                  <- remove the binutils, gcc, eglibc and
>                                       linux dirs, and substitute with the
>                                       Xilinx ones
>     cd ../..
>     ct-ng build                    <- restart the build, now with the Xilinx'
>                                       sources
>
> No promise on buildability. YMMV, as they use to say...
>

I have a feature patch which I'll send to the list now which addresses
this custom source build scenario Yann.
Its modelled on the existing linux custom functionality, so I'm hoping
it can be included to make development /
building of manually revision controlled source easier.

> Of course, David and Nagaraju. if I talked with my ass, feel free to
> correct me.
>

Not at all Yann, thanks for the reply :-)

David

> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Stephan Linz Oct. 4, 2012, 10:04 p.m. UTC | #5
Hi David, Yann, All

thank you for the fast response. Now I've seen there is a snapshot of
all the source code with latest Microblaze support:

http://git.xilinx.com/?p=microblaze-gnu.git;a=tree;f=src

Together with David's patch "config+scripts: Custom gcc, binutils, libc,
gdb version" I can start to evaluate a cutomized rebuild.


Thanks and br,
Stephan Linz

Am Donnerstag, den 04.10.2012, 12:01 +1000 schrieb David Holsgrove: 
> Hi Stephan, Yann, All
> 
> On 4 October 2012 07:48, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > Stephan, David, Nagaraju, All,
> >
> > On Wednesday 03 October 2012 11:34:02 Stephan Linz wrote:
> >> Am Sonntag, den 23.09.2012, 00:38 +0200 schrieb Yann E. MORIN:
> >> > On Thursday 20 September 2012 06:04:30 David Holsgrove wrote:
> >> > > # HG changeset patch
> >> > > # User David Holsgrove <david.holsgrove@xilinx.com>
> >> > > # Date 1348113698 -36000
> >> > > # Node ID 9c93e18b3d68b19303f37bf604c0ad907451872a
> >> > > # Parent  06b663f297adb76149f089136a78e7d5999c63bd
> >> > > arch/microblaze: add new architecture
> >> >
> >> > Applied as #7e41a188bd7c. Thank you!
> >
> >> are there more patches in queue to submit?
> >
> > As was stated in the commit log, microblaze support is in the process of
> > being pushed upstream for the different components impacted:
> >
> >     ---8<---
> >     This depends on EXPERIMENTAL, as upstream projects do not yet
> >     include full support to build a modern microblaze compiler.
> >     This is in the process of being updated, but is not currently
> >     publicly accessible.
> >     ---8<---
> >
> > Thus, it is expected that the build fails.
> >
> > David said he'd provide sample defconfigs as soon as he knows the
> > versions of each components that have microblaze support.
> >
> 
> Yann's correct Stephan, there are no other microblaze specific patches
> for crosstool-NG queued
> for submission, aside from the sample defconfigs which I cant submit
> yet without knowing the
> version numbers.
> 
> I'll speak with Nagaraju with regards the source we're hosting on the
> git.xilinx.com page, I believe it
> may need updating. There are build scripts and sample configs there
> which should build against
> the source tarballs we're providing as a stop gap until microblaze
> support is added / updated in
> mainline.
> 
> > In the meantime, you may want to sneak the Xilinx' binutils, gcc, eglibc
> > and linux, (from the tree you pointed above) in place of the upstream ones:
> >
> >     ct-ng menuconfig               <- prepare the versions matching the
> >                                       ones in the Xilinx tree
> >     ct-ng +libc_check_config       <- this will extract everything
> >     cd .build/src                  <- remove the binutils, gcc, eglibc and
> >                                       linux dirs, and substitute with the
> >                                       Xilinx ones
> >     cd ../..
> >     ct-ng build                    <- restart the build, now with the Xilinx'
> >                                       sources
> >
> > No promise on buildability. YMMV, as they use to say...
> >
> 
> I have a feature patch which I'll send to the list now which addresses
> this custom source build scenario Yann.
> Its modelled on the existing linux custom functionality, so I'm hoping
> it can be included to make development /
> building of manually revision controlled source easier.
> 
> > Of course, David and Nagaraju. if I talked with my ass, feel free to
> > correct me.
> >
> 
> Not at all Yann, thanks for the reply :-)
> 
> David
> 
> > Regards,
> > Yann E. MORIN.
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'
> >
> > --
> > For unsubscribe information see http://sourceware.org/lists.html#faq
> >




--
For unsubscribe information see http://sourceware.org/lists.html#faq
diff mbox

Patch

diff -r 06b663f297ad -r 9c93e18b3d68 config/arch/microblaze.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/arch/microblaze.in	Thu Sep 20 14:01:38 2012 +1000
@@ -0,0 +1,22 @@ 
+# MicroBlaze specific config options
+
+## depends on EXPERIMENTAL
+##
+## select ARCH_SUPPORT_ARCH
+## select ARCH_FLOAT_SW
+## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_DEFAULT_BE
+## select ARCH_SUPPORTS_BOTH_MMU
+## select ARCH_DEFAULT_HAS_MMU
+##
+## help The MicroBlaze architecture, as defined by:
+## help 	http://www.xilinx.com/
+## help 
+## help Upstream projects do not currently provide
+## help full support for the microblaze architecture
+## help and as such, this is marked as EXPERIMENTAL
+## help for CT-NG.
+## help 
+## help Support is being added for a modern gcc,
+## help binutils and gdb along with nptl threading
+## help in eglibc for microblaze.
diff -r 06b663f297ad -r 9c93e18b3d68 scripts/build/arch/microblaze.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/build/arch/microblaze.sh	Thu Sep 20 14:01:38 2012 +1000
@@ -0,0 +1,21 @@ 
+# Compute microblaze specific values
+
+CT_DoArchTupleValues () {
+    # The architecture part of the tuple:
+    CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
+
+    # gcc ./configure flags
+    CT_ARCH_WITH_ARCH=
+    CT_ARCH_WITH_ABI=
+    CT_ARCH_WITH_CPU=
+    CT_ARCH_WITH_TUNE=
+    CT_ARCH_WITH_FPU=
+    CT_ARCH_WITH_FLOAT=
+
+    # CFLAGS
+    case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
+        y,) CT_ARCH_FLOAT_CFLAG="-mhard-float" ;;
+        ,y) CT_ARCH_FLOAT_CFLAG="-msoft-float" ;;
+    esac
+
+}