Skip to contentSkip to conversation

linux: add LIC_FILES_CHKSUM

PATCH In review Ilya Yanok 7 participants 23 messages Feb 8, 2011 – Feb 10, 2011

lore
Share & tools
lore

Ilya Yanok

author
#0 lore raw

PATCH 1/3 linux: add LIC_FILES_CHKSUM

Linux is licensed under GPL so add appropriate LIC_FILES_CHKSUM to linux.inc file.

---
 meta/recipes-kernel/linux/linux.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-kernel/linux/linux.inc +2 -0
index 93859bb..c23d90f 100644
@@ -2,6 +2,8 @@ DESCRIPTION = "Linux Kernel"
 SECTION = "kernel"
 LICENSE = "GPL"
 
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
 inherit kernel
 
 DEPENDS_append_em-x270 = " mtd-utils "
Signature · 1 line
1.7.4
author
#1 lore raw

PATCH 2/3 u-boot: add LIC_FILES_CHKSUM

---
 meta/recipes-bsp/uboot/u-boot.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +2 -0
index 889f621..6492016 100644
@@ -5,6 +5,8 @@ PRIORITY = "optional"
 LICENSE = "GPL"
 PROVIDES = "virtual/bootloader"
 
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
 inherit deploy
 
 PARALLEL_MAKE=""
Signature · 1 line
1.7.4
#2 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Quoted 10 lines · Ilya Yanok
---
  meta/recipes-bsp/uboot/u-boot.inc |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +0 -0
index 889f621..6492016 100644

meta/recipes-bsp/uboot/u-boot.inc PRIORITY = "optional" · line 9

Quoted 5 lines
meta/recipes-bsp/uboot/u-boot.inc +2 -0
@@ -5,6 +5,8 @@ PRIORITY = "optional"
  LICENSE = "GPL"
  PROVIDES = "virtual/bootloader"
 
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+

From what I can tell u-boot.inc is only used by u-boot_git.bb which already defines LIC_FILES_CHKSUM and the appropriate GPLv2+ LICENSE variable.

It seems to me the LICENSE and LIC_FILES_CHKSUM should be defined in the same recipe as the SRC_URI. In this case, u-boot_git.bb. Is there a motivating reason to add it to .inc? If so, we should also remove it from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#3 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Quoted 14 lines · Darren Hart
Quoted 13 lines · Ilya Yanok

---
meta/recipes-bsp/uboot/u-boot.inc | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +0 -0
index 889f621..6492016 100644
@@ -5,6 +5,8 @@ PRIORITY = "optional"

LICENSE = "GPL"
PROVIDES = "virtual/bootloader"

Quoted 8 lines

meta/recipes-bsp/uboot/u-boot.inc PRIORITY = "optional" · line 9

Quoted 2 lines
meta/recipes-bsp/uboot/u-boot.inc +2 -0
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+

From what I can tell u-boot.inc is only used by u-boot_git.bb which already defines LIC_FILES_CHKSUM and the appropriate GPLv2+ LICENSE variable.

It seems to me the LICENSE and LIC_FILES_CHKSUM should be defined in the same recipe as the SRC_URI. In this case, u-boot_git.bb. Is there a motivating reason to add it to .inc? If so, we should also remove it from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

I agree - what if you have multiple .bb files sharing a single .inc and the license and/or license data are different? It seems to me that this data should live where the actual sources are being introduced, e.g. the .bb file.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
author
#4 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Hi Gary,

Quoted 11 lines · Gary Thomas
Quoted 6 lines

It seems to me the LICENSE and LIC_FILES_CHKSUM should be defined in the same recipe as the SRC_URI. In this case, u-boot_git.bb. Is there a motivating reason to add it to .inc? If
so, we should also remove it from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

I agree - what if you have multiple .bb files sharing a single .inc and the license and/or license data are different? It seems to me that this data should live where the actual sources are being introduced, e.g. the .bb file.

I think that the main license files is going to be the same for all forks (well, at least for GPLed projects). And if the specific recipe adds some code with different license we can add LIC_FILES_CHKSUM entries in this specific recipe, can't we?

Regards, Ilya.

author
#5 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

In reply to Darren Hart

Hi Darren,

Quoted 6 lines · Darren Hart

meta/recipes-bsp/uboot/u-boot.inc PRIORITY = "optional" · line 9

Quoted 2 lines
meta/recipes-bsp/uboot/u-boot.inc +2 -0
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+

