From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 05/12] Add compressed image support
Date: Fri, 3 Aug 2012 08:34:33 +0200 [thread overview]
Message-ID: <20120803063433.GH1451@pengutronix.de> (raw)
In-Reply-To: <20120802153422.GL19759@game.jcrosoft.org>
On Thu, Aug 02, 2012 at 05:34:22PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:30 Thu 02 Aug , Sascha Hauer wrote:
> > On Mon, Jul 30, 2012 at 12:02:38PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > From: Sascha Hauer <s.hauer@pengutronix.de>
> > > +
> > > void barebox_pbl(uint32_t offset)
> > > {
> > > + uint32_t compressed_start, compressed_end, len;
> > > + void (*uncompress)(void *compressed_start, unsigned int len);
> > > +
> > > + compressed_start = (uint32_t)&input_data - offset;
> > > + compressed_end = (uint32_t)&input_data_end - offset;
> > > + len = compressed_end - compressed_start;
> > > +
> > > + /*
> > > + * Check if the compressed binary will be overwritten
> > > + * by the uncompressed binary
> > > + */
> > > + if (compressed_start >= TEXT_BASE &&
> > > + compressed_start < TEXT_BASE + len * 4 ) {
> > > + /*
> > > + * copy compressed binary to its link address
> > > + */
> > > + memcpy(&input_data, (void *)compressed_start, len);
> > > + compressed_start = (uint32_t)&input_data;
> > > + }
> > > +
> > > + uncompress = barebox_uncompress;
> > > +
> > > + /* call barebox_uncompress with its absolute address */
> > > + __asm__ __volatile__(
> > > + "mov r0, %1\n"
> > > + "mov r1, %2\n"
> > > + "mov pc, %0\n"
> > > + :
> > > + : "r"(uncompress), "r"(compressed_start), "r"(len)
> > > + : "r0", "r1");
> >
> > When the pbl code runs at its correct address, then we can simply do a
> > barebox_uncompress() here.
> >
> > Fixed this before applying.
> the code in start does not do this
>
> we just do a call to barebox_pbl
See my other mails to the other patches.
Sascha
--
Pengutronix e.K. | |
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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-08-03 6:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 10:00 [PATCH 00/12 v3] Add Pre-Bootloader support Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 01/12] kbuild: Init all relevant variables used in kbuild files so Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 02/12] kbuild: add pre-bootloader (pbl) target Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 03/12] Add pre-bootloader (pbl) image support Jean-Christophe PLAGNIOL-VILLARD
2012-08-02 15:29 ` Sascha Hauer
2012-08-03 6:50 ` Sascha Hauer
2012-08-03 7:06 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 04/12] pbl: discard unwind symbol if enable in barebox Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 05/12] Add compressed image support Jean-Christophe PLAGNIOL-VILLARD
2012-08-02 15:30 ` Sascha Hauer
2012-08-02 15:34 ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 6:34 ` Sascha Hauer [this message]
2012-07-30 10:02 ` [PATCH 06/12] only compress default env in uncompressed images Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 07/12] decompressor: import malloc/free implementation for linux 3.4 Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 08/12] ARM: add early malloc support needed by the decompressor Jean-Christophe PLAGNIOL-VILLARD
2012-08-02 15:23 ` Sascha Hauer
2012-07-30 10:02 ` [PATCH 09/12] compressed image: add gzip support Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 10/12] at91: add lowlevel init to the pbl Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 11/12] kbuild: allow to have custom cppflags for pbl Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:02 ` [PATCH 12/12] arm: always enable the garbage collector " Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 10:38 ` [PATCH 00/12 v3] Add Pre-Bootloader support Juergen Beisert
2012-07-30 14:44 ` Thomas Petazzoni
2012-07-30 15:02 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-30 15:51 ` Juergen Beisert
-- strict thread matches above, loose matches on Subject: below --
2012-08-03 10:23 [PATCH 00/12 v4] " Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 01/12] Makefile.clean: include Makefiles again Jean-Christophe PLAGNIOL-VILLARD
2012-08-03 10:25 ` [PATCH 05/12] Add compressed image support Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:31 [PATCH 00/12] Add Pre-Bootloader support Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:32 ` [PATCH 01/12] kbuild: Init all relevant variables used in kbuild files so Jean-Christophe PLAGNIOL-VILLARD
2012-07-27 18:33 ` [PATCH 05/12] Add compressed image support Jean-Christophe PLAGNIOL-VILLARD
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=20120803063433.GH1451@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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