All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
@ 2013-07-17 11:53 TigerLiu at viatech.com.cn
  2013-07-17 13:07 ` Albert ARIBAUD
  0 siblings, 1 reply; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-17 11:53 UTC (permalink / raw)
  To: u-boot

Hi, experts:
Sorry!
Not self-compressed, it is self-uncompressed !
------------------------------------------------------
I tried to add a self-uncompressed header in u-boot.bin on a Cortex-A9
single core platform.
Then, i tried to boot it.
But failed in board_init_f() function.

Has anybody tried to boot a self-uncompressed u-boot.bin ?
Best wishes,

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-17 11:53 [U-Boot] [U-boot] failed to boot an compressed u-boot.bin TigerLiu at viatech.com.cn
@ 2013-07-17 13:07 ` Albert ARIBAUD
  2013-07-18  1:32   ` TigerLiu at viatech.com.cn
  0 siblings, 1 reply; 14+ messages in thread
From: Albert ARIBAUD @ 2013-07-17 13:07 UTC (permalink / raw)
  To: u-boot

Hi TigerLiu at viatech.com.cn,

On Wed, 17 Jul 2013 19:53:10 +0800, <TigerLiu@viatech.com.cn> wrote:

> Hi, experts:
> Sorry!
> Not self-compressed, it is self-uncompressed !
> ------------------------------------------------------
> I tried to add a self-uncompressed header in u-boot.bin on a Cortex-A9
> single core platform.
> Then, i tried to boot it.
> But failed in board_init_f() function.
> 
> Has anybody tried to boot a self-uncompressed u-boot.bin ?
> Best wishes,

IIUC, you then load that "header + u-boot.bin" in memory and it
decompresses itself. At what address does it place the uncompressed
load?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-17 13:07 ` Albert ARIBAUD
@ 2013-07-18  1:32   ` TigerLiu at viatech.com.cn
  2013-07-18  4:27     ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-18  1:32 UTC (permalink / raw)
  To: u-boot

Hi, Albert:
The DRAM address map is : 0 --- 0x1000 0000 (256MB) on my ARM
development board.

I configured "CONFIG_SYS_TEXT_BASE = 0x03F80000" in config.mk  when
compiling u-boot source code.

The self-uncompressed code also put the uncompressed image at 0x03F80000


Best wishes,
>On Wed, 17 Jul 2013 19:53:10 +0800, <TigerLiu@viatech.com.cn> wrote:

> Hi, experts:
> Sorry!
> Not self-compressed, it is self-uncompressed !
> ------------------------------------------------------
> I tried to add a self-uncompressed header in u-boot.bin on a Cortex-A9
> single core platform.
> Then, i tried to boot it.
> But failed in board_init_f() function.
> 
> Has anybody tried to boot a self-uncompressed u-boot.bin ?
> Best wishes,

IIUC, you then load that "header + u-boot.bin" in memory and it
decompresses itself. At what address does it place the uncompressed
load?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-18  1:32   ` TigerLiu at viatech.com.cn
@ 2013-07-18  4:27     ` Wolfgang Denk
  2013-07-18  4:41       ` TigerLiu at viatech.com.cn
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2013-07-18  4:27 UTC (permalink / raw)
  To: u-boot

Dear TigerLiu at viatech.com.cn,

In message <FE7ADED5C2218B4786C09CD97DC4C49F99D52A@exchbj02.viatech.com.bj> you wrote:
>
> I configured "CONFIG_SYS_TEXT_BASE = 0x03F80000" in config.mk  when
> compiling u-boot source code.

this has been moved out of config.mk ages ago.  How old is your U-Boot
version?

> The self-uncompressed code also put the uncompressed image at 0x03F80000

