lkml.org 
[lkml]   [2010]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/2] initramfs: Fix initramfs size calculation
Hi Mike,

On Sun, Oct 17, 2010 at 02:28:11PM -0400, Mike Frysinger wrote:
> On Tue, Aug 31, 2010 at 04:23, Hendrik Brueckner wrote:
> 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
>
> look at VMLINUX_SYMBOL() in the vmlinux.lds.h file

Thanks for your feedback. Could you try the patch below and let me know
if it works for your Blackfin board.

Thanks and kind regards,
Hendrik

--- 8< ----------------

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

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
usr/initramfs_data.S | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--- 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_32BIT
.long __irf_end - __irf_start
#else

\
 
 \ /
  Last update: 2010-10-18 12:39    [W:0.074 / U:7.644 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site