linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Luotao Fu <l.fu@pengutronix.de>
To: Matteo Fortini <matteo.fortini@mta.it>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: Booting uncompressed kernel image
Date: Mon, 26 Jan 2009 16:23:35 +0100	[thread overview]
Message-ID: <497DD577.9040209@pengutronix.de> (raw)
In-Reply-To: <497D9EF1.4030403@mta.it>

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Matteo Fortini wrote:
> Hi all,
> I built an uncompressed uImage using mkimage --no-gzip -C none in the
> wrapper scripts.
> Only, u-boot recognizes it as uncompressed and launches the kernel
> properly (it's around 4MB), but in the end linux just prints
> OK and stops.
Powerpc make compress the bin image with gzip first, before it generates
the image header.  If the u-boot reads the image header properly doesn't
mean that the kernel is really unpacked.
>
> Has anyone done the same?
me ;-) I did it with a mpc5200b board and linux 2.6.23. You can try the
patch attached to this mail. It worked for me[TM]. ;-)

Cheers
Luotao Fu

-- 
Pengutronix e.K.                           | Dipl.-Ing. Luotao Fu        |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


[-- Attachment #2: make_uncompressed_image.diff --]
[-- Type: text/plain, Size: 2164 bytes --]

Subject: Create an uncomrpessed uImage
From: Luotao Fu <l.fu@pengutronix.de>

This one adds a make target to create an uncomrpessed uImage format for powerpc,
which is usable by uboot. We call the target nuImage for now. We need this to
verify if we can boost up the boot speed.

Signed-off-by: Luotao Fu <l.fu@pengutrnoix.de>

---
 arch/powerpc/Makefile      |    2 +-
 arch/powerpc/boot/Makefile |    3 +++
 arch/powerpc/boot/wrapper  |   15 ++++++++++++++-
 3 files changed, 18 insertions(+), 2 deletions(-)

Index: arch/powerpc/boot/wrapper
===================================================================
--- arch/powerpc/boot/wrapper.orig
+++ arch/powerpc/boot/wrapper
@@ -133,7 +133,7 @@ coff)
     platformo=$object/of.o
     lds=$object/zImage.coff.lds
     ;;
-miboot|uboot)
+miboot|uboot|decuboot)
     # miboot and U-boot want just the bare bits, not an ELF binary
     ext=bin
     objflags="-O binary"
@@ -190,6 +190,19 @@ uboot)
     fi
     exit 0
     ;;
+decuboot)
+    rm -f "$ofile"
+    vmz_uncomp=`basename $vmz $gzip`
+    gunzip -c $vmz > $vmz_uncomp
+    mkimage -A ppc -O linux -T kernel -C none -a 00000000 -e 00000000 \
+	$uboot_version -d "$vmz_uncomp" "$ofile"
+    rm $vmz_uncomp
+    vmz="$vmz$gzip"
+    if [ -z "$cacheit" ]; then
+	rm -f "$vmz"
+    fi
+    exit 0
+    ;;
 esac
 
 addsec() {
Index: arch/powerpc/boot/Makefile
===================================================================
--- arch/powerpc/boot/Makefile.orig
+++ arch/powerpc/boot/Makefile
@@ -195,6 +195,9 @@ $(obj)/zImage.initrd.ps3: vmlinux  $(wra
 $(obj)/uImage: vmlinux $(wrapperbits)
 	$(call if_changed,wrap,uboot)
 
+$(obj)/nuImage: vmlinux $(wrapperbits)
+	$(call if_changed,wrap,decuboot)
+
 $(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
 	$(call if_changed,wrap,cuboot-$*,$(dts))
 
Index: arch/powerpc/Makefile
===================================================================
--- arch/powerpc/Makefile.orig
+++ arch/powerpc/Makefile
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)
 
 CPPFLAGS_vmlinux.lds	:= -Upowerpc
 
-BOOT_TARGETS = zImage zImage.initrd uImage
+BOOT_TARGETS = zImage zImage.initrd uImage nuImage
 
 PHONY += $(BOOT_TARGETS)
 

  reply	other threads:[~2009-01-26 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 11:30 Booting uncompressed kernel image Matteo Fortini
2009-01-26 15:23 ` Luotao Fu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-01-26 11:17 Matteo Fortini
2009-01-26 22:36 ` Wolfgang Denk
2009-01-27 10:03   ` Matteo Fortini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497DD577.9040209@pengutronix.de \
    --to=l.fu@pengutronix.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=matteo.fortini@mta.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).