Why don't you use an SPL approach instead?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overdrawn?  But I still have checks left!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-18  4:27     ` Wolfgang Denk
@ 2013-07-18  4:41       ` TigerLiu at viatech.com.cn
  2013-07-18  8:08         ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-18  4:41 UTC (permalink / raw)
  To: u-boot

Hi, Denk:
My code base is based on u-boot-2013.04 .
I followed board\samsung\smdkc100\config.mk , and put it into my board
related directory.

About SPL approach:
Did you suggest I put decompressed algorithm code into SPL code instead
of adding a self-uncompressed header?

Best wishes,
>In message
><FE7ADED5C2218B4786C09CD97DC4C49F99D52A@exchbj02.viatech.com.bj> you
wrote:
>
> I configured "CONFIG_SYS_TEXT_BASE = 0x03F80000" in config.mk  when
> compiling u-boot source code.

this has been moved out of config.mk ages ago.  How old is your U-Boot
version?

> The self-uncompressed code also put the uncompressed image at
0x03F80000

Why don't you use an SPL approach instead?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overdrawn?  But I still have checks left!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-18  4:41       ` TigerLiu at viatech.com.cn
@ 2013-07-18  8:08         ` Wolfgang Denk
  2013-07-18  8:31           ` TigerLiu at viatech.com.cn
  2013-07-19  5:37           ` Minkyu Kang
  0 siblings, 2 replies; 14+ messages in thread
From: Wolfgang Denk @ 2013-07-18  8:08 UTC (permalink / raw)
  To: u-boot

Dear TigerLiu at viatech.com.cn,

please stop top posting / full quoting.


In message <FE7ADED5C2218B4786C09CD97DC4C49F99D576@exchbj02.viatech.com.bj> you wrote:
>
> My code base is based on u-boot-2013.04 .
> I followed board\samsung\smdkc100\config.mk , and put it into my board
> related directory.

You managed toi find a really bad example of code.  This should not be
used.  Today, CONFIG_SYS_TEXT_BASE should be defined in the board
config file instead. The use of board specific confog.mk files is
strongly deprecated.

Minkyu Kang, could you please clean this up as soon as possible?
Thanks!


> About SPL approach:
> Did you suggest I put decompressed algorithm code into SPL code instead
> of adding a self-uncompressed header?

Yes, that would be the U-Boot way to implement it. It allows you to
reusse existing code instead of adding new methods.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Life, loathe it or ignore it, you can't like it."
- Marvin the paranoid android

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-18  8:08         ` Wolfgang Denk
@ 2013-07-18  8:31           ` TigerLiu at viatech.com.cn
  2013-07-18 12:50             ` Wolfgang Denk
  2013-07-19  5:37           ` Minkyu Kang
  1 sibling, 1 reply; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-18  8:31 UTC (permalink / raw)
  To: u-boot

Dear Denk:
>Yes, that would be the U-Boot way to implement it. It allows you to
>reusse existing code instead of adding new methods.

So, is there any example SPL code which contains uncompressed algorithm
code?

Best wishes,

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-18  8:31           ` TigerLiu at viatech.com.cn
@ 2013-07-18 12:50             ` Wolfgang Denk
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2013-07-18 12:50 UTC (permalink / raw)
  To: u-boot

Dear TigerLiu at viatech.com.cn,

In message <FE7ADED5C2218B4786C09CD97DC4C49F99D600@exchbj02.viatech.com.bj> you wrote:
>
> >Yes, that would be the U-Boot way to implement it. It allows you to
> >reusse existing code instead of adding new methods.
> 
> So, is there any example SPL code which contains uncompressed algorithm
> code?

No, none thaty I am aware of.

Note that usually this makes little sense.  Using a compressed U-Boot
image can have two effects:

- saving some memory on the boot device; usually reacent hardware has
  ample resources, so saving 100...200 kB is typically not important
  enough to add such complexity.
- saving time when loading the U-Boot image from the boot device *at
  the cost of adding time needed to uncompress it).  If you ant to
  reduce boot time, it is more efficient to use Falcon mode and skip
  loading U-Boot completely when running in production mode.

So there is actually little motivation to implement such a feature -
but your milage may vary, or you may have specific requrements where
it actually makes sense.

Patches welcome.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The computer can't tell you the emotional story. It can give you  the
exact mathematical design, but what's missing is the eyebrows.
- Frank Zappa

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-18  8:08         ` Wolfgang Denk
  2013-07-18  8:31           ` TigerLiu at viatech.com.cn
@ 2013-07-19  5:37           ` Minkyu Kang
  1 sibling, 0 replies; 14+ messages in thread
