[kernel] r6467 - dists/trunk/utils/mkvmlinuz/mkvmlinuz

Sven Luther luther at costa.debian.org
Thu Apr 20 22:44:21 UTC 2006


Author: luther
Date: Thu Apr 20 22:44:15 2006
New Revision: 6467

Modified:
   dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz
Log:
Now generates a correct vmlinuz on pmac hardware. Need to test on pegasos.


Modified: dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz
==============================================================================
--- dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz	(original)
+++ dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz	Thu Apr 20 22:44:15 2006
@@ -270,12 +270,7 @@
 # create the compressed kernel image file
 test -z "$verbose" || echo === Creating compressed kernel image vmlinux.gz...
 if test -n "$elf"; then
-    if test -n "$initrd" && test "$post_2_6_16"; then 
-      do_cmd $STRIP $kernel -o $work/vmlinux-strip
-      $ADDRAMDISK $work/initrd.gz $work/vmlinux-strip $work/vmlinux
-    else
-      do_cmd $STRIP $kernel -o $work/vmlinux
-    fi
+    do_cmd $STRIP $kernel -o $work/vmlinux
 else
     do_cmd $OBJCOPY -O binary $kernel $work/vmlinux
 fi
@@ -285,9 +280,14 @@
 if test -z "$elf"; then
     test -z "$verbose" || echo === Putting everything into ELF image file image.o...
     if test "$post_2_6_16"; then
-      do_cmd $OBJCOPY $dummy_kernel \
-    	--add-section=.kernel:vmlinux.strip= $work/vmlinux.gz \
-	--set-section-flags=.kernel:contents,alloc,load,readonly,data
+      do_cmd $OBJCOPY $dummy_kernel $work/image.o \
+    	--add-section=.kernel:vmlinux.strip=$work/vmlinux.gz \
+	--set-section-flags=.kernel:vmlinux.strip=contents,alloc,load,readonly,data
+      if test -n "$initrd"; then
+	do_cmd $OBJCOPY $work/image.o $work/image.o \
+	    --add-section=.kernel:initrd=$work/initrd.gz \
+	    --set-section-flags=.kernel:initrd=contents,alloc,load,readonly,data
+      fi
     else
       do_cmd $OBJCOPY -R .comment $dummy $work/image.o
       do_cmd $OBJCOPY $work/image.o $work/image.o \
@@ -310,12 +310,16 @@
 
 # link everything into the final image file and make it bootable
 vmlinuz=$work/vmlinuz.$arch
-LD_ARGS="-T $objdir/boot/ld.script"
+if test "$post_2_6_16"; then
+  LD_ARGS="-T $objs/zImage.lds"
+else
+  LD_ARGS="-T $objdir/boot/ld.script"
+fi
 OBJCOPY_ARGS="-R .comment"
 test -z "$verbose" || echo === Creating bootable kernel image file vmlinuz.$arch...
 case "$arch","$post_2_6_16","$release" in
     chrp,Yes,*|pmac,Yes,*)
-	do_cmd $LD $LD_ARGS -T $obj/zImage.lds -o $vmlinuz $OBJS
+	do_cmd $LD $LD_ARGS -o $vmlinuz $OBJS $work/image.o
 	do_cmd $ADDNOTE $vmlinuz
     	;;
     chrp,,2.6*)



More information about the Kernel-svn-changes mailing list