From what I can tell u-boot.inc is only used by u-boot_git.bb which
already defines LIC_FILES_CHKSUM and the appropriate GPLv2+ LICENSE variable.

Well, that's true. Actually I'm adding my own U-Boot recipe but want to use u-boot.inc.

Quoted 3 lines

It seems to me the LICENSE and LIC_FILES_CHKSUM should be defined in the same recipe as the SRC_URI. In this case, u-boot_git.bb. Is there a motivating reason to add it to .inc? If so, we should also remove it

My idea was that main COPYING file will be present in virtually any U-Boot version, so we want LIC_FILES_CHKSUM for this file to be in common include file.

Quoted 2 lines

from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

Yes, I think we should remove LIC_FILES_CHKSUM from u-boot_git.bb. Should I remove it and repost the patch?

Regards, Ilya.

#6 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Quoted 11 lines · Ilya Yanok

Hi Darren,

Quoted 7 lines · Darren Hart
Quoted 3 lines

+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" +

From what I can tell u-boot.inc is only used by u-boot_git.bb which already defines LIC_FILES_CHKSUM and the appropriate GPLv2+ LICENSE variable.

Quoted 2 lines

Well, that's true. Actually I'm adding my own U-Boot recipe but want to use u-boot.inc.

I figured, otherwise you would have hit a build failure with u-boot_git.bb (since it's CHKSUM was out of date and overwrote the one in .inc).

Quoted 7 lines
Quoted 3 lines

It seems to me the LICENSE and LIC_FILES_CHKSUM should be defined in the same recipe as the SRC_URI. In this case, u-boot_git.bb. Is there a motivating reason to add it to .inc? If so, we should also remove it

My idea was that main COPYING file will be present in virtually any U-Boot version, so we want LIC_FILES_CHKSUM for this file to be in common include file.

True, but it may suffer from line-wrapping or other subtle changes which will break the CHKSUMs.

Quoted 5 lines
Quoted 2 lines

from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

Yes, I think we should remove LIC_FILES_CHKSUM from u-boot_git.bb. Should I remove it and repost the patch?

I've sent a couple patches to address this and some other existing issues. You were CC'd and Richard has merged with master. This should get us to a state that works for all known usage, holler if they cause you any undue pain. :-)

Thanks,

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
author
#7 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Hi Darren,

Quoted 7 lines · Darren Hart
Quoted 3 lines

My idea was that main COPYING file will be present in virtually any U-Boot version, so we want LIC_FILES_CHKSUM for this file to be in common include file.

True, but it may suffer from line-wrapping or other subtle changes which will break the CHKSUMs.

Agreed, this can be an issue.

Quoted 11 lines
Quoted 5 lines
Quoted 2 lines

from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

Yes, I think we should remove LIC_FILES_CHKSUM from u-boot_git.bb. Should I remove it and repost the patch?

I've sent a couple patches to address this and some other existing issues. You were CC'd and Richard has merged with master. This should get us to a state that works for all known usage, holler if they cause you any undue pain. :-)

Uh.. Somehow I can find these patches neither in my mailbox nor in the list archive... Could you please give me some link?

Regards, Ilya.

#8 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Quoted 20 lines · Ilya Yanok

Hi Darren,

Quoted 7 lines · Darren Hart
Quoted 3 lines

My idea was that main COPYING file will be present in virtually any U-Boot version, so we want LIC_FILES_CHKSUM for this file to be in common include file.

True, but it may suffer from line-wrapping or other subtle changes which will break the CHKSUMs.

Agreed, this can be an issue.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

from u-boot_git.bb to avoid unnecessary duplication which leads to confusion down the road.

Yes, I think we should remove LIC_FILES_CHKSUM from u-boot_git.bb. Should I remove it and repost the patch?

Quoted 8 lines
Quoted 4 lines

I've sent a couple patches to address this and some other existing issues. You were CC'd and Richard has merged with master. This should get us to a state that works for all known usage, holler if they cause you any undue pain. :-)

Uh.. Somehow I can find these patches neither in my mailbox nor in the list archive... Could you please give me some link?

Hrm, this appears to be a problem on my end - I sent email from a build system which I thought was configured properly, the mail did make it to me... but I don't see it on the archives either. Thanks for pointing that out.

The patches are the top two here:

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/uboot

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
author
#9 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Hi Darren,

Quoted 8 lines · Darren Hart

