mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 9/9] Add compressed image support
Date: Fri, 20 Jul 2012 17:24:17 +0200	[thread overview]
Message-ID: <20120720152417.GH22657@game.jcrosoft.org> (raw)
In-Reply-To: <1342685582-13244-10-git-send-email-s.hauer@pengutronix.de>

> +{
> +	u32 r;
> +
> +	/* Setup the stack */
> +	r = STACK_BASE + STACK_SIZE - 16;
> +	__asm__ __volatile__("mov sp, %0" : : "r"(r));
> +	/* clear bss */
> +	memset(__bss_start, 0, __bss_stop - __bss_start);
> +
> +	start_barebox();
> +}
> +#else
>  void __naked __section(.text_entry) start(void)
>  {
>  	barebox_arm_head();
>  }
> +#endif
>  
>  void __naked __section(.text_exceptions) exception_vectors(void)
>  {
>  	__asm__ __volatile__ (
>  		".arm\n"
> -		"b reset\n"				/* reset */
> +		"1: b 1b\n"					/* reset */
>  #ifdef CONFIG_ARM_EXCEPTIONS
>  		"ldr pc, =undefined_instruction\n"	/* undefined instruction */
>  		"ldr pc, =software_interrupt\n"		/* software interrupt (SWI) */
> @@ -98,6 +118,34 @@ void __naked __bare_init reset(void)
>  	board_init_lowlevel_return();
>  }
>  
> +extern void *input_data;
> +extern void *input_data_end;
> +
> +#define STATIC static
> +#include "../../../lib/decompress_unlzo.c"
> +
> +void barebox_uncompress(void *compressed_start, unsigned int len)
> +{
> +	void (*barebox)(void);
need to check here if we are at TEXT_BASE (I mean if the code run where we are
supposed to uncompress

otherwise on at91 it will not work as the bootstrap put use at TEXT_BASE

so we have need to link at an other address

but the decompressor need work anyway by copying itself with the data before
of after the TEXT_BASE
and we should take the uncompress size about 4 times the compressed one.
There is nearly no change to compress more than 75%


otherwise Tested by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-07-20 15:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19  8:12 Compressed barebox " Sascha Hauer
2012-07-19  8:12 ` [PATCH 1/9] lzo: Allow for static inlining Sascha Hauer
2012-07-19  8:12 ` [PATCH 2/9] ARM lds: remove unused got Sascha Hauer
2012-07-19  8:12 ` [PATCH 3/9] ARM: remove board linker script option Sascha Hauer
2012-07-19  8:12 ` [PATCH 4/9] ARM: remove exception vectors from boards Sascha Hauer
2012-07-19  8:12 ` [PATCH 5/9] ARM startup: calculate offset instead of runtime address Sascha Hauer
2012-07-19  8:12 ` [PATCH 6/9] ARM ep93xx: Get rid of special handling in linker file Sascha Hauer
2012-07-19  8:13 ` [PATCH 7/9] ARM boards: Use _text rather than TEXT_BASE Sascha Hauer
2012-07-19  8:13 ` [PATCH 8/9] ARM: Separate assembler functions into their own section Sascha Hauer
2012-07-19 10:38   ` Marc Kleine-Budde
2012-07-19 14:04     ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 14:08     ` Sascha Hauer
2012-07-19 20:45       ` Sascha Hauer
2012-07-20 16:20         ` Johannes Stezenbach
2012-07-23 20:00           ` Sascha Hauer
2012-07-23 19:59   ` Sascha Hauer
2012-07-19  8:13 ` [PATCH 9/9] Add compressed image support Sascha Hauer
2012-07-19 14:10   ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 17:08   ` Johannes Stezenbach
2012-07-19 17:41     ` Sascha Hauer
2012-07-19 18:32       ` Johannes Stezenbach
2012-07-19 20:42         ` Sascha Hauer
2012-07-20 15:01           ` Johannes Stezenbach
2012-07-20 15:24   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-07-19 15:08 ` Compressed barebox " Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 16:05   ` Sascha Hauer
2012-07-19 20:11 ` Robert Jarzmik
2012-07-20  7:59   ` Sascha Hauer

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=20120720152417.GH22657@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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