Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] buildroot and sh4
@ 2010-06-03 22:08 Philippe Reynes
  2010-06-04  7:36 ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Reynes @ 2010-06-03 22:08 UTC (permalink / raw)
  To: buildroot

Hi

I've done a little doc about building an image for sh4 with buildroot and run it 
with qemu. As you could see, it's quite trivial, except the option for the compiler, 
and option for qemu.

1) get builroot source
git clone git://git.buildroot.net/buildroot

2) go in buildroot directory
cd buildroot

3) configure builroot
run : make menuconfig 
and set :
Target Architecture => superh
Target Architecure variant => sh4
Target options => nothing to change
Build options => nothing to change
Toolchain => 
??? GCC compiler Version => 4.4.x
??? Additionnal gcc options => --with-multilib-list=m4,m4-nofpu
??? Enable multilib support => yes
Package Section for the target => nothing to change
Target filesystem options => nothing to change
Bootloader => no
Kernel =>
??? Kernel type => linux (advanced configuration)
??? Linux kernel version => The latest stable Linux kernel (2.6.33.4)
??? Patches => nothing to change
??? Linux Kernel Configuration => nothing to change
??? kernel binary format => zImage
??? Destination for linux kernel binaries => nothing to change

4) compile buildroot
make all

as kernel config file, use this one :
config_2_6_33_4_sh.txt

5) run qemu

qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append root=/dev/sda console=tty0 console=ttySC1,115200 noiotrap 


the config file can be found here : http://www.zarb.org/~trem/sh/
there are 2 files :
- install_br_sh4.txt : this little doc
- config_2_6_33_4_sh.txt : configuration for a kernel 2.6.33.4 on sh4


I hope this little doc will be usefull, and I'll be pleased to get feedback,
trem





      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100603/5154f468/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-03 22:08 [Buildroot] buildroot and sh4 Philippe Reynes
@ 2010-06-04  7:36 ` Thomas Petazzoni
  2010-06-04  8:39   ` Pierre Ficheux
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-06-04  7:36 UTC (permalink / raw)
  To: buildroot

Hello Philippe,

Thanks for this documentation and your efforts to build a working
demonstration of Buildroot on sh4 with Qemu!

On Thu, 3 Jun 2010 22:08:17 +0000 (GMT)
Philippe Reynes <tremyfr@yahoo.fr> wrote:

> ??? GCC compiler Version => 4.4.x
> ??? Additionnal gcc options => --with-multilib-list=m4,m4-nofpu

Does this actually work ?

To produce a multilib toolchain, you need to build the C library as
many times as you have items in this "with-multilib-list". However, as
far as I understand Buildroot's code to generate toolchains, it only
builds uClibc once. Did you actually check that this multilib thing was
working ?

> I hope this little doc will be usefull, and I'll be pleased to get feedback,

I think it'd be great if we added a target/device/qemu directory, with
target/device/qemu/sh4-rd2 as a sub-directory, containing your kernel
configuration + a small README file saying how to run Qemu. Then, your
Buildroot config file could be added to the configs/ directory. This
ways, others could easily run this.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-04  7:36 ` Thomas Petazzoni
@ 2010-06-04  8:39   ` Pierre Ficheux
  2010-06-04  9:17     ` Thomas Petazzoni
  2010-06-04 10:37   ` Peter Korsgaard
  2010-06-04 22:12   ` Philippe Reynes
  2 siblings, 1 reply; 14+ messages in thread
From: Pierre Ficheux @ 2010-06-04  8:39 UTC (permalink / raw)
  To: buildroot


On Fri, 4 Jun 2010 09:36:35 +0200, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 
> I think it'd be great if we added a target/device/qemu directory, with
> target/device/qemu/sh4-rd2 as a sub-directory, containing your kernel
> configuration + a small README file saying how to run Qemu. Then, your
> Buildroot config file could be added to the configs/ directory. This
> ways, others could easily run this.
> 
> Thomas
>

Same for Versatile PB or Integrator CP for ARM, I can do that. 

-- 
Pierre FICHEUX -/- CTO OW/OS4I, France -\- pierre.ficheux at openwide.fr
                                         http://www.os4i.com
                                         http://www.ficheux.org
I would love to change the world, but they won't give me the source code

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-04  8:39   ` Pierre Ficheux
@ 2010-06-04  9:17     ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-06-04  9:17 UTC (permalink / raw)
  To: buildroot

On Fri, 04 Jun 2010 10:39:11 +0200
Pierre Ficheux <pierre.ficheux@openwide.fr> wrote:

> Same for Versatile PB or Integrator CP for ARM, I can do that. 

