diff mbox

grub git: workaround debugedit problems for 64 bit targets

Message ID 1389780926-20901-1-git-send-email-koen.kooi@linaro.org
State New
Headers show

Commit Message

Koen Kooi Jan. 15, 2014, 10:15 a.m. UTC
I've limited it to 64bit targets, but to be honest debug splitting doesn't make sense for grub since it won't run in your rootfs and attaching gdb is pretty much impossible.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
 meta/recipes-bsp/grub/grub_git.bb | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Koen Kooi Jan. 16, 2014, 9:27 a.m. UTC | #1
On 01/15/2014 12:22 PM, Otavio Salvador wrote:
>
>
>
> On Wed, Jan 15, 2014 at 8:15 AM, Koen Kooi <koen.kooi@linaro.org
> <mailto:koen.kooi@linaro.org>> wrote:
>
>     I've limited it to 64bit targets, but to be honest debug splitting
>     doesn't make sense for grub since it won't run in your rootfs and
>     attaching gdb is pretty much impossible.
>
>     Signed-off-by: Koen Kooi <koen.kooi@linaro.org
>     <mailto:koen.kooi@linaro.org>>
>
>
> I'd prefer to remove the debug systems than skip the split. What others
> think?

I'm not sure what you mean by that, do you mean using 
INHIBIT_PACKAGE_STRIP or something else?

regards,

Koen

