This patch modifies the generation of uImage by handing over
the selected compression type instead of forcing gzip
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
 cacheit=
 binary=
 compression=.gz
+uboot_comp=gzip
 pie=
 format=
 
        ;;
     -z)
        compression=.gz
+       uboot_comp=gzip
        ;;
     -Z)
        shift
         [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "none" ] || usage
 
        compression=".$1"
+       uboot_comp=$1
 
         if [ $compression = ".none" ]; then
                 compression=
+               uboot_comp=none
         fi
+       if [ $uboot_comp = "gz" ]; then
+               uboot_comp=gzip
+       fi
        ;;
     --no-gzip)
         # a "feature" of the the wrapper script is that it can be used outside
         # the kernel tree. So keeping this around for backwards compatibility.
         compression=
+       uboot_comp=none
         ;;
     -?)
        usage
     *)
         # drop the compression suffix so the stripped vmlinux is used
         compression=
+       uboot_comp=none
        ;;
     esac
 
 case "$platform" in
 uboot)
     rm -f "$ofile"
-    ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
+    ${MKIMAGE} -A ppc -O linux -T kernel -C $uboot_comp -a $membase -e $membase \
        $uboot_version -d "$vmz" "$ofile"
     if [ -z "$cacheit" ]; then
        rm -f "$vmz"