* [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript
@ 2014-05-01 23:13 Andrea Adami
2014-05-01 23:13 ` [meta-initramfs][PATCH] kexecboot: fix build when S != B Andrea Adami
2014-05-02 8:21 ` [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Richard Purdie
0 siblings, 2 replies; 6+ messages in thread
From: Andrea Adami @ 2014-05-01 23:13 UTC (permalink / raw)
To: openembedded-devel; +Cc: Richard Purdie
Klcc-cross is properly a crosscript so avoid to
inherit cross.bbclass and stage it in target sysroot
under usr/bin/crossscripts.
Minor adjustment is necessary for INSTALLDIR.
Finally some optional magic mangling is added to better match the perl syntax:
let it commented for future reference.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
.../recipes-devtools/klibc/klcc-cross_2.0.3.bb | 40 +++++++++++++---------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
index 7ff9c2e..5e767c1 100644
--- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
+++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
@@ -7,28 +7,34 @@ FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
SRC_URI += "file://use-env-for-perl.patch"
-inherit cross
-
# disable task already run in klibc recipe
do_configure[noexec] = "1"
+
do_compile() {
- oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc
+ oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc
}
-# The linux-libc-headers and klibc custom headers are not machine-specific
-# but are installed into machine sysroot.
-# Klcc wrapper is hardcoding some of these paths thus, to keep the recipe
-# arch-specific, we force the rebuild of klcc-cross for each machine.
-do_compile[vardeps] += "MACHINE"
+
do_install() {
- install -d ${D}${bindir}
- install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc
+ install -d ${D}${bindir_crossscripts}/
+ install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
+ # Insert an unencoded path as a comment to trigger the sstate renaming functions
+ sed -i '2i #${STAGING_DIR_TARGET}' ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
+}
+
+SYSROOT_PREPROCESS_FUNCS += "klcc_sysroot_preprocess"
+
+klcc_sysroot_preprocess () {
+ sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
}
+deltask do_package
+deltask do_packagedata
+deltask do_package_write_ipk
+deltask do_package_write_rpm
+deltask do_package_write_deb
+deltask do_package_write_tar
-# disable unneeded tasks
-do_package[noexec] = "1"
-do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_tar[noexec] = "1"
+SSTATE_SCAN_FILES = "*"
+#EXTRA_STAGING_FIXMES = "MANGLEDSTAGINGDIRTARGET MANGLEDSTAGINGDIR"
+#MANGLEDSTAGINGDIR = "${@d.getVar("STAGING_DIR", True).replace("/", "\\\\/").replace("-", "\\-")}"
+#MANGLEDSTAGINGDIRTARGET = "${@d.getVar("STAGING_DIR_TARGET", True).replace("/", "\\\\/").replace("-", "\\-")}"
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [meta-initramfs][PATCH] kexecboot: fix build when S != B
2014-05-01 23:13 [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Andrea Adami
@ 2014-05-01 23:13 ` Andrea Adami
2014-05-02 8:21 ` [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Richard Purdie
1 sibling, 0 replies; 6+ messages in thread
From: Andrea Adami @ 2014-05-01 23:13 UTC (permalink / raw)
To: openembedded-devel
* temporarily inherit autotools-brokensep
* proper fix sent upstream
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
index 4657505..d0176c5 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_0.6.bb
@@ -42,7 +42,7 @@ SRC_URI = "https://github.com/kexecboot/kexecboot/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "46b7c1a6f20531be56445ebb8669a2b8"
SRC_URI[sha256sum] = "6b360b8aa59bc5d68a96705349a0dd416f8ed704e931fa0ac7849298258f0f15"
-inherit autotools
+inherit autotools-brokensep
EXTRA_OECONF = "--enable-delay=2 --enable-evdev-rate=1000,250"
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript
2014-05-01 23:13 [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Andrea Adami
2014-05-01 23:13 ` [meta-initramfs][PATCH] kexecboot: fix build when S != B Andrea Adami
@ 2014-05-02 8:21 ` Richard Purdie
2014-05-02 8:34 ` Andrea Adami
1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-05-02 8:21 UTC (permalink / raw)
To: Andrea Adami; +Cc: openembedded-devel
On Fri, 2014-05-02 at 01:13 +0200, Andrea Adami wrote:
> Klcc-cross is properly a crosscript so avoid to
> inherit cross.bbclass and stage it in target sysroot
> under usr/bin/crossscripts.
> Minor adjustment is necessary for INSTALLDIR.
>
> Finally some optional magic mangling is added to better match the perl syntax:
> let it commented for future reference.
Why is this commented? Its not optional and the recipe will not work
properly without that change.
Cheers,
Richard
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
> ---
> .../recipes-devtools/klibc/klcc-cross_2.0.3.bb | 40 +++++++++++++---------
> 1 file changed, 23 insertions(+), 17 deletions(-)
>
> diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
> index 7ff9c2e..5e767c1 100644
> --- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
> +++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
> @@ -7,28 +7,34 @@ FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
>
> SRC_URI += "file://use-env-for-perl.patch"
>
> -inherit cross
> -
> # disable task already run in klibc recipe
> do_configure[noexec] = "1"
> +
> do_compile() {
> - oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc
> + oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc
> }
> -# The linux-libc-headers and klibc custom headers are not machine-specific
> -# but are installed into machine sysroot.
> -# Klcc wrapper is hardcoding some of these paths thus, to keep the recipe
> -# arch-specific, we force the rebuild of klcc-cross for each machine.
> -do_compile[vardeps] += "MACHINE"
> +
> do_install() {
> - install -d ${D}${bindir}
> - install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc
> + install -d ${D}${bindir_crossscripts}/
> + install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
> + # Insert an unencoded path as a comment to trigger the sstate renaming functions
> + sed -i '2i #${STAGING_DIR_TARGET}' ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
> +}
> +
> +SYSROOT_PREPROCESS_FUNCS += "klcc_sysroot_preprocess"
> +
> +klcc_sysroot_preprocess () {
> + sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
> }
>
> +deltask do_package
> +deltask do_packagedata
> +deltask do_package_write_ipk
> +deltask do_package_write_rpm
> +deltask do_package_write_deb
> +deltask do_package_write_tar
>
> -# disable unneeded tasks
> -do_package[noexec] = "1"
> -do_packagedata[noexec] = "1"
> -do_package_write_ipk[noexec] = "1"
> -do_package_write_rpm[noexec] = "1"
> -do_package_write_deb[noexec] = "1"
> -do_package_write_tar[noexec] = "1"
> +SSTATE_SCAN_FILES = "*"
> +#EXTRA_STAGING_FIXMES = "MANGLEDSTAGINGDIRTARGET MANGLEDSTAGINGDIR"
> +#MANGLEDSTAGINGDIR = "${@d.getVar("STAGING_DIR", True).replace("/", "\\\\/").replace("-", "\\-")}"
> +#MANGLEDSTAGINGDIRTARGET = "${@d.getVar("STAGING_DIR_TARGET", True).replace("/", "\\\\/").replace("-", "\\-")}"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript
2014-05-02 8:21 ` [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Richard Purdie
@ 2014-05-02 8:34 ` Andrea Adami
2014-05-02 8:38 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Andrea Adami @ 2014-05-02 8:34 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembeded-devel
On Fri, May 2, 2014 at 10:21 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2014-05-02 at 01:13 +0200, Andrea Adami wrote:
>> Klcc-cross is properly a crosscript so avoid to
>> inherit cross.bbclass and stage it in target sysroot
>> under usr/bin/crossscripts.
>> Minor adjustment is necessary for INSTALLDIR.
>>
>> Finally some optional magic mangling is added to better match the perl syntax:
>> let it commented for future reference.
>
> Why is this commented? Its not optional and the recipe will not work
> properly without that change.
>
> Cheers,
>
> Richard
Richard,
I probably misunderstand that part.
I could not see any difference in the produced klcc.cross scripts with
or without the mangling.
Tested runtime on 3 machines.
What I did not yet try is a rebuild from sstate but I expect it to be rebuilt.
Will send a patch v2.
Thanks
Andrea
>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
>> ---
>> .../recipes-devtools/klibc/klcc-cross_2.0.3.bb | 40 +++++++++++++---------
>> 1 file changed, 23 insertions(+), 17 deletions(-)
>>
>> diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
>> index 7ff9c2e..5e767c1 100644
>> --- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
>> +++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb
>> @@ -7,28 +7,34 @@ FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
>>
>> SRC_URI += "file://use-env-for-perl.patch"
>>
>> -inherit cross
>> -
>> # disable task already run in klibc recipe
>> do_configure[noexec] = "1"
>> +
>> do_compile() {
>> - oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc
>> + oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc
>> }
>> -# The linux-libc-headers and klibc custom headers are not machine-specific
>> -# but are installed into machine sysroot.
>> -# Klcc wrapper is hardcoding some of these paths thus, to keep the recipe
>> -# arch-specific, we force the rebuild of klcc-cross for each machine.
>> -do_compile[vardeps] += "MACHINE"
>> +
>> do_install() {
>> - install -d ${D}${bindir}
>> - install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc
>> + install -d ${D}${bindir_crossscripts}/
>> + install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
>> + # Insert an unencoded path as a comment to trigger the sstate renaming functions
>> + sed -i '2i #${STAGING_DIR_TARGET}' ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
>> +}
>> +
>> +SYSROOT_PREPROCESS_FUNCS += "klcc_sysroot_preprocess"
>> +
>> +klcc_sysroot_preprocess () {
>> + sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
>> }
>>
>> +deltask do_package
>> +deltask do_packagedata
>> +deltask do_package_write_ipk
>> +deltask do_package_write_rpm
>> +deltask do_package_write_deb
>> +deltask do_package_write_tar
>>
>> -# disable unneeded tasks
>> -do_package[noexec] = "1"
>> -do_packagedata[noexec] = "1"
>> -do_package_write_ipk[noexec] = "1"
>> -do_package_write_rpm[noexec] = "1"
>> -do_package_write_deb[noexec] = "1"
>> -do_package_write_tar[noexec] = "1"
>> +SSTATE_SCAN_FILES = "*"
>> +#EXTRA_STAGING_FIXMES = "MANGLEDSTAGINGDIRTARGET MANGLEDSTAGINGDIR"
>> +#MANGLEDSTAGINGDIR = "${@d.getVar("STAGING_DIR", True).replace("/", "\\\\/").replace("-", "\\-")}"
>> +#MANGLEDSTAGINGDIRTARGET = "${@d.getVar("STAGING_DIR_TARGET", True).replace("/", "\\\\/").replace("-", "\\-")}"
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript
2014-05-02 8:34 ` Andrea Adami
@ 2014-05-02 8:38 ` Richard Purdie
2014-05-02 8:45 ` Andrea Adami
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-05-02 8:38 UTC (permalink / raw)
To: Andrea Adami; +Cc: openembeded-devel
On Fri, 2014-05-02 at 10:34 +0200, Andrea Adami wrote:
> I probably misunderstand that part.
>
> I could not see any difference in the produced klcc.cross scripts with
> or without the mangling.
> Tested runtime on 3 machines.
> What I did not yet try is a rebuild from sstate but I expect it to be rebuilt.
The easy way to reproduce a problem is to build for MACHINE=A and then
build for MACHINE=B where the two machines have the same architecture.
You will find that whilst it will switch the commented line at the top
to refer to the new machine, the encoded lines do not get changed.
You would also find that if you run a build in dirA, then a build in
dirB using the sstate cache from dirA, the paths would reference dirA,
not dirB. After this change they will reference dirB.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript
2014-05-02 8:38 ` Richard Purdie
@ 2014-05-02 8:45 ` Andrea Adami
0 siblings, 0 replies; 6+ messages in thread
From: Andrea Adami @ 2014-05-02 8:45 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembeded-devel
On Fri, May 2, 2014 at 10:38 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2014-05-02 at 10:34 +0200, Andrea Adami wrote:
>> I probably misunderstand that part.
>>
>> I could not see any difference in the produced klcc.cross scripts with
>> or without the mangling.
>> Tested runtime on 3 machines.
>> What I did not yet try is a rebuild from sstate but I expect it to be rebuilt.
>
> The easy way to reproduce a problem is to build for MACHINE=A and then
> build for MACHINE=B where the two machines have the same architecture.
> You will find that whilst it will switch the commented line at the top
> to refer to the new machine, the encoded lines do not get changed.
>
I did exactly build for c7x0 and poodle, two armv5te, and armv4 collie.
The 2nd line *and* the furter references to prefix et.al. were
apparently correct.
I'll retest.
> You would also find that if you run a build in dirA, then a build in
> dirB using the sstate cache from dirA, the paths would reference dirA,
> not dirB. After this change they will reference dirB.
>
Ah, I was fully unaware of that ! I'm not reusing the sstate cache.
> Cheers,
>
> Richard
>
Thanks
Andrea
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-02 8:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 23:13 [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Andrea Adami
2014-05-01 23:13 ` [meta-initramfs][PATCH] kexecboot: fix build when S != B Andrea Adami
2014-05-02 8:21 ` [meta-initramfs][PATCH] klcc_cross: move in target sysroot as crosscript Richard Purdie
2014-05-02 8:34 ` Andrea Adami
2014-05-02 8:38 ` Richard Purdie
2014-05-02 8:45 ` Andrea Adami
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.