>
>     ---
>       meta/recipes-bsp/grub/grub_git.bb <http://grub_git.bb> | 5 +++++
>       1 file changed, 5 insertions(+)
>
>     diff --git a/meta/recipes-bsp/grub/grub_git.bb <http://grub_git.bb>
>     b/meta/recipes-bsp/grub/grub_git.bb <http://grub_git.bb>
>     index 1796e7f..bc79cfa 100644
>     --- a/meta/recipes-bsp/grub/grub_git.bb <http://grub_git.bb>
>     +++ b/meta/recipes-bsp/grub/grub_git.bb <http://grub_git.bb>
>     @@ -51,8 +51,13 @@ do_configure_prepend() {
>       do_install_append () {
>           install -d ${D}${sysconfdir}/grub.d
>           install -m 0755 ${WORKDIR}/40_custom
>     ${D}${sysconfdir}/grub.d/40_custom
>     +
>       }
>
>
> Please remove this.
>
>     +# debugedit chokes on 64 bit platforms
>     +INHIBIT_PACKAGE_DEBUG_SPLIT_aarch64 = "1"
>     +INHIBIT_PACKAGE_DEBUG_SPLIT_x86-64 = "1"
>     +
>       RDEPENDS_${PN} = "diffutils freetype"
>       FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
>
>     --
>     1.8.4.2
>
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Koen Kooi Jan. 16, 2014, 10:46 a.m. UTC | #2
Op 16 jan. 2014, om 11:38 heeft Otavio Salvador <otavio@ossystems.com.br> het volgende geschreven:

> 
> 
> 
> On Thu, Jan 16, 2014 at 7:27 AM, Koen Kooi <koen.kooi@linaro.org> wrote:
> On 01/15/2014 12:22 PM, Otavio Salvador wrote:
> 
> 
> 
> On Wed, Jan 15, 2014 at 8:15 AM, Koen Kooi <koen.kooi@linaro.org
> <mailto:koen.kooi@linaro.org>> wrote:
> 
>     I've limited it to 64bit targets, but to be honest debug splitting
>     doesn't make sense for grub since it won't run in your rootfs and
>     attaching gdb is pretty much impossible.
> 
>     Signed-off-by: Koen Kooi <koen.kooi@linaro.org
>     <mailto:koen.kooi@linaro.org>>
> 
> 
> 
> I'd prefer to remove the debug systems than skip the split. What others
> think?
> 
> I'm not sure what you mean by that, do you mean using INHIBIT_PACKAGE_STRIP or something else?
> 
> 
> Yes and be sure it has been stripped during build.

That seems to be a lot more work for the same effect. Stripping isn't the problem, it's debugedit trying to do its magic that fails.

regards,

Koen
Koen Kooi Jan. 21, 2014, 9:40 a.m. UTC | #3
On 01/16/2014 11:47 AM, Otavio Salvador wrote:
> On Thu, Jan 16, 2014 at 8:46 AM, Koen Kooi <koen.kooi@linaro.org
> <mailto:koen.kooi@linaro.org>> wrote:
>
>     Op 16 jan. 2014, om 11:38 heeft Otavio Salvador
>     <otavio@ossystems.com.br <mailto:otavio@ossystems.com.br>> het
>     volgende geschreven:
>      > On Thu, Jan 16, 2014 at 7:27 AM, Koen Kooi <koen.kooi@linaro.org
>     <mailto:koen.kooi@linaro.org>> wrote:
>      > On 01/15/2014 12:22 PM, Otavio Salvador wrote:
>      > On Wed, Jan 15, 2014 at 8:15 AM, Koen Kooi <koen.kooi@linaro.org
>     <mailto:koen.kooi@linaro.org>
>      > <mailto:koen.kooi@linaro.org <mailto:koen.kooi@linaro.org>>> wrote:
>      >
>      >     I've limited it to 64bit targets, but to be honest debug
>     splitting
>      >     doesn't make sense for grub since it won't run in your rootfs and
>      >     attaching gdb is pretty much impossible.
>      >
>      >     Signed-off-by: Koen Kooi <koen.kooi@linaro.org
>     <mailto:koen.kooi@linaro.org>
>      >     <mailto:koen.kooi@linaro.org <mailto:koen.kooi@linaro.org>>>
>      >
>      >
>      >
>      > I'd prefer to remove the debug systems than skip the split. What
>     others
>      > think?
>      >
>      > I'm not sure what you mean by that, do you mean using
>     INHIBIT_PACKAGE_STRIP or something else?
>      >
>      >
>      > Yes and be sure it has been stripped during build.
>
>     That seems to be a lot more work for the same effect. Stripping
>     isn't the problem, it's debugedit trying to do its magic that fails.
>
>
> Well, if not stripped the symbols will be left in the binaries which is
> not expected.

I've looked into package.bbclass and it's a classic case of code not 
matching docs :(
Koen Kooi Feb. 12, 2014, 8:03 a.m. UTC | #4
On 01/15/2014 11:15 AM, Koen Kooi wrote:
> I've limited it to 64bit targets, but to be honest debug splitting doesn't make sense for grub since it won't run in your rootfs and attaching gdb is pretty much impossible.
>
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> ---
>   meta/recipes-bsp/grub/grub_git.bb | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
> index 1796e7f..bc79cfa 100644
> --- a/meta/recipes-bsp/grub/grub_git.bb
> +++ b/meta/recipes-bsp/grub/grub_git.bb
> @@ -51,8 +51,13 @@ do_configure_prepend() {
>   do_install_append () {
>       install -d ${D}${sysconfdir}/grub.d
>       install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
> +
>   }
>
> +# debugedit chokes on 64 bit platforms
> +INHIBIT_PACKAGE_DEBUG_SPLIT_aarch64 = "1"
> +INHIBIT_PACKAGE_DEBUG_SPLIT_x86-64 = "1"
> +
>   RDEPENDS_${PN} = "diffutils freetype"
>   FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
>
>

Since the package.bbclass change went in yesterday: ping
Koen Kooi March 13, 2014, 9:08 a.m. UTC | #5
Op 15 feb. 2014, om 11:27 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:

> 
> Op 12 feb. 2014, om 09:31 heeft Richard Purdie <richard.purdie@linuxfoundation.org> het volgende geschreven:
> 
>> On Wed, 2014-02-12 at 09:03 +0100, Koen Kooi wrote:
>>> On 01/15/2014 11:15 AM, Koen Kooi wrote:
>>>> I've limited it to 64bit targets, but to be honest debug splitting doesn't make sense for grub since it won't run in your rootfs and attaching gdb is pretty much impossible.
>>>> 
>>>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
>>>> ---
>>>> meta/recipes-bsp/grub/grub_git.bb | 5 +++++
>>>> 1 file changed, 5 insertions(+)
>>>> 
>>>> diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
>>>> index 1796e7f..bc79cfa 100644
>>>> --- a/meta/recipes-bsp/grub/grub_git.bb
>>>> +++ b/meta/recipes-bsp/grub/grub_git.bb
>>>> @@ -51,8 +51,13 @@ do_configure_prepend() {
>>>> do_install_append () {
>>>>     install -d ${D}${sysconfdir}/grub.d
>>>>     install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
>>>> +
>>>> }
>>>> 
>>>> +# debugedit chokes on 64 bit platforms
>>>> +INHIBIT_PACKAGE_DEBUG_SPLIT_aarch64 = "1"
>>>> +INHIBIT_PACKAGE_DEBUG_SPLIT_x86-64 = "1"
>>>> +
>>>> RDEPENDS_${PN} = "diffutils freetype"
>>>> FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
>>>> 
>>>> 
>>> 
>>> Since the package.bbclass change went in yesterday: ping
>> 
>> Should we just do this for 64 bit targets or should we be doing it
>> unconventionally?
> 
> It is needed for every 'bare metal' binary we run through debugedit. But for some reason debugedit doesn't choke on 32bit binaries. I'm not sure what the right answer is here, I only fixed it for the archs I ran into problems myself. 
> 
> I'd be happy to respin this patch if you let me know what the preferred solution is.

Ping
Koen Kooi April 8, 2014, 12:46 p.m. UTC | #6
Op 13 mrt. 2014, om 10:08 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:

> 
> Op 15 feb. 2014, om 11:27 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
> 
>> 
>> Op 12 feb. 2014, om 09:31 heeft Richard Purdie <richard.purdie@linuxfoundation.org> het volgende geschreven:
>> 
>>> On Wed, 2014-02-12 at 09:03 +0100, Koen Kooi wrote:
>>>> On 01/15/2014 11:15 AM, Koen Kooi wrote:
>>>>> I've limited it to 64bit targets, but to be honest debug splitting doesn't make sense for grub since it won't run in your rootfs and attaching gdb is pretty much impossible.
>>>>> 
>>>>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
>>>>> ---
>>>>> meta/recipes-bsp/grub/grub_git.bb | 5 +++++
>>>>> 1 file changed, 5 insertions(+)
>>>>> 
>>>>> diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
>>>>> index 1796e7f..bc79cfa 100644
>>>>> --- a/meta/recipes-bsp/grub/grub_git.bb
>>>>> +++ b/meta/recipes-bsp/grub/grub_git.bb
>>>>> @@ -51,8 +51,13 @@ do_configure_prepend() {
>>>>> do_install_append () {
>>>>>    install -d ${D}${sysconfdir}/grub.d
>>>>>    install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
>>>>> +
>>>>> }
>>>>> 
>>>>> +# debugedit chokes on 64 bit platforms
>>>>> +INHIBIT_PACKAGE_DEBUG_SPLIT_aarch64 = "1"
>>>>> +INHIBIT_PACKAGE_DEBUG_SPLIT_x86-64 = "1"
>>>>> +
>>>>> RDEPENDS_${PN} = "diffutils freetype"
>>>>> FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
>>>>> 
>>>>> 
>>>> 
>>>> Since the package.bbclass change went in yesterday: ping
>>> 
>>> Should we just do this for 64 bit targets or should we be doing it
>>> unconventionally?
>> 
>> It is needed for every 'bare metal' binary we run through debugedit. But for some reason debugedit doesn't choke on 32bit binaries. I'm not sure what the right answer is here, I only fixed it for the archs I ran into problems myself. 
>> 
>> I'd be happy to respin this patch if you let me know what the preferred solution is.
> 
> Ping

Ping again
Koen Kooi April 12, 2014, 8:59 a.m. UTC | #7
Op 8 apr. 2014, om 14:46 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:

> 
> Op 13 mrt. 2014, om 10:08 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
> 
>> 
>> Op 15 feb. 2014, om 11:27 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:
>> 
>>> 
>>> Op 12 feb. 2014, om 09:31 heeft Richard Purdie <richard.purdie@linuxfoundation.org> het volgende geschreven:
>>> 
>>>> On Wed, 2014-02-12 at 09:03 +0100, Koen Kooi wrote:
>>>>> On 01/15/2014 11:15 AM, Koen Kooi wrote:
>>>>>> I've limited it to 64bit targets, but to be honest debug splitting doesn't make sense for grub since it won't run in your rootfs and attaching gdb is pretty much impossible.
>>>>>> 
>>>>>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
>>>>>> ---
>>>>>> meta/recipes-bsp/grub/grub_git.bb | 5 +++++
>>>>>> 1 file changed, 5 insertions(+)
>>>>>> 
>>>>>> diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
>>>>>> index 1796e7f..bc79cfa 100644
>>>>>> --- a/meta/recipes-bsp/grub/grub_git.bb
>>>>>> +++ b/meta/recipes-bsp/grub/grub_git.bb
>>>>>> @@ -51,8 +51,13 @@ do_configure_prepend() {
>>>>>> do_install_append () {
>>>>>>   install -d ${D}${sysconfdir}/grub.d
>>>>>>   install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
>>>>>> +
>>>>>> }
>>>>>> 
>>>>>> +# debugedit chokes on 64 bit platforms
>>>>>> +INHIBIT_PACKAGE_DEBUG_SPLIT_aarch64 = "1"
>>>>>> +INHIBIT_PACKAGE_DEBUG_SPLIT_x86-64 = "1"
>>>>>> +
>>>>>> RDEPENDS_${PN} = "diffutils freetype"
>>>>>> FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
>>>>>> 
>>>>>> 
>>>>> 
>>>>> Since the package.bbclass change went in yesterday: ping
>>>> 
>>>> Should we just do this for 64 bit targets or should we be doing it
>>>> unconventionally?
>>> 
>>> It is needed for every 'bare metal' binary we run through debugedit. But for some reason debugedit doesn't choke on 32bit binaries. I'm not sure what the right answer is here, I only fixed it for the archs I ran into problems myself. 
>>> 
>>> I'd be happy to respin this patch if you let me know what the preferred solution is.
>> 
>> Ping
> 
> Ping again

With my non-work hat on: I can't build grub for 64-bit non-efi targets (e.g. my core2quad machine at home) due to this, it would be nice to get this into the 'daisy'  branch to fix those buildfailures.

regards,

Koen
diff mbox

Patch

diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
index 1796e7f..bc79cfa 100644
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ b/meta/recipes-bsp/grub/grub_git.bb
@@ -51,8 +51,13 @@  do_configure_prepend() {
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
     install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
+ 
 }
 
+# debugedit chokes on 64 bit platforms
+INHIBIT_PACKAGE_DEBUG_SPLIT_aarch64 = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT_x86-64 = "1"
+
 RDEPENDS_${PN} = "diffutils freetype"
 FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"