* [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation
@ 2010-08-09 6:44 Khem Raj
2010-08-09 11:12 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2010-08-09 6:44 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
classes/cross.bbclass | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index cf14db1..64f7902 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -50,6 +50,14 @@ exec_prefix = "${prefix}"
base_sbindir = "${base_prefix}/bin"
sbindir = "${exec_prefix}/bin"
+# staging should be special for cross
+STAGING_BINDIR = "${bindir}"
+STAGING_LIBDIR = "${libdir}"
+STAGING_INCDIR = "${includedir}"
+STAGING_ETCDIR = "${sysconfdir}"
+STAGING_DATADIR = "${datadir}"
+STAGING_SBINDIR = "${sbindir}"
+
do_install () {
oe_runmake 'DESTDIR=${D}' install
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation
2010-08-09 6:44 [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation Khem Raj
@ 2010-08-09 11:12 ` Richard Purdie
2010-08-09 15:48 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2010-08-09 11:12 UTC (permalink / raw)
To: openembedded-devel
Hi Khem,
On Sun, 2010-08-08 at 23:44 -0700, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> classes/cross.bbclass | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/classes/cross.bbclass b/classes/cross.bbclass
> index cf14db1..64f7902 100644
> --- a/classes/cross.bbclass
> +++ b/classes/cross.bbclass
> @@ -50,6 +50,14 @@ exec_prefix = "${prefix}"
> base_sbindir = "${base_prefix}/bin"
> sbindir = "${exec_prefix}/bin"
>
> +# staging should be special for cross
> +STAGING_BINDIR = "${bindir}"
> +STAGING_LIBDIR = "${libdir}"
> +STAGING_INCDIR = "${includedir}"
> +STAGING_ETCDIR = "${sysconfdir}"
> +STAGING_DATADIR = "${datadir}"
> +STAGING_SBINDIR = "${sbindir}"
> +
> do_install () {
> oe_runmake 'DESTDIR=${D}' install
> }
Can you explain a bit more about why is this needed?
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation
2010-08-09 11:12 ` Richard Purdie
@ 2010-08-09 15:48 ` Khem Raj
2010-08-10 14:53 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2010-08-09 15:48 UTC (permalink / raw)
To: openembedded-devel
On Mon, Aug 9, 2010 at 4:12 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> Hi Khem,
>
> On Sun, 2010-08-08 at 23:44 -0700, Khem Raj wrote:
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> classes/cross.bbclass | 8 ++++++++
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/classes/cross.bbclass b/classes/cross.bbclass
>> index cf14db1..64f7902 100644
>> --- a/classes/cross.bbclass
>> +++ b/classes/cross.bbclass
>> @@ -50,6 +50,14 @@ exec_prefix = "${prefix}"
>> base_sbindir = "${base_prefix}/bin"
>> sbindir = "${exec_prefix}/bin"
>>
>> +# staging should be special for cross
>> +STAGING_BINDIR = "${bindir}"
>> +STAGING_LIBDIR = "${libdir}"
>> +STAGING_INCDIR = "${includedir}"
>> +STAGING_ETCDIR = "${sysconfdir}"
>> +STAGING_DATADIR = "${datadir}"
>> +STAGING_SBINDIR = "${sbindir}"
>> +
>> do_install () {
>> oe_runmake 'DESTDIR=${D}' install
>> }
>
> Can you explain a bit more about why is this needed?
yes. for cross packages prefix is set in cross.bbclass to be
${base_prefix}${prefix_native}/${BASE_PACKAGE_ARCH}
which already points into native sysroot and bindir, datadir etc are
defined based on prefix in bitbake.conf so
for cross packages datadir already points to where it is in the final
install location of the cross packages.
but STAGING_* dirs are then defined like below
STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
where
STAGING_DIR_HOST expands to <native sysroot> in the case of cross
packages because for them BASEPKG_HOST_SYS
is the build system itself. I think this is a the reason why we have
NATIVE_STAGING_* vars defined separately.
probably we should have the same set defined for cross too may be
something like CROSS_STAGING_* is one solution.
and now all these STAGING_* defines create another native sysroot
directory insise the existing one.
so I get /scratch/oe/sysroot/x86_64-linux/scrarch/oe/sysroot/x86_64-linux/usr/armv5te/shared/
etc. paths while
building binutils-cross
because STAGING_* variables are used in autotools.bbclass
Thats why this patch
Thanks
-Khem
>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation
2010-08-09 15:48 ` Khem Raj
@ 2010-08-10 14:53 ` Richard Purdie
2010-08-10 18:19 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2010-08-10 14:53 UTC (permalink / raw)
To: openembedded-devel
On Mon, 2010-08-09 at 08:48 -0700, Khem Raj wrote:
> On Mon, Aug 9, 2010 at 4:12 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> > Hi Khem,
> >
> > On Sun, 2010-08-08 at 23:44 -0700, Khem Raj wrote:
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >> classes/cross.bbclass | 8 ++++++++
> >> 1 files changed, 8 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/classes/cross.bbclass b/classes/cross.bbclass
> >> index cf14db1..64f7902 100644
> >> --- a/classes/cross.bbclass
> >> +++ b/classes/cross.bbclass
> >> @@ -50,6 +50,14 @@ exec_prefix = "${prefix}"
> >> base_sbindir = "${base_prefix}/bin"
> >> sbindir = "${exec_prefix}/bin"
> >>
> >> +# staging should be special for cross
> >> +STAGING_BINDIR = "${bindir}"
> >> +STAGING_LIBDIR = "${libdir}"
> >> +STAGING_INCDIR = "${includedir}"
> >> +STAGING_ETCDIR = "${sysconfdir}"
> >> +STAGING_DATADIR = "${datadir}"
> >> +STAGING_SBINDIR = "${sbindir}"
> >> +
> >> do_install () {
> >> oe_runmake 'DESTDIR=${D}' install
> >> }
> >
> > Can you explain a bit more about why is this needed?
>
> yes. for cross packages prefix is set in cross.bbclass to be
> ${base_prefix}${prefix_native}/${BASE_PACKAGE_ARCH}
> which already points into native sysroot and bindir, datadir etc are
> defined based on prefix in bitbake.conf so
> for cross packages datadir already points to where it is in the final
> install location of the cross packages.
>
> but STAGING_* dirs are then defined like below
>
> STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
> STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
>
> where
> STAGING_DIR_HOST expands to <native sysroot> in the case of cross
> packages because for them BASEPKG_HOST_SYS
> is the build system itself. I think this is a the reason why we have
> NATIVE_STAGING_* vars defined separately.
> probably we should have the same set defined for cross too may be
> something like CROSS_STAGING_* is one solution.
>
> and now all these STAGING_* defines create another native sysroot
> directory insise the existing one.
> so I get /scratch/oe/sysroot/x86_64-linux/scrarch/oe/sysroot/x86_64-linux/usr/armv5te/shared/
> etc. paths while
> building binutils-cross
>
> because STAGING_* variables are used in autotools.bbclass
>
> Thats why this patch
So the problem is empty directory creation?
I'm tempted to suggest a more radical approach of not having all these
directories created by autotools.bbclass...
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation
2010-08-10 14:53 ` Richard Purdie
@ 2010-08-10 18:19 ` Khem Raj
0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2010-08-10 18:19 UTC (permalink / raw)
To: openembedded-devel
On Tue, Aug 10, 2010 at 7:53 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> On Mon, 2010-08-09 at 08:48 -0700, Khem Raj wrote:
>> On Mon, Aug 9, 2010 at 4:12 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
>> > Hi Khem,
>> >
>> > On Sun, 2010-08-08 at 23:44 -0700, Khem Raj wrote:
>> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >> ---
>> >> classes/cross.bbclass | 8 ++++++++
>> >> 1 files changed, 8 insertions(+), 0 deletions(-)
>> >>
>> >> diff --git a/classes/cross.bbclass b/classes/cross.bbclass
>> >> index cf14db1..64f7902 100644
>> >> --- a/classes/cross.bbclass
>> >> +++ b/classes/cross.bbclass
>> >> @@ -50,6 +50,14 @@ exec_prefix = "${prefix}"
>> >> base_sbindir = "${base_prefix}/bin"
>> >> sbindir = "${exec_prefix}/bin"
>> >>
>> >> +# staging should be special for cross
>> >> +STAGING_BINDIR = "${bindir}"
>> >> +STAGING_LIBDIR = "${libdir}"
>> >> +STAGING_INCDIR = "${includedir}"
>> >> +STAGING_ETCDIR = "${sysconfdir}"
>> >> +STAGING_DATADIR = "${datadir}"
>> >> +STAGING_SBINDIR = "${sbindir}"
>> >> +
>> >> do_install () {
>> >> oe_runmake 'DESTDIR=${D}' install
>> >> }
>> >
>> > Can you explain a bit more about why is this needed?
>>
>> yes. for cross packages prefix is set in cross.bbclass to be
>> ${base_prefix}${prefix_native}/${BASE_PACKAGE_ARCH}
>> which already points into native sysroot and bindir, datadir etc are
>> defined based on prefix in bitbake.conf so
>> for cross packages datadir already points to where it is in the final
>> install location of the cross packages.
>>
>> but STAGING_* dirs are then defined like below
>>
>> STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
>> STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
>>
>> where
>> STAGING_DIR_HOST expands to <native sysroot> in the case of cross
>> packages because for them BASEPKG_HOST_SYS
>> is the build system itself. I think this is a the reason why we have
>> NATIVE_STAGING_* vars defined separately.
>> probably we should have the same set defined for cross too may be
>> something like CROSS_STAGING_* is one solution.
>>
>> and now all these STAGING_* defines create another native sysroot
>> directory insise the existing one.
>> so I get /scratch/oe/sysroot/x86_64-linux/scrarch/oe/sysroot/x86_64-linux/usr/armv5te/shared/
>> etc. paths while
>> building binutils-cross
>>
>> because STAGING_* variables are used in autotools.bbclass
>>
>> Thats why this patch
>
> So the problem is empty directory creation?
yes.
>
> I'm tempted to suggest a more radical approach of not having all these
> directories created by autotools.bbclass...
thats a good idea I can look into it.
yeah this patch actually will need another patch in crosssdk.bbclass.
Actually STAGING_DIR is a bit confusing when it comes to cross and sdk
packages.
May be we should have STAGING_DIR_{CROSS|NATIVE|SDK|NATIVESDK|TARGET}
all defined and used appropriately. right now the STAGING_DIR_HOST and
these various STAGING_DIR_* defines get it very confusing.
>
> Cheers,
>
> Richard
>
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-10 18:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 6:44 [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation Khem Raj
2010-08-09 11:12 ` Richard Purdie
2010-08-09 15:48 ` Khem Raj
2010-08-10 14:53 ` Richard Purdie
2010-08-10 18:19 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.