Yes, of course. It'd be great to have known-working defconfigs for the
different CPU architectures that Qemu support: x86, x86_64, ARM, MIPS,
PowerPC.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-04  7:36 ` Thomas Petazzoni
  2010-06-04  8:39   ` Pierre Ficheux
@ 2010-06-04 10:37   ` Peter Korsgaard
  2010-06-04 22:12   ` Philippe Reynes
  2 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2010-06-04 10:37 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> I think it'd be great if we added a target/device/qemu
 Thomas> directory, with target/device/qemu/sh4-rd2 as a sub-directory,
 Thomas> containing your kernel configuration + a small README file
 Thomas> saying how to run Qemu. Then, your Buildroot config file could
 Thomas> be added to the configs/ directory. This ways, others could
 Thomas> easily run this.

Agreed.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-04  7:36 ` Thomas Petazzoni
  2010-06-04  8:39   ` Pierre Ficheux
  2010-06-04 10:37   ` Peter Korsgaard
@ 2010-06-04 22:12   ` Philippe Reynes
  2010-06-07  9:14     ` Phil Edworthy
  2 siblings, 1 reply; 14+ messages in thread
From: Philippe Reynes @ 2010-06-04 22:12 UTC (permalink / raw)
  To: buildroot

Hi

I've checked my additionnal gcc options, and here the result :

If I don't add --with-multilib-list=m4,m4-nofpu, the kernel compilation fails with
the following error :

make[1]: entrant dans le r?pertoire ? /home/trem/mes_codes/buildroot/temp/buildroot/output/build/linux-2.6.33.4 ?
? CHK???? include/linux/version.h
? UPD???? include/linux/version.h
? CHK???? include/generated/utsrelease.h
? UPD???? include/generated/utsrelease.h
? Generating include/generated/machtypes.h
? CC????? kernel/bounds.s
cc1: error: command line option '-m4-nofpu' is not supported by this configuration
cc1: error: command line option '-m4-nofpu' is not supported by this configuration
make[2]: *** [kernel/bounds.s] Erreur 1
make[1]: *** [prepare0] Erreur 2
make[1]: quittant le r?pertoire ? /home/trem/mes_codes/buildroot/temp/buildroot/output/build/linux-2.6.33.4 ?
make: *** [/home/trem/mes_codes/buildroot/temp/buildroot/output/build/linux-2.6.33.4/.depend_done] Erreur 2


If I add --with-multilib-list=m4,m4-nofpu, the kernel compilation works fine.


As others, I think that adding a directory target/device/qemu, and give
a working configuration for building an image that run on qemu is a nice idea.
I add the sh architecture to my todo list.

Philippe


--- En date de?: Ven 4.6.10, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit?:

De: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Objet: Re: [Buildroot] buildroot and sh4
?: buildroot at busybox.net
Date: Vendredi 4 juin 2010, 9h36

Hello Philippe,

Thanks for this documentation and your efforts to build a working
demonstration of Buildroot on sh4 with Qemu!

On Thu, 3 Jun 2010 22:08:17 +0000 (GMT)
Philippe Reynes <tremyfr@yahoo.fr> wrote:

> ??? GCC compiler Version => 4.4.x
> ??? Additionnal gcc options => --with-multilib-list=m4,m4-nofpu

Does this actually work ?

To produce a multilib toolchain, you need to build the C library as
many times as you have items in this "with-multilib-list". However, as
far as I understand Buildroot's code to generate toolchains, it only
builds uClibc once. Did you actually check that this multilib thing was
working ?

> I hope this little doc will be usefull, and I'll be pleased to get feedback,

I think it'd be great if we added a target/device/qemu directory, with
target/device/qemu/sh4-rd2 as a sub-directory, containing your kernel
configuration + a small README file saying how to run Qemu. Then, your
Buildroot config file could be added to the configs/ directory. This
ways, others could easily run this.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100604/9509e1c9/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-04 22:12   ` Philippe Reynes
@ 2010-06-07  9:14     ` Phil Edworthy
  2010-07-03 10:52       ` Philippe Reynes
  0 siblings, 1 reply; 14+ messages in thread
From: Phil Edworthy @ 2010-06-07  9:14 UTC (permalink / raw)
  To: buildroot