Hrm, this appears to be a problem on my end - I sent email from a build system which I thought was configured properly, the mail did make it to me... but I don't see it on the archives either. Thanks for pointing that out.

The patches are the top two here:

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/uboot

Thanks! So the policy is "LIC_FILES_CHKSUM should be near SRC_URI", right?

Regards, Ilya.

#10 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Quoted 8 lines · Ilya Yanok

Hi Darren,

Quoted 5 lines · Darren Hart

Hrm, this appears to be a problem on my end - I sent email from a build system which I thought was configured properly, the mail did make it to me... but I don't see it on the archives either. Thanks for pointing that out.

Quoted 5 lines
Quoted 3 lines

The patches are the top two here:

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/uboot

Thanks! So the policy is "LIC_FILES_CHKSUM should be near SRC_URI", right?

Well, Gary and I agree on that, but I haven't heard an official statement regarding this. It certainly seems to me to be the only maintainable way to do it.

Richard, any thoughts?

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#11 lore raw

Re: [PATCH 2/3] u-boot: add LIC_FILES_CHKSUM

Quoted 13 lines · Darren Hart
Quoted 12 lines · Ilya Yanok

Hi Darren,

Quoted 8 lines · Darren Hart

Hrm, this appears to be a problem on my end - I sent email from a build system which I thought was configured properly, the mail did make it to me... but I don't see it on the archives either. Thanks for pointing that out.

The patches are the top two here:

http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/uboot

Quoted 7 lines
Quoted 1 line

Thanks! So the policy is "LIC_FILES_CHKSUM should be near SRC_URI", right?

Well, Gary and I agree on that, but I haven't heard an official statement regarding this. It certainly seems to me to be the only maintainable way to do it.

Richard, any thoughts?

I agree that the two are very linked and should generally stick together.

Cheers,

Richard

author
#12 lore raw

PATCH 3/3 u-boot: compile with -O2 on PowerPC

In reply to Ilya Yanok

gcc on PowerPC is currently compiled with -Os optimization disabled so we have to use -O2 on PowerPC instead.

---
 meta/recipes-bsp/uboot/u-boot.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +6 -1