From: Minkyu Kang @ 2013-07-19  5:37 UTC (permalink / raw)
  To: u-boot

On 18/07/13 17:08, Wolfgang Denk wrote:
> Dear TigerLiu at viatech.com.cn,
> 
> please stop top posting / full quoting.
> 
> 
> In message <FE7ADED5C2218B4786C09CD97DC4C49F99D576@exchbj02.viatech.com.bj> you wrote:
>>
>> My code base is based on u-boot-2013.04 .
>> I followed board\samsung\smdkc100\config.mk , and put it into my board
>> related directory.
> 
> You managed toi find a really bad example of code.  This should not be
> used.  Today, CONFIG_SYS_TEXT_BASE should be defined in the board
> config file instead. The use of board specific confog.mk files is
> strongly deprecated.
> 
> Minkyu Kang, could you please clean this up as soon as possible?
> Thanks!

Sure.

> 
> 
>> About SPL approach:
>> Did you suggest I put decompressed algorithm code into SPL code instead
>> of adding a self-uncompressed header?
> 
> Yes, that would be the U-Boot way to implement it. It allows you to
> reusse existing code instead of adding new methods.
> 
> Best regards,
> 
> Wolfgang Denk
> 

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-19 12:03     ` [U-Boot] " Albert ARIBAUD
@ 2013-07-22  1:53       ` TigerLiu at viatech.com.cn
  0 siblings, 0 replies; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-22  1:53 UTC (permalink / raw)
  To: u-boot

Hi, Albert:
>But then, why change the board's original SYS_TEXT_BASE? Could you not
>just leave boards.cfg untouched, and only change the decompressed
>target address to 0x03F80000?
>

Yes, just change the decompressed target address to 0x03F8 0000 is also
ok!

Best wishes,

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-19  9:25   ` [U-Boot] 答复: " TigerLiu at viatech.com.cn
@ 2013-07-19 12:03     ` Albert ARIBAUD
  2013-07-22  1:53       ` TigerLiu at viatech.com.cn
  0 siblings, 1 reply; 14+ messages in thread
From: Albert ARIBAUD @ 2013-07-19 12:03 UTC (permalink / raw)
  To: u-boot

Hi TigerLiu at viatech.com.cn,

On Fri, 19 Jul 2013 17:25:46 +0800, <TigerLiu@viatech.com.cn> wrote:

> Hi, Albert:
> Sorry!
> I made a mistake at before mail content!
> The correct setting is:
> I changed SYS_TEXT_BASE = 0x0800 0000 in boards.cfg.
> I also changed the decompressed target address = SYS_TEXT_BASE = 0x0800 0000.
> So, I could boot successfully.
> If I didn't let decompressed target address = 0x0800 0000, boot would fail.

But then, why change the board's original SYS_TEXT_BASE? Could you not
just leave boards.cfg untouched, and only change the decompressed
target address to 0x03F80000?

> Best wishes,

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
  2013-07-19  6:59 TigerLiu at viatech.com.cn
@ 2013-07-19  9:16 ` Albert ARIBAUD
  2013-07-19  9:25   ` [U-Boot] 答复: " TigerLiu at viatech.com.cn
  0 siblings, 1 reply; 14+ messages in thread
From: Albert ARIBAUD @ 2013-07-19  9:16 UTC (permalink / raw)
  To: u-boot

Hi TigerLiu at viatech.com.cn,

On Fri, 19 Jul 2013 14:59:47 +0800, <TigerLiu@viatech.com.cn> wrote:

> Hi, Albert:
> I found new u-boot source code had some PIC related question.
> I succeeded to boot self-uncompressed u-boot.bin now.
> 
> I reviewed self-uncompressed header code (similar with Linux kernel
> piggy header), found:
> The header code would de-compress compressed uboot.bin to 0x0000 8000
> dram location, and then jump to run it.

No wonder it did not work... The decompressing code should decompress at
the expected location (and be careful that the decompressed code not
overwrite the compressed one or the decompressing code), not at a fixed
one.

> Because i compiled uboot with "SYS_TEXT_BASE=0x03F80000" in board.cfg
> before.
> So boot failed.

Yes, clearly the board config and decompressor settings are
incompatible. However:

> Now, I changed SYS_TEXT_BASE=0x08000000 in boards.cfg.
> So, boot the compressed u-boot.bin successfully!

I don't think this is a clean fix, for two reasons:

1) Barring any typos, the address you changed the board config to,
0x80000000, is different from the address at which the decompressor
apparently writes to, 0x00008000.

1) Be it 0x00008000 or 0x80000000, neither of these addresses is the
one where U-Boot on your board is supposed to run; it only works  for
sure at the original SYS_TEXT_BASE, 0x03F80000.

Can you not change the decompressor's target address to the board's
SYS_TEXT_BASE?

> Best wishes,

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
@ 2013-07-19  6:59 TigerLiu at viatech.com.cn
  2013-07-19  9:16 ` Albert ARIBAUD
  0 siblings, 1 reply; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-19  6:59 UTC (permalink / raw)
  To: u-boot