BTW, I have successfully used a CodeSourcery external toolchain with
Buildroot on sh4 (MS7724 development board). I'm currently waiting for git
access via http before creating patches for this... 

 

Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100607/17665527/attachment.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-06-07  9:14     ` Phil Edworthy
@ 2010-07-03 10:52       ` Philippe Reynes
  2010-07-27 22:16         ` Philippe Reynes
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Reynes @ 2010-07-03 10:52 UTC (permalink / raw)
  To: buildroot

Hi,

First, sorry for this late answer.

I've done a little patch that add a qemu device target for sh4. You could find it here : http://zarb.org/~trem/buildroot/add_qemu_sh4_r2d_target.patch

regards,
Philippe

--- En date de?: Lun 7.6.10, Phil Edworthy <Phil.Edworthy@renesas.com> a ?crit?:

De: Phil Edworthy <Phil.Edworthy@renesas.com>
Objet: RE: [Buildroot] buildroot and sh4
?: "Philippe Reynes" <tremyfr@yahoo.fr>, buildroot at busybox.net, "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
Date: Lundi 7 juin 2010, 11h14




 
 






BTW, I have successfully used a
CodeSourcery external toolchain with Buildroot on sh4 (MS7724 development
board). I?m currently waiting for git access via http before creating patches
for this?  

 ? 

Phil 



 




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100703/81428c14/attachment-0001.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-07-03 10:52       ` Philippe Reynes
@ 2010-07-27 22:16         ` Philippe Reynes
  2010-11-07 18:28           ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Reynes @ 2010-07-27 22:16 UTC (permalink / raw)
  To: buildroot

Hi all,

I've done a new version of the sh4 patch, you could find it her: 
http://ryu.zarb.org/~trem/buildroot/0001-Add-a-qemu-device-target-sh4-r2d.patch

I've added a sh4_defconfig in the config directory as asked by Thomas.

Philippe


--- En date de?: Sam 3.7.10, Philippe Reynes <tremyfr@yahoo.fr> a ?crit?:

De: Philippe Reynes <tremyfr@yahoo.fr>
Objet: Re: [Buildroot] buildroot and sh4
?: buildroot at busybox.net, "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>, "Phil Edworthy" <Phil.Edworthy@renesas.com>
Date: Samedi 3 juillet 2010, 12h52

Hi,

First, sorry for this late answer.

I've done a little patch that add a qemu device target for sh4. You could find it here : http://zarb.org/~trem/buildroot/add_qemu_sh4_r2d_target.patch

regards,
Philippe

--- En date de?: Lun 7.6.10, Phil Edworthy <Phil.Edworthy@renesas.com> a ?crit?:

De: Phil Edworthy <Phil.Edworthy@renesas.com>
Objet: RE: [Buildroot] buildroot and sh4
?: "Philippe Reynes" <tremyfr@yahoo.fr>, buildroot at busybox.net, "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
Date: Lundi 7 juin 2010, 11h14




 
 






BTW, I have successfully used a
CodeSourcery external toolchain with Buildroot on sh4 (MS7724 development
board). I?m currently waiting for git access via http before creating patches
for this?  

 ? 

Phil 



 







      
-----La pi?ce jointe associ?e suit-----

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100727/6f732418/attachment-0001.html>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-07-27 22:16         ` Philippe Reynes
@ 2010-11-07 18:28           ` Thomas Petazzoni
  2010-11-10 14:11             ` Phil Edworthy
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-11-07 18:28 UTC (permalink / raw)
  To: buildroot

Hello Philippe,

On Tue, 27 Jul 2010 22:16:11 +0000 (GMT)
Philippe Reynes <tremyfr@yahoo.fr> wrote:

> I've done a new version of the sh4 patch, you could find it her: 
> http://ryu.zarb.org/~trem/buildroot/0001-Add-a-qemu-device-target-sh4-r2d.patch
> 
> I've added a sh4_defconfig in the config directory as asked by Thomas.

