Skip to contentSkip to conversation

hi, everyone

U-Boot-Users zhenhua zou 2 participants 2 messages Jul 31, 2006

lore
Share & tools
lore
#0 lore raw

Hi, everyone

I am porting U-Boot-1.1.4 to my board based on s3c44b0x and using /board/dave/B2 as a referrence. My cross compiler is (DENX ELDK 3.1 3.3.3-8).

The variable ----base_address in the file /common/cmd_mem.c is not correctly initialized. It ought to be zero after the initialization. But when I type "base" command, it shows 0xFFFFFFFF instead of 0x00000000. Is there anybody who has such problems before? Could you give me some hints about it?

Another question is about the function malloc. Sometimes when I downloaded the modified code, in the function env_relocate()(/common/env_common.c) the line "env_ptr = (env_t *)malloc (CFG_ENV_SIZE);" returned NULL. The modified code was about the ethernet and TFTP. And I think it is irrelevant with the malloc. I couldn't figure out why it happens. Any hints would be appreciated.

By the way I have checked the change log in the git repository since 1.1.4. Most of the changes about B2 board are the supporting of GCC 4.x and updating of CFI_FLASH. Is it necessary to update it to the top tree of the git repository? And the cross compiler?

Thanks in advance.

Signature · 2 lines
Best regards
     Zou Zhenhua
#1 lore raw
Quoted 2 lines · In message <[email protected]> you…

I am porting U-Boot-1.1.4 to my board based on s3c44b0x and using

I hope you mean you are using the *current* code, i. e. top of tree in the git repository!!! If not - why not?

Quoted 2 lines

/board/dave/B2 as a referrence. My cross compiler is (DENX ELDK 3.1 3.3.3-8).

Why don't you use a current toolchain, i. e. ELDK 4.0 ?

Quoted 6 lines

Another question is about the function malloc. Sometimes when I downloaded the modified code, in the function env_relocate()(/common/env_common.c) the line "env_ptr = (env_t *)malloc (CFG_ENV_SIZE);" returned NULL. The modified code was about the ethernet and TFTP. And I think it is irrelevant with the malloc. I couldn't figure out why it happens. Any hints would be appreciated.

malloc() returns NULL when it runs out of memory. And, no, the use pof ethernet and TFTP is not irrelevant to that. Try increadsing the malloc arena.

Quoted 4 lines

By the way I have checked the change log in the git repository since 1.1.4. Most of the changes about B2 board are the supporting of GCC 4.x and updating of CFI_FLASH. Is it necessary to update it to the top tree of the git repository? And the cross compiler?

Yes, it is. Actually you should have never started with the old stuff.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Good manners are the settled  medium  of  social,  as  specie  is  of
commercial, life; returns are equally expected for both.
           - Lord Chesterfield _Letters to his Son_, 25 December 1753