2010-11-13 23:18:11

by Mike Frysinger

[permalink] [raw]
Subject: Re: [PATCH] initramfs: Fix build break on symbol-prefixed archs

On Thu, Oct 28, 2010 at 17:19, Michal Marek wrote:
> On 28.10.2010 22:35, Sam Ravnborg wrote:
>> On Thu, Oct 28, 2010 at 12:46:31AM +0200, Michal Marek wrote:
>>> On 27.10.2010 20:23, Mike Frysinger wrote:
>>>> can we get this change dropped from linux-next until someone gets a
>>>> chance to fix it ?
>>>
>>> Sorry I missed this thread. So your last patch
>>> (http://lkml.org/lkml/2010/10/19/488) did fix the Blackfin build
>>> failure? Can you submit it with a proper Signed-off-by and changelog?
>>
>> Did you see the patch I posted in: http://lkml.org/lkml/2010/10/19/534
>>
>> The one that fix up the cppflags usage.
>>
>> I think this will solve the issue with blackfin nicely - and
>> make use of cppflags more as expected.
>
> As Mike noted - your patch does not strip the double quotes. And Mike's
> patch is really minimal, it just adds the SYMBOL_PREFIX definition to
> _a_flags. I'll look at your patch after this merge window.

why am i seeing __initramfs_size failures in mainline now ?
-mike


2010-11-24 08:41:19

by Mike Frysinger

[permalink] [raw]
Subject: Re: [PATCH] initramfs: Fix build break on symbol-prefixed archs

On Sat, Nov 13, 2010 at 18:17, Mike Frysinger wrote:
> On Thu, Oct 28, 2010 at 17:19, Michal Marek wrote:
>> On 28.10.2010 22:35, Sam Ravnborg wrote:
>>> On Thu, Oct 28, 2010 at 12:46:31AM +0200, Michal Marek wrote:
>>>> On 27.10.2010 20:23, Mike Frysinger wrote:
>>>>> can we get this change dropped from linux-next until someone gets a
>>>>> chance to fix it ?
>>>>
>>>> Sorry I missed this thread. So your last patch
>>>> (http://lkml.org/lkml/2010/10/19/488) did fix the Blackfin build
>>>> failure? Can you submit it with a proper Signed-off-by and changelog?
>>>
>>> Did you see the patch I posted in: http://lkml.org/lkml/2010/10/19/534
>>>
>>> The one that fix up the cppflags usage.
>>>
>>> I think this will solve the issue with blackfin nicely - and
>>> make use of cppflags more as expected.
>>
>> As Mike noted - your patch does not strip the double quotes. And Mike's
>> patch is really minimal, it just adds the SYMBOL_PREFIX definition to
>> _a_flags. I'll look at your patch after this merge window.
>
> why am i seeing __initramfs_size failures in mainline now ?

ping ... it looks like no one merged the VMLINUX_SYMBOL() changes in
usr/initramfs_data.S proposed by Hendrik
-mike

2010-11-29 22:39:31

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] initramfs: Fix build break on symbol-prefixed archs

On Wed, 24 Nov 2010 03:40:51 -0500
Mike Frysinger <[email protected]> wrote:

> On Sat, Nov 13, 2010 at 18:17, Mike Frysinger wrote:
> > On Thu, Oct 28, 2010 at 17:19, Michal Marek wrote:
> >> On 28.10.2010 22:35, Sam Ravnborg wrote:
> >>> On Thu, Oct 28, 2010 at 12:46:31AM +0200, Michal Marek wrote:
> >>>> On 27.10.2010 20:23, Mike Frysinger wrote:
> >>>>> can we get this change dropped from linux-next until someone gets a
> >>>>> chance to fix it ?
> >>>>
> >>>> Sorry I missed this thread. So your last patch
> >>>> (http://lkml.org/lkml/2010/10/19/488) did fix the Blackfin build
> >>>> failure? Can you submit it with a proper Signed-off-by and changelog?
> >>>
> >>> Did you see the patch I posted in: http://lkml.org/lkml/2010/10/19/534
> >>>
> >>> The one that fix up the cppflags usage.
> >>>
> >>> I think this will solve the issue with blackfin nicely - and
> >>> make use of cppflags more as expected.
> >>
> >> As Mike noted - your patch does not strip the double quotes. And Mike's
> >> patch is really minimal, it just adds the SYMBOL_PREFIX definition to
> >> _a_flags. I'll look at your patch after this merge window.
> >
> > why am i seeing __initramfs_size failures in mainline now ?
>
> ping ... it looks like no one merged the VMLINUX_SYMBOL() changes in
> usr/initramfs_data.S proposed by Hendrik

Well I found and forward-ported the below, from October.

Problem is, the changelog didn't describe the alleged "build break" and
it's unclear whether the fix is needed in mainline, in 2.6.36 or is
just fixing some bug which was introduced by some other
perhaps-not-applied patch.

Help? What's going on here?


From: Hendrik Brueckner <[email protected]>

Define the __initramfs_size variable using VMLINUX_SYMBOL() to take care
of symbol-prefixed architectures, for example, blackfin.

Depending on the CONFIG_SYMBOL_PREFIX configuration option, define the
SYMBOL_PREFIX symbol which is evaluated by VMLINUX_SYMBOL().

Signed-off-by: Hendrik Brueckner <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Hendrik Brueckner <[email protected]>,
Cc: Michal Marek <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

usr/Makefile | 3 +++
usr/initramfs_data.S | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)

diff -puN usr/Makefile~initramfs-fix-build-break-on-symbol-prefixed-archs usr/Makefile
--- a/usr/Makefile~initramfs-fix-build-break-on-symbol-prefixed-archs
+++ a/usr/Makefile
@@ -19,6 +19,9 @@ suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZ
suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZO) = .lzo

AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/initramfs_data.cpio$(suffix_y)"
+ifdef CONFIG_SYMBOL_PREFIX
+AFLAGS_initramfs_data.o += -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))
+endif

# Generate builtin.o based on initramfs_data.o
obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
diff -puN usr/initramfs_data.S~initramfs-fix-build-break-on-symbol-prefixed-archs usr/initramfs_data.S
--- a/usr/initramfs_data.S~initramfs-fix-build-break-on-symbol-prefixed-archs
+++ a/usr/initramfs_data.S
@@ -22,14 +22,15 @@
*/

#include <linux/stringify.h>
+#include <asm-generic/vmlinux.lds.h>

.section .init.ramfs,"a"
__irf_start:
.incbin __stringify(INITRAMFS_IMAGE)
__irf_end:
.section .init.ramfs.info,"a"
-.globl __initramfs_size
-__initramfs_size:
+.globl VMLINUX_SYMBOL(__initramfs_size)
+VMLINUX_SYMBOL(__initramfs_size):
#ifdef CONFIG_64BIT
.quad __irf_end - __irf_start
#else
_

2010-11-29 23:30:01

by Mike Frysinger

[permalink] [raw]
Subject: Re: [PATCH] initramfs: Fix build break on symbol-prefixed archs

On Mon, Nov 29, 2010 at 17:38, Andrew Morton wrote:
> On Wed, 24 Nov 2010 03:40:51 -0500 Mike Frysinger wrote:
>> On Sat, Nov 13, 2010 at 18:17, Mike Frysinger wrote:
>> > On Thu, Oct 28, 2010 at 17:19, Michal Marek wrote:
>> >> On 28.10.2010 22:35, Sam Ravnborg wrote:
>> >>> On Thu, Oct 28, 2010 at 12:46:31AM +0200, Michal Marek wrote:
>> >>>> On 27.10.2010 20:23, Mike Frysinger wrote:
>> >>>>> can we get this change dropped from linux-next until someone gets a
>> >>>>> chance to fix it ?
>> >>>>
>> >>>> Sorry I missed this thread. So your last patch
>> >>>> (http://lkml.org/lkml/2010/10/19/488) did fix the Blackfin build
>> >>>> failure? Can you submit it with a proper Signed-off-by and changelog?
>> >>>
>> >>> Did you see the patch I posted in: http://lkml.org/lkml/2010/10/19/534
>> >>>
>> >>> The one that fix up the cppflags usage.
>> >>>
>> >>> I think this will solve the issue with blackfin nicely - and
>> >>> make use of cppflags more as expected.
>> >>
>> >> As Mike noted - your patch does not strip the double quotes. And Mike's
>> >> patch is really minimal, it just adds the SYMBOL_PREFIX definition to
>> >> _a_flags. I'll look at your patch after this merge window.
>> >
>> > why am i seeing __initramfs_size failures in mainline now ?
>>
>> ping ... it looks like no one merged the VMLINUX_SYMBOL() changes in
>> usr/initramfs_data.S proposed by Hendrik
>
> Well I found and forward-ported the below, from October.
>
> Problem is, the changelog didn't describe the alleged "build break"

his e-mail from October you found contains the context showing the
build failure:
i'm pretty sure this breaks on every symbol-prefixed arch. at least,
it broke every Blackfin board:
init/built-in.o: In function `populate_rootfs':
init/initramfs.c:(.init.text+0x2548): undefined reference to
`__initramfs_size'
init/initramfs.c:(.init.text+0x254e): undefined reference to
`__initramfs_size'
make: *** [.tmp_vmlinux1] Error 1

> it's unclear whether the fix is needed in mainline, in 2.6.36 or is
> just fixing some bug which was introduced by some other
> perhaps-not-applied patch.

it was caused by changes Michal added post 2.6.36, and then pushed to
Linus without bothering to address the reports sent to him. so it
needs to be in before 2.6.37 is released.
-mike

2010-11-30 15:37:05

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] initramfs: Fix build break on symbol-prefixed archs

On Mon, Nov 29, 2010 at 06:29:37PM -0500, Mike Frysinger wrote:
> On Mon, Nov 29, 2010 at 17:38, Andrew Morton wrote:
> > On Wed, 24 Nov 2010 03:40:51 -0500 Mike Frysinger wrote:
> >> On Sat, Nov 13, 2010 at 18:17, Mike Frysinger wrote:
> >> > On Thu, Oct 28, 2010 at 17:19, Michal Marek wrote:
> >> >> On 28.10.2010 22:35, Sam Ravnborg wrote:
> >> >>> On Thu, Oct 28, 2010 at 12:46:31AM +0200, Michal Marek wrote:
> >> >>>> On 27.10.2010 20:23, Mike Frysinger wrote:
> >> >>>>> can we get this change dropped from linux-next until someone gets a
> >> >>>>> chance to fix it ?
> >> >>>>
> >> >>>> Sorry I missed this thread. So your last patch
> >> >>>> (http://lkml.org/lkml/2010/10/19/488) did fix the Blackfin build
> >> >>>> failure? Can you submit it with a proper Signed-off-by and changelog?
> >> >>>
> >> >>> Did you see the patch I posted in: http://lkml.org/lkml/2010/10/19/534
> >> >>>
> >> >>> The one that fix up the cppflags usage.
> >> >>>
> >> >>> I think this will solve the issue with blackfin nicely - and
> >> >>> make use of cppflags more as expected.
> >> >>
> >> >> As Mike noted - your patch does not strip the double quotes. And Mike's
> >> >> patch is really minimal, it just adds the SYMBOL_PREFIX definition to
> >> >> _a_flags. I'll look at your patch after this merge window.
> >> >
> >> > why am i seeing __initramfs_size failures in mainline now ?
> >>
> >> ping ... it looks like no one merged the VMLINUX_SYMBOL() changes in
> >> usr/initramfs_data.S proposed by Hendrik

Argh, yes. I only merged your patch to use -DSYMBOL_PREFIX when preprocessing
.S files ("initramfs: Fix build break on symbol-prefixed archs") as d63f6d1,
but did not realize that the main part of Hendrik's patch is missing :-/.

> >
> > Well I found and forward-ported the below, from October.

I deleted the Makefile change, which is now obsoleted by d63f6d1, the
result would look like below. Mike, does mainline with this patch build
on Blackfin now?

Michal

From: Hendrik Brueckner <[email protected]>
Subject: [PATCH] initramfs: Really fix build break on symbol-prefixed archs

Define the __initramfs_size variable using VMLINUX_SYMBOL() to take care
of symbol-prefixed architectures, for example, blackfin.

Signed-off-by: Hendrik Brueckner <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Hendrik Brueckner <[email protected]>,
Cc: Michal Marek <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
[mmarek: leave out Makefile change, since d63f6d1 already takes care of the
SYMBOL_PREFIX define]
Signed-off-by: Michal Marek <[email protected]>

diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S
index 792a750..c14322d 100644
--- a/usr/initramfs_data.S
+++ b/usr/initramfs_data.S
@@ -22,14 +22,15 @@
*/

#include <linux/stringify.h>
+#include <asm-generic/vmlinux.lds.h>

.section .init.ramfs,"a"
__irf_start:
.incbin __stringify(INITRAMFS_IMAGE)
__irf_end:
.section .init.ramfs.info,"a"
-.globl __initramfs_size
-__initramfs_size:
+.globl VMLINUX_SYMBOL(__initramfs_size)
+VMLINUX_SYMBOL(__initramfs_size):
#ifdef CONFIG_64BIT
.quad __irf_end - __irf_start
#else

2010-12-02 04:12:57

by Mike Frysinger

[permalink] [raw]
Subject: Re: [PATCH] initramfs: Fix build break on symbol-prefixed archs

On Tue, Nov 30, 2010 at 10:36, Michal Marek wrote:
> I deleted the Makefile change, which is now obsoleted by d63f6d1, the
> result would look like below. Mike, does mainline with this patch build
> on Blackfin now?

yes, it fixes things for me. thanks !
Signed-off-by: Mike Frysinger <[email protected]>
-mike