Since I'm almost at the end of the cleanup of the board stuff, I wanted
to merge your work to add support for a Qemu/SH4 target. Unfortunately,
the URL above now returns a 404. Do you have this patch still available
somewhere ?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-11-07 18:28           ` Thomas Petazzoni
@ 2010-11-10 14:11             ` Phil Edworthy
  2010-11-14 22:09               ` trem
  0 siblings, 1 reply; 14+ messages in thread
From: Phil Edworthy @ 2010-11-10 14:11 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

> On Tue, 27 Jul 2010 22:16:11 +0000 (GMT)
> Philippe Reynes <tremyfr@yahoo.fr> wrote:
> 
> > I've done a new version of the sh4 patch, you could find it her:
> > http://ryu.zarb.org/~trem/buildroot/0001-Add-a-qemu-device-target-sh4-
> r2d.patch
That url works fine for me, though I haven't tried the patch itself.

Thanks
Phil

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-11-10 14:11             ` Phil Edworthy
@ 2010-11-14 22:09               ` trem
  2010-11-15 22:26                 ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: trem @ 2010-11-14 22:09 UTC (permalink / raw)
  To: buildroot

On 11/10/2010 03:11 PM, Phil Edworthy wrote:
> Hi Thomas,
>
>    
>> On Tue, 27 Jul 2010 22:16:11 +0000 (GMT)
>> Philippe Reynes<tremyfr@yahoo.fr>  wrote:
>>
>>      
>>> I've done a new version of the sh4 patch, you could find it her:
>>> http://ryu.zarb.org/~trem/buildroot/0001-Add-a-qemu-device-target-sh4-
>>>        
>> r2d.patch
>>      
> That url works fine for me, though I haven't tried the patch itself.
>
> Thanks
> Phil
>    
Hi all

I've done a new version of the patch based on branch boards-cleanup
of git://git.busybox.net/~tpetazzoni/git/buildroot

This new patch could be find here :
http://ryu.zarb.org/~trem/buildroot/0002-Add-a-qemu-device-target-sh4-r2d.patch

regards,
trem

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-11-14 22:09               ` trem
@ 2010-11-15 22:26                 ` Thomas Petazzoni
  2010-11-28 20:07                   ` trem
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-11-15 22:26 UTC (permalink / raw)
  To: buildroot

On Sun, 14 Nov 2010 23:09:03 +0100
trem <tremyfr@yahoo.fr> wrote:

> I've done a new version of the patch based on branch boards-cleanup
> of git://git.busybox.net/~tpetazzoni/git/buildroot
> 
> This new patch could be find here :
> http://ryu.zarb.org/~trem/buildroot/0002-Add-a-qemu-device-target-sh4-r2d.patch

This patch does not follow completely the "new" way of adding board
support in Buildroot:

 * The kernel configuration file should have been saved using "make
   savedefconfig" in your kernel directory, so as to have a minimal
   defconfig instead of this huge defconfig.

 * Similarly, the Buildroot configuration file should have been saved
   using "make savedefconfig" in your Buildroot directory.

With this, instead of having several tens of kilobytes of configuration
files, you'll have only a few hundred bytes of configuration.

Thanks !

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] buildroot and sh4
  2010-11-15 22:26                 ` Thomas Petazzoni
@ 2010-11-28 20:07                   ` trem
  0 siblings, 0 replies; 14+ messages in thread
From: trem @ 2010-11-28 20:07 UTC (permalink / raw)
  To: buildroot

On 11/15/2010 11:26 PM, Thomas Petazzoni wrote:
> On Sun, 14 Nov 2010 23:09:03 +0100
> trem<tremyfr@yahoo.fr>  wrote:
>
>    
>> I've done a new version of the patch based on branch boards-cleanup
>> of git://git.busybox.net/~tpetazzoni/git/buildroot
>>
>> This new patch could be find here :
>> http://ryu.zarb.org/~trem/buildroot/0002-Add-a-qemu-device-target-sh4-r2d.patch
>>      
> This patch does not follow completely the "new" way of adding board
> support in Buildroot:
>
>   * The kernel configuration file should have been saved using "make
>     savedefconfig" in your kernel directory, so as to have a minimal
>     defconfig instead of this huge defconfig.
>
>   * Similarly, the Buildroot configuration file should have been saved
>     using "make savedefconfig" in your Buildroot directory.
>
> With this, instead of having several tens of kilobytes of configuration
> files, you'll have only a few hundred bytes of configuration.
>
> Thanks !
>
> Thomas
>    
Hi

I've done a new version of the patch based on 
git://git.busybox.net/~tpetazzoni/git/buildroot
branch remotes/origin/for-2011.02/boards-cleanup.

The buildroot config and the kernel config use a defconf, so it's very 
small.

This patch could be found here : http://ryu.zarb.org/~trem/buildroot/

regards,
Philippe

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-11-28 20:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03 22:08 [Buildroot] buildroot and sh4 Philippe Reynes
2010-06-04  7:36 ` Thomas Petazzoni
2010-06-04  8:39   ` Pierre Ficheux
2010-06-04  9:17     ` Thomas Petazzoni
2010-06-04 10:37   ` Peter Korsgaard
2010-06-04 22:12   ` Philippe Reynes
2010-06-07  9:14     ` Phil Edworthy
2010-07-03 10:52       ` Philippe Reynes
2010-07-27 22:16         ` Philippe Reynes
2010-11-07 18:28           ` Thomas Petazzoni
2010-11-10 14:11             ` Phil Edworthy
2010-11-14 22:09               ` trem
2010-11-15 22:26                 ` Thomas Petazzoni
2010-11-28 20:07                   ` trem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox