* [Buildroot] Building For Host as Target
@ 2012-05-03 15:14 Assaf Inbal
2012-05-03 16:14 ` Thomas Petazzoni
2012-05-03 18:08 ` Baruch Siach
0 siblings, 2 replies; 7+ messages in thread
From: Assaf Inbal @ 2012-05-03 15:14 UTC (permalink / raw)
To: buildroot
Hey,
I'm working on a project based on buildroot and I want to have the ability
to compile my packages for both my MIPS target using an external toolchain
(which works great) but I also want to be able to compile for my host.
To be precise, I want to use the local gcc and libraries so I will be able
to run my packages locally as well.
I've tried setting an external toolchain path as "/usr" but as a part of
preparing the target file system everything from my /lib,/etc and others
are copied to the output directory, which is, well, bad.
I've also toyed with creating a fake toolchain that was basically links to
the host's binaries but that also didn't go very well.
Does anyone have an idea on how I might be able to achieve this?
Thanks,
Shmuelzon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120503/f6004519/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Building For Host as Target
2012-05-03 15:14 [Buildroot] Building For Host as Target Assaf Inbal
@ 2012-05-03 16:14 ` Thomas Petazzoni
2012-05-03 20:14 ` Assaf Inbal
2012-05-03 18:08 ` Baruch Siach
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2012-05-03 16:14 UTC (permalink / raw)
To: buildroot
Le Thu, 3 May 2012 18:14:49 +0300,
Assaf Inbal <shmuelzon@gmail.com> a ?crit :
> I'm working on a project based on buildroot and I want to have the
> ability to compile my packages for both my MIPS target using an
> external toolchain (which works great) but I also want to be able to
> compile for my host. To be precise, I want to use the local gcc and
> libraries so I will be able to run my packages locally as well.
> I've tried setting an external toolchain path as "/usr" but as a part
> of preparing the target file system everything from my /lib,/etc and
> others are copied to the output directory, which is, well, bad.
>
> I've also toyed with creating a fake toolchain that was basically
> links to the host's binaries but that also didn't go very well.
>
> Does anyone have an idea on how I might be able to achieve this?
If it's only for a reduced set of packages, you can implement the host
variant of those packages. They will be built with the native compiler
of your build machine, and will be installed in output/host.
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] 7+ messages in thread
* [Buildroot] Building For Host as Target
2012-05-03 15:14 [Buildroot] Building For Host as Target Assaf Inbal
2012-05-03 16:14 ` Thomas Petazzoni
@ 2012-05-03 18:08 ` Baruch Siach
2012-05-03 20:08 ` Assaf Inbal
1 sibling, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2012-05-03 18:08 UTC (permalink / raw)
To: buildroot
Hi Assaf,
On Thu, May 03, 2012 at 06:14:49PM +0300, Assaf Inbal wrote:
> I'm working on a project based on buildroot and I want to have the ability
> to compile my packages for both my MIPS target using an external toolchain
> (which works great) but I also want to be able to compile for my host.
> To be precise, I want to use the local gcc and libraries so I will be able
> to run my packages locally as well.
> I've tried setting an external toolchain path as "/usr" but as a part of
> preparing the target file system everything from my /lib,/etc and others
> are copied to the output directory, which is, well, bad.
>
> I've also toyed with creating a fake toolchain that was basically links to
> the host's binaries but that also didn't go very well.
>
> Does anyone have an idea on how I might be able to achieve this?
It seems to me that the easiest way is to select either i386 or x86_64 as
target architecture (assuming that your host is a PC, we have recently
discovered that this is not always the case), and run the result in a chroot,
or in a virtualized system, on your development host. For a ready made qemu
example see board/qemu/x86/readme.txt.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Building For Host as Target
2012-05-03 18:08 ` Baruch Siach
@ 2012-05-03 20:08 ` Assaf Inbal
0 siblings, 0 replies; 7+ messages in thread
From: Assaf Inbal @ 2012-05-03 20:08 UTC (permalink / raw)
To: buildroot
Hey Baruch,
I've already thought of this solution, but there are a couple of problems
by doing so. First, I only use buildroot's architecture for downloading,
patching, compiling and wrapping. I've removed everything else so I don't
prepare a full file system and so can't chroot into it. The other issue is
that one of my packages controls a USB device so that might also cause me
some issues.
Thanks
On 3 ???? 2012, at 21:09, Baruch Siach <baruch@tkos.co.il> wrote:
Hi Assaf,
On Thu, May 03, 2012 at 06:14:49PM +0300, Assaf Inbal wrote:
I'm working on a project based on buildroot and I want to have the ability
to compile my packages for both my MIPS target using an external toolchain
(which works great) but I also want to be able to compile for my host.
To be precise, I want to use the local gcc and libraries so I will be able
to run my packages locally as well.
I've tried setting an external toolchain path as "/usr" but as a part of
preparing the target file system everything from my /lib,/etc and others
are copied to the output directory, which is, well, bad.
I've also toyed with creating a fake toolchain that was basically links to
the host's binaries but that also didn't go very well.
Does anyone have an idea on how I might be able to achieve this?
It seems to me that the easiest way is to select either i386 or x86_64 as
target architecture (assuming that your host is a PC, we have recently
discovered that this is not always the case), and run the result in a
chroot,
or in a virtualized system, on your development host. For a ready made qemu
example see board/qemu/x86/readme.txt.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120503/7da860ef/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Building For Host as Target
2012-05-03 16:14 ` Thomas Petazzoni
@ 2012-05-03 20:14 ` Assaf Inbal
2012-05-03 21:17 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Assaf Inbal @ 2012-05-03 20:14 UTC (permalink / raw)
To: buildroot
Hey,
While host variants will run, it means that I still need to compile for
some target platform. The output in the host directory will also include
many other things not needed. Unless someone will come up with a better
idea, I'm considering creating a new toolchain type (along side with
buildroot and "external"). If I'll be pleased with the result I'll post a
patch.
Thanks
On 3 ???? 2012, at 19:14, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
Le Thu, 3 May 2012 18:14:49 +0300,
Assaf Inbal <shmuelzon@gmail.com> a ?crit :
I'm working on a project based on buildroot and I want to have the
ability to compile my packages for both my MIPS target using an
external toolchain (which works great) but I also want to be able to
compile for my host. To be precise, I want to use the local gcc and
libraries so I will be able to run my packages locally as well.
I've tried setting an external toolchain path as "/usr" but as a part
of preparing the target file system everything from my /lib,/etc and
others are copied to the output directory, which is, well, bad.
I've also toyed with creating a fake toolchain that was basically
links to the host's binaries but that also didn't go very well.
Does anyone have an idea on how I might be able to achieve this?
If it's only for a reduced set of packages, you can implement the host
variant of those packages. They will be built with the native compiler
of your build machine, and will be installed in output/host.
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/20120503/3a8f9e08/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Building For Host as Target
2012-05-03 20:14 ` Assaf Inbal
@ 2012-05-03 21:17 ` Thomas Petazzoni
2012-05-03 22:18 ` Assaf Inbal
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2012-05-03 21:17 UTC (permalink / raw)
To: buildroot
Le Thu, 3 May 2012 23:14:30 +0300,
Assaf Inbal <shmuelzon@gmail.com> a ?crit :
> While host variants will run, it means that I still need to compile
> for some target platform. The output in the host directory will also
> include many other things not needed. Unless someone will come up
> with a better idea, I'm considering creating a new toolchain type
> (along side with buildroot and "external"). If I'll be pleased with
> the result I'll post a patch.
I am really not sure to understand what your use case is. The principle
of Buildroot is to generate an embedded Linux for a target platform
that has a different CPU architecture than the build platform, and
Buildroot uses cross-compilation to achieve this. If you're outside
this basic principle of Buildroot, I would probably say that Buildroot
isn't the right tool for the job you're trying to do.
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] 7+ messages in thread
* [Buildroot] Building For Host as Target
2012-05-03 21:17 ` Thomas Petazzoni
@ 2012-05-03 22:18 ` Assaf Inbal
0 siblings, 0 replies; 7+ messages in thread
From: Assaf Inbal @ 2012-05-03 22:18 UTC (permalink / raw)
To: buildroot
Hey,
Perhaps I didn't do a very good job of explaining what I'm after so I'll
try to do just that:
While it's true that buildroot, as is, was meant to compile an entire Linux
for embedded, it also provides other functionality. The functionality I was
after for my project was the ability to generate one large framework built
from many independent packages. Buildroot does just that. It's scalable,
package oriented with dependancies, caches downloaded packages and other
functionalities.
The project I'm working on is meant to be run on an embedded Linux platform
for which I don't build the entire file system, I received it with one I
must use, but just add my program and extra libraries needed.
For that reason I've removed the kernel and file system skeleton from build
root and a few other things from build root.
Now, after I've successfully set up everything and was able to compile the
libraries I need and a sample application using an external toolchain, I
also want to be able to build and develop on my pc since it's easier than
the target platform.
So, if build root would have the option to set the target platform the same
as the host, then all my problems would be solved.
Thanks
On 4 ???? 2012, at 00:17, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
Le Thu, 3 May 2012 23:14:30 +0300,
Assaf Inbal <shmuelzon@gmail.com> a ?crit :
While host variants will run, it means that I still need to compile
for some target platform. The output in the host directory will also
include many other things not needed. Unless someone will come up
with a better idea, I'm considering creating a new toolchain type
(along side with buildroot and "external"). If I'll be pleased with
the result I'll post a patch.
I am really not sure to understand what your use case is. The principle
of Buildroot is to generate an embedded Linux for a target platform
that has a different CPU architecture than the build platform, and
Buildroot uses cross-compilation to achieve this. If you're outside
this basic principle of Buildroot, I would probably say that Buildroot
isn't the right tool for the job you're trying to do.
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/20120504/ecfec3a1/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-05-03 22:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 15:14 [Buildroot] Building For Host as Target Assaf Inbal
2012-05-03 16:14 ` Thomas Petazzoni
2012-05-03 20:14 ` Assaf Inbal
2012-05-03 21:17 ` Thomas Petazzoni
2012-05-03 22:18 ` Assaf Inbal
2012-05-03 18:08 ` Baruch Siach
2012-05-03 20:08 ` Assaf Inbal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox