r4368 - in dists/trunk/utils/mkvmlinuz/mkvmlinuz: . debian

Sven Luther luther at costa.debian.org
Mon Oct 10 08:19:44 UTC 2005


Author: luther
Date: 2005-10-10 08:19:43 +0000 (Mon, 10 Oct 2005)
New Revision: 4368

Modified:
   dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/changelog
   dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/mkvmlinuz.sgml
   dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz
Log:
Adapted mkvmlinux to apus and fixed the miboot case.
Not sure about strip vs objcopy -O binary though ...


Modified: dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/changelog
===================================================================
--- dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/changelog	2005-10-10 06:37:26 UTC (rev 4367)
+++ dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/changelog	2005-10-10 08:19:43 UTC (rev 4368)
@@ -1,3 +1,10 @@
+mkvmlinuz (15) unstable; urgency=low
+
+  * Added support for generating a vmlinuz on apus.
+  * Fixed miboot floppy generation also.
+
+ -- Sven Luther <luther at dbeian.org>  Mon, 10 Oct 2005 10:01:33 +0200
+
 mkvmlinuz (14) unstable; urgency=low
 
   * Now autodetects if the initrd is gzip compressed. This will allow to do

Modified: dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/mkvmlinuz.sgml
===================================================================
--- dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/mkvmlinuz.sgml	2005-10-10 06:37:26 UTC (rev 4367)
+++ dists/trunk/utils/mkvmlinuz/mkvmlinuz/debian/mkvmlinuz.sgml	2005-10-10 08:19:43 UTC (rev 4368)
@@ -50,6 +50,7 @@
       <arg><option>-i <replaceable>initrd</replaceable></option></arg>
       <arg><option>-d <replaceable>objdir</replaceable></option></arg>
       <arg><option>-r <replaceable>release</replaceable></option></arg>
+      <arg><option>-t</option></arg>
       <arg><option>-n</option></arg>
       <arg><option>-z</option></arg>
       <arg><option>-u</option></arg>
@@ -212,6 +213,14 @@
         </listitem>
       </varlistentry>
       <varlistentry>
+	<term><option>-t</option></term>
+	<listitem>
+	  <para>Use strip instead of objcopy -O binary to reduce the size
+	  of the kernel. Objcopy produce slightly smaller executables, but
+	  i suppose it also removes more stuff.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
 	<term><option>-n</option></term>
 	<listitem>
 	  <para>Do not attempt to find an initrd image file if none

Modified: dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz
===================================================================
--- dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz	2005-10-10 06:37:26 UTC (rev 4367)
+++ dists/trunk/utils/mkvmlinuz/mkvmlinuz/mkvmlinuz	2005-10-10 08:19:43 UTC (rev 4368)
@@ -10,6 +10,7 @@
     echo ' -i <initrd>  - path to initrd image file'
     echo ' -d <objdir>  - path to directory with additional object files'
     echo ' -r <release> - kernel release number'
+    echo ' -t           - use strip instead of objcopy -O binary on the kernel'
     echo ' -n           - do not use an initrd'
     echo ' -z           - assume the initrd image file is already compressed'
     echo ' -u           - assume the initrd image file is not compressed'
@@ -39,6 +40,7 @@
 	d) objdir=$OPTARG ;;
 	r) release=$OPTARG ;;
 	a) arch=$OPTARG ;;
+	t) strip="Yes" ;;
 	n) noinitrd="Yes" ;;
 	z) compressed="Yes" ;;
 	u) compressed="No" ;;
@@ -47,6 +49,19 @@
     esac
 done
 
+# Let's provide some subarch dependent defaults
+case $arch in
+    apus)
+    	# Apus needs stripping and don't use builtin initrd.
+    	strip="Yes"
+    	noinitrd="Yes"
+    	;;
+    miboot)
+    	# miboot doesn't use builtin initrd. Maybe stripping would be nice too ?
+    	noinitrd="Yes"
+    	;;
+esac
+
 # use non-option arguments as release version and kernel image file if needed
 shift $((OPTIND-1))
 if test -z "$release" -a -n "$1"; then
@@ -62,6 +77,7 @@
 	*PReP*Blackhawk*) arch=ppcbug ;;
 	*PReP*) arch=prep ;;
 	*CHRP*) arch=chrp ;;
+	*Amiga*) arch=apus ;;
 	*)
 	    case $(grep ^pmac-generation /proc/cpuinfo) in
 		*NewWorld) arch=pmac ;;
@@ -168,6 +184,8 @@
 MKBUGBOOT=$objdir/utils/mkbugboot
 LD=ld
 OBJCOPY=objcopy
+MV=mv
+STRIP=strip
 
 GZIP="--force --best"
 
@@ -175,6 +193,8 @@
 libs=$objdir/lib
 objs=$objdir/obj
 case "$arch","$release" in
+    apus,*|miboot,*)
+	;;
     prep,2.6*|ppcbug,2.6*)
 	test -d $objs/simple && objs=$objs/simple
 	if test -r $objs/legacy.o; then prepmap=legacy; else prepmap=prepmap; fi
@@ -207,7 +227,11 @@
 
 # create the compressed kernel image file
 test -z "$verbose" || echo === Creating compressed kernel image vmlinux.gz...
-do_cmd $OBJCOPY -O binary $kernel $work/vmlinux
+if test -n "$strip"; then
+    do_cmd $STRIP $kernel -o $work/vmlinux
+else
+    do_cmd $OBJCOPY -O binary $kernel $work/vmlinux
+fi
 do_cmd gzip $work/vmlinux
 
 # create the compressed initrd image file
@@ -277,13 +301,6 @@
 	do_cmd $OBJCOPY $OBJCOPY_ARGS $vmlinuz $vmlinuz
 	do_cmd $HACKOFF $vmlinuz
 	;;
-    miboot,2.6*)
-	OBJCOPY_ARGS="-O aixcoff-rs6000 -R .stab -R .stabstr $OBJCOPY_ARGS"
-	do_cmd $OBJCOPY $OBJCOPY_ARGS --add-section=image=$work/vmlinux.gz $objs/dummy.o $vmlinuz
-	if test -n "$initrd"; then
-	    do_cmd $OBJCOPY $OBJCOPY_ARGS --add-section=initrd=$work/initrd.gz $vmlinuz $vmlinuz
-	fi
-	;;
     pmac,2.6*)
 	LD_ARGS="$LD_ARGS -e _start -Ttext 0x01000000"
 	OBJCOPY_ARGS="--add-section=.note=$work/note $OBJCOPY_ARGS"
@@ -305,6 +322,12 @@
 	do_cmd $OBJCOPY $OBJCOPY_ARGS $vmlinuz $vmlinuz.tmp
 	do_cmd $MKPREP -pbp $vmlinuz.tmp $vmlinuz
 	;;
+    miboot,2.6*)
+        do_cmd $MV $vmlinuz.tmp $vmlinuz
+	;;
+    apus,2.6*)
+        do_cmd $MV $vmlinuz.tmp $vmlinuz
+	;;
     *)
 	echo Sorry, I do not know how to handle PowerPC sub-architecture $arch in version $release.
 esac




More information about the Kernel-svn-changes mailing list