DECLARE_GLOBAL_DATA_PTR macro Definition Issues

Source: Internet
Author: User

Recently idle to see 6410 of the Uboot code, because the friendly boot to the NAND part of the code to do hide, so simply find the disc inside the Samsung original Uboot code to see, because the friendly boot code is certainly based on the manufacturer's code changes, certainly can.

Security, directly compiled Samsung's uboot code, put on the friendly board ran a bit, the results can run, but found out, the printed dram size is 0.

Check today, found that is declare_global_data_ptr this definition of the problem, the friendly code added a comment, said the gcc4.5.1+ version of the definition of the macro is not supported!

  

The original definition in Uboot is as follows:

#define DECLARE_GLOBAL_DATA_PTR Register volatile gd_t *gd asm ("R8")

The kindness was changed to:

#define DECLARE_GLOBAL_DATA_PTR extern gd_t *gd;

is to define a global variable!

After the change, the size of the DRAM is normal.

  

Check out 8127 of the Uboot code, found still used uboot original definition, and so on Monday to the company to look at the 8127 Uboot compiler version, currently cannot be verified.

DECLARE_GLOBAL_DATA_PTR macro Definition Issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.