
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.

In message 890a030e0607310655w774f395ftff5ab5ddba01eb44@mail.gmail.com you wrote:
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?
/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 ?
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.
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
participants (2)
-
Wolfgang Denk
-
zhenhua zou