VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> 2010-09-17 15:24:11 -0700 committer: Michal Marek <mmarek@suse.cz> 2010-09-29 16:28:59 +0200 commit: ffe8018c3424892c9590048fc36caa6c3e0c8a76 parent: 6ae64e428f74e7bacab898ef9665dda719ea6fde
Commit Summary:
initramfs: fix initramfs size calculation
Diffstat:
1 file changed, 11 insertions, 5 deletions
diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S
index 49a545fea120..b9efed5e35cc 100644
--- a/usr/initramfs_data.S
+++ b/usr/initramfs_data.S
@@ -11,11 +11,7 @@
   -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o
    ld -m elf_i386  -r -o built-in.o initramfs_data.o
 
-  initramfs_data.scr looks like this:
-SECTIONS
-{
-       .init.ramfs : { *(.data) }
-}
+  For including the .init.ramfs sections, see include/asm-generic/vmlinux.lds.
 
   The above example is for i386 - the parameters vary from architectures.
   Eventually look up LDFLAGS_BLOB in an older version of the
@@ -28,4 +24,14 @@ SECTIONS
 #include <linux/stringify.h>
 
 .section .init.ramfs,"a"
+__irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
+__irf_end:
+.section .init.ramfs.info,"a"
+.globl __initramfs_size
+__initramfs_size:
+#ifdef CONFIG_32BIT
+	.long __irf_end - __irf_start
+#else
+	.quad __irf_end - __irf_start
+#endif