linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: add support for uncompressed uImage kernel
Date: Tue, 9 Nov 2010 14:04:55 +0000	[thread overview]
Message-ID: <20101109140455.GA6680@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1289310656-29502-1-git-send-email-alexander.stein@systec-electronic.com>

Is it really faster to copy an uncompressed image than it is to
decompress using LZMA with caches on?

Remember that in terms of fast boot, uboot sucks - it's way over the
top of what you need.  Eg, it always copies the image to RAM before
executing it.  That gives two problems:

1. the image has to be copied, which takes time
2. the image then decompresses itself, but because its more often than
   not living at the address which the decompressed image has to reside,
   it then has to copy the decompressed image afterwards.

(2) is solved by loading the kernel compressed image elsewhere in memory.
(1) is solved by having a boot loader which can call the image where-ever
it resides (eg, in flash) and using the ZBOOT_ROM options.

I suspect that if you do both 1 and 2, you'll be faster than having uboot
copy an uncompressed image into system memory.

On Tue, Nov 09, 2010 at 02:50:56PM +0100, Alexander Stein wrote:
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
>  arch/arm/boot/Makefile |   10 ++++++++--
>  init/Kconfig           |    7 +++++++
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
> index 4a590f4..37618b8 100644
> --- a/arch/arm/boot/Makefile
> +++ b/arch/arm/boot/Makefile
> @@ -77,11 +77,17 @@ else
>  $(obj)/uImage: STARTADDR=$(LOADADDR)
>  endif
>  
> -$(obj)/uImage:	$(obj)/zImage FORCE
> +ifeq ($(CONFIG_KERNEL_NONE),y)
> +ARM_IMAGE := Image
> +else
> +ARM_IMAGE := zImage
> +endif
> +
> +$(obj)/uImage:	$(obj)/$(ARM_IMAGE) FORCE
>  	$(call if_changed,uimage)
>  	@echo '  Image $@ is ready'
>  
> -$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
> +$(obj)/bootp/bootp: $(obj)/$(ARM_IMAGE) initrd FORCE
>  	$(Q)$(MAKE) $(build)=$(obj)/bootp $@
>  	@:
>  
> diff --git a/init/Kconfig b/init/Kconfig
> index 88c1046..355d7a5 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -155,6 +155,13 @@ choice
>  
>  	  If in doubt, select 'gzip'
>  
> +config KERNEL_NONE
> +	bool "None"
> +	depends on ARM
> +	help
> +	  If you want to use get a fast startup at the cost of kernel size
> +	  you can use an uncompressed kernel.
> +
>  config KERNEL_GZIP
>  	bool "Gzip"
>  	depends on HAVE_KERNEL_GZIP
> -- 
> 1.7.2.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2010-11-09 14:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 13:50 [PATCH] ARM: add support for uncompressed uImage kernel Alexander Stein
2010-11-09 14:04 ` Russell King - ARM Linux [this message]
2010-11-09 14:51   ` Uwe Kleine-König
2010-11-09 22:38   ` Sascha Hauer
2010-11-13 10:47   ` Albin Tonnerre
2010-11-18  7:38     ` Alexander Stein
2010-11-18  8:15       ` Uwe Kleine-König
2010-11-18  9:10       ` Russell King - ARM Linux
2010-11-18 10:18         ` Alexander Stein
2010-11-09 14:57 ` Uwe Kleine-König

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=20101109140455.GA6680@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).