Hi, Albert:
I found new u-boot source code had some PIC related question.
I succeeded to boot self-uncompressed u-boot.bin now.

I reviewed self-uncompressed header code (similar with Linux kernel
piggy header), found:
The header code would de-compress compressed uboot.bin to 0x0000 8000
dram location, and then jump to run it.

Because i compiled uboot with "SYS_TEXT_BASE=0x03F80000" in board.cfg
before.
So boot failed.

Now, I changed SYS_TEXT_BASE=0x08000000 in boards.cfg.
So, boot the compressed u-boot.bin successfully!

Best wishes,

>Hi, Albert:
>The DRAM address map is : 0 --- 0x1000 0000 (256MB) on my ARM
development >board.
>
>I configured "CONFIG_SYS_TEXT_BASE = 0x03F80000" in config.mk  when
>compiling u-boot source code.
>
>The self-uncompressed code also put the uncompressed image at
0x03F80000 
>
>Best wishes,
>On Wed, 17 Jul 2013 19:53:10 +0800, <TigerLiu@viatech.com.cn> wrote:

> Hi, experts:
> Sorry!
> Not self-compressed, it is self-uncompressed !
> ------------------------------------------------------
> I tried to add a self-uncompressed header in u-boot.bin on a Cortex-A9
> single core platform.
> Then, i tried to boot it.
> But failed in board_init_f() function.
> 
> Has anybody tried to boot a self-uncompressed u-boot.bin ?
> Best wishes,

IIUC, you then load that "header + u-boot.bin" in memory and it
decompresses itself. At what address does it place the uncompressed
load?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] [U-boot] failed to boot an compressed u-boot.bin
@ 2013-07-17 11:51 TigerLiu at viatech.com.cn
  0 siblings, 0 replies; 14+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-07-17 11:51 UTC (permalink / raw)
  To: u-boot

Hi, experts:
I tried to add a self-compressed header in u-boot.bin on a Cortex-A9
single core platform.
Then, i tried to boot it.
But failed in board_init_f() function.

Has anybody tried to boot a self-compressed u-boot.bin ?
Best wishes,

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-07-22  1:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-17 11:53 [U-Boot] [U-boot] failed to boot an compressed u-boot.bin TigerLiu at viatech.com.cn
2013-07-17 13:07 ` Albert ARIBAUD
2013-07-18  1:32   ` TigerLiu at viatech.com.cn
2013-07-18  4:27     ` Wolfgang Denk
2013-07-18  4:41       ` TigerLiu at viatech.com.cn
2013-07-18  8:08         ` Wolfgang Denk
2013-07-18  8:31           ` TigerLiu at viatech.com.cn
2013-07-18 12:50             ` Wolfgang Denk
2013-07-19  5:37           ` Minkyu Kang
  -- strict thread matches above, loose matches on Subject: below --
2013-07-19  6:59 TigerLiu at viatech.com.cn
2013-07-19  9:16 ` Albert ARIBAUD
2013-07-19  9:25   ` [U-Boot] 答复: " TigerLiu at viatech.com.cn
2013-07-19 12:03     ` [U-Boot] " Albert ARIBAUD
2013-07-22  1:53       ` TigerLiu at viatech.com.cn
2013-07-17 11:51 TigerLiu at viatech.com.cn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.