index 6492016..7694c77 100644
@@ -22,7 +22,12 @@ do_compile () {
 	unset CFLAGS
 	unset CPPFLAGS
 	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake all
+	# -Os is disabled on PowerPC
+	if [ ${TARGET_ARCH} == "powerpc" ] ; then
+		oe_runmake OPTFLAGS=-O2 all
+	else
+		oe_runmake all
+	fi
 }
 
 do_deploy () {
Signature · 1 line
1.7.4
#13 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

Quoted 13 lines · Ilya Yanok

gcc on PowerPC is currently compiled with -Os optimization disabled so we have to use -O2 on PowerPC instead.

---
  meta/recipes-bsp/uboot/u-boot.inc |    7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +0 -0
index 6492016..7694c77 100644

meta/recipes-bsp/uboot/u-boot.inc do_compile () { · line 30

Quoted 10 lines
meta/recipes-bsp/uboot/u-boot.inc +6 -1
@@ -22,7 +22,12 @@ do_compile () {
  	unset CFLAGS
  	unset CPPFLAGS
  	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake all
+	# -Os is disabled on PowerPC
+	if [ ${TARGET_ARCH} == "powerpc" ] ; then
+		oe_runmake OPTFLAGS=-O2 all
+	else
+		oe_runmake all
+	fi

This is already disabled in u-boot.inc with the following line:

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"

Resetting OPTFLAGS to '' removes the -Os from the variable in the Makefile. This isn't just a PowerPC problem, it also manifested on ARM, I believe it is a GCC 4.5.1 issue.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#14 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

I observe that with current gcc for powerpc uboot only builds with OPTFLAGS=-O2, unsetting or using other OPT level the build fails with undefined symbols.

I override the OPTFLAGS in the dedicated recipe for uboot under meta-xilinx BSP
but for powerpc targets in main meta layer Ilya approach does the work.

Quoted 48 lines · Darren Hart
Quoted 15 lines · Ilya Yanok

gcc on PowerPC is currently compiled with -Os optimization disabled so we have to use -O2 on PowerPC instead.

---
 meta/recipes-bsp/uboot/u-boot.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +0 -0
index 6492016..7694c77 100644
@@ -22,7 +22,12 @@ do_compile () {
       unset CFLAGS

meta/recipes-bsp/uboot/u-boot.inc do_compile () { · line 31

Quoted 10 lines
meta/recipes-bsp/uboot/u-boot.inc +6 -1
       unset CPPFLAGS
       oe_runmake ${UBOOT_MACHINE}
-       oe_runmake all
+       # -Os is disabled on PowerPC
+       if [ ${TARGET_ARCH} == "powerpc" ] ; then
+               oe_runmake OPTFLAGS=-O2 all
+       else
+               oe_runmake all
+       fi
 

This is already disabled in u-boot.inc with the following line:

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"

Resetting OPTFLAGS to '' removes the -Os from the variable in the Makefile. This isn't just a PowerPC problem, it also manifested on ARM, I believe it is a GCC 4.5.1 issue.

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#15 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

Quoted 7 lines · Adrian Alonso

I observe that with current gcc for powerpc uboot only builds with OPTFLAGS=-O2, unsetting or using other OPT level the build fails with undefined symbols.

I override the OPTFLAGS in the dedicated recipe for uboot under meta-xilinx BSP
but for powerpc targets in main meta layer Ilya approach does the work.

I see - shouldn't be reviewing patches with a head cold. I wonder if the -O2 would work with ARM as well. If so, we could just set OPTFLAGS to -O2 instead of '' for all architectures. I'd much prefer that if possible, I'll test on ARM.

--
Darren

Quoted 55 lines

On Wed, Feb 9, 2011 at 11:42 AM, Darren Hart <[email protected] <mailto:[email protected]>> wrote:

On 02/08/2011 12:26 PM, Ilya Yanok wrote:

gcc on PowerPC is currently compiled with -Os optimization disabled so
we have to use -O2 on PowerPC instead.

<mailto:[email protected]>>
---
meta/recipes-bsp/uboot/u-boot.inc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-bsp/uboot/u-boot.inc b/meta/recipes-bsp/uboot/u-boot.inc index 6492016..7694c77 100644
--- a/meta/recipes-bsp/uboot/u-boot.inc +++ b/meta/recipes-bsp/uboot/u-boot.inc @@ -22,7 +22,12 @@ do_compile () {
unset CFLAGS
unset CPPFLAGS
oe_runmake ${UBOOT_MACHINE}
- oe_runmake all
+ # -Os is disabled on PowerPC
+ if [ ${TARGET_ARCH} == "powerpc" ] ; then
+ oe_runmake OPTFLAGS=-O2 all
+ else
+ oe_runmake all
+ fi

This is already disabled in u-boot.inc with the following line:

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"

Resetting OPTFLAGS to '' removes the -Os from the variable in the Makefile. This isn't just a PowerPC problem, it also manifested on ARM, I believe it is a GCC 4.5.1 issue.

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

_______________________________________________
poky mailing list
[email protected] <mailto:[email protected]>
https://lists.yoctoproject.org/listinfo/poky

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#16 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

In reply to Darren Hart

Op 9 feb 2011, om 18:42 heeft Darren Hart het volgende geschreven:

Quoted 28 lines · Ilya Yanok
Quoted 13 lines

gcc on PowerPC is currently compiled with -Os optimization disabled so we have to use -O2 on PowerPC instead.

---
 meta/recipes-bsp/uboot/u-boot.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
meta/recipes-bsp/uboot/u-boot.inc +0 -0
index 6492016..7694c77 100644

meta/recipes-bsp/uboot/u-boot.inc do_compile () { · line 30

Quoted 10 lines
meta/recipes-bsp/uboot/u-boot.inc +6 -1
@@ -22,7 +22,12 @@ do_compile () {
 	unset CFLAGS
 	unset CPPFLAGS
 	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake all
+	# -Os is disabled on PowerPC
+	if [ ${TARGET_ARCH} == "powerpc" ] ; then
+		oe_runmake OPTFLAGS=-O2 all
+	else
+		oe_runmake all
+	fi

This is already disabled in u-boot.inc with the following line:

Quoted 4 lines

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"

Resetting OPTFLAGS to '' removes the -Os from the variable in the Makefile. This isn't just a PowerPC problem, it also manifested on ARM, I believe it is a GCC 4.5.1 issue.

4.5.3 + linaro patches has similar -Os problems on armv7a at least, fwiw

#17 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

Dear Koen Kooi,

Quoted 2 lines · In message <[email protected]> you…

4.5.3 + linaro patches has similar -Os problems on armv7a at least, fwiw

For reference: we have a list of known compiler issues here:
http://www.denx.de/wiki/U-Boot/GccBugsAndIssues

For some bugs exist patches, but so far these have not been mainlined yet (nor do I see all of them in the Yocto or Linaro tool chains).

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
It seems intuitively obvious to me, which  means  that  it  might  be
wrong.                                                 -- Chris Torek
author
#18 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

In reply to Darren Hart

Hi Darren,

Quoted 4 lines · Darren Hart

This is already disabled in u-boot.inc with the following line:

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"

Yes, sorry, I've useed not up-to-date version of metadata and missed this fix. But it has to be '-O2' still.

Quoted 3 lines

Resetting OPTFLAGS to '' removes the -Os from the variable in the Makefile. This isn't just a PowerPC problem, it also manifested on ARM, I believe it is a GCC 4.5.1 issue.

Well, the difference here is that on PowerPC we have -Os option disabled completely. Wolfgang tried to summarize know gcc bugs and seems like -Os bugs on ARM and PowerPC have different nature (it looks like bugs on ARM are already fixed while on the ones PowerPC are not).
Then I think it's a bad idea to remove -Os everywhere: U-Boot really wants to be built with -Os optimization so we might want to change optimization level to -O2 only for targets where it's absolutely required. Actually I was able to build and successfully run U-Boot on beagleboard with -Os so it doesn't look like it's completely broken on ARM.

Regards, Ilya.

#19 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

Quoted 10 lines · Ilya Yanok

Hi Darren,

Quoted 4 lines · Darren Hart

This is already disabled in u-boot.inc with the following line:

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"

Yes, sorry, I've useed not up-to-date version of metadata and missed this fix. But it has to be '-O2' still.

Understood, -O2 is in master now for all arches.

Quoted 5 lines
Quoted 4 lines

Resetting OPTFLAGS to '' removes the -Os from the variable in the Makefile. This isn't just a PowerPC problem, it also manifested on ARM, I believe it is a GCC 4.5.1 issue.

Quoted 9 lines

Well, the difference here is that on PowerPC we have -Os option disabled completely. Wolfgang tried to summarize know gcc bugs and seems like -Os bugs on ARM and PowerPC have different nature (it looks like bugs on ARM are already fixed while on the ones PowerPC are not).
Then I think it's a bad idea to remove -Os everywhere: U-Boot really wants to be built with -Os optimization so we might want to change optimization level to -O2 only for targets where it's absolutely required. Actually I was able to build and successfully run U-Boot on beagleboard with -Os so it doesn't look like it's completely broken on ARM.

Interesting - is this using the current recipe in poky? It was building for the beagleboard that I hit the bug which caused me to clear -Os from the EXTRA_OEMAKE arguments.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
author
#20 lore raw

Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC

Hi Darren,

Quoted 10 lines · Darren Hart
Quoted 6 lines

Then I think it's a bad idea to remove -Os everywhere: U-Boot really wants to be built with -Os optimization so we might want to change optimization level to -O2 only for targets where it's absolutely required. Actually I was able to build and successfully run U-Boot on beagleboard with -Os so it doesn't look like it's completely broken on ARM.

Interesting - is this using the current recipe in poky? It was building for the beagleboard that I hit the bug which caused me to clear -Os from the EXTRA_OEMAKE arguments.

I'm using slightly outdated Poky tree (commit 4cd1118) with some my additions and my own U-Boot 2011.03-rc1 recipe (nothing special, I've just changed SRC_URI and supported machine targets). I'll try to rebase to master and retest in a couple of days.

Regards, Ilya.

#22 lore raw
In reply to Ilya Yanok
Quoted 13 lines · Ilya Yanok

Linux is licensed under GPL so add appropriate LIC_FILES_CHKSUM to linux.inc file.

---
  meta/recipes-kernel/linux/linux.inc |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-kernel/linux/linux.inc +0 -0
index 93859bb..c23d90f 100644

meta/recipes-kernel/linux/linux.inc DESCRIPTION = "Linux Kernel" · line 6

Quoted 5 lines
meta/recipes-kernel/linux/linux.inc +2 -0
@@ -2,6 +2,8 @@ DESCRIPTION = "Linux Kernel"
  SECTION = "kernel"
  LICENSE = "GPL"
 
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+

This is consistent with other .inc files (such as linux-yocto.inc). I'm fine with it, but wanted to mention that linux.inc is going to be going trough some serious pruning and refactoring in the near future.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel