Mach-mini2440.c array type has incomplete element type

Source: Internet
Author: User

First try mini2440 nandflash driver porting

Article category: javaeye
Run the nandflash driver according to the article "mini2440_linux porting Development Practice Guide ".
There are a lot of problems with porting. I don't know whether the error is caused by my operation error or a mistake in writing this document.
After modifying the relevant information according to the steps, the following error occurs when you execute make zimage:
Typical errors are as follows:
ARCH/ARM/mach-s3c2440/mach-mini2440.c: 189: Error: array type has incomplete element type

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 190: Error: array index in non-array initializer

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 190: Error: (near initialization for 'smdk _ default_nand_part ')

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 191: Error: field name not in record or union initializer

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 191: Error: (near initialization for 'smdk _ default_nand_part ')

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 193: Error: Unknown field 'tacls' specified in initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 193: warning: excess elements in struct initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 193: warning: (near initialization for 'mini2440 _ nand_info ')

Arch/arm/mach-s3c2440/mach-mini2440.c: 194: error: unknown field 'twrph0' specified in initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 194: warning: excess elements in struct initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 194: warning: (near initialization for 'mini2440 _ nand_info ')

Arch/arm/mach-s3c2440/mach-mini2440.c: 195: error: unknown field 'twrph1' specified in initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 195: warning: excess elements in struct initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 195: warning: (near initialization for 'mini2440 _ nand_info ')

Arch/arm/mach-s3c2440/mach-mini2440.c: 196: error: unknown field 'nr _ sets' specified in initializer

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 196: Warning: Type defaults to 'int' in Declaration of 'Type name'

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 196: Warning: Type defaults to 'int' in Declaration of 'Type name'

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 196: Error: Negative width in BIT-field '<anonymous>'

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 196: Warning: excess elements in struct initializer

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 196: Warning: (near initialization for 'mini2440 _ nand_info ')

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 197: Error: Unknown field 'sets' specified in initializer

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 197: Warning: excess elements in struct initializer

ARCH/ARM/mach-s3c2440/mach-mini2440.c: 197: Warning: (near initialization for 'mini2440 _ nand_info ')

Arch/arm/mach-s3c2440/mach-mini2440.c: 198: error: unknown field 'ingnore _ unset_ecc 'specified in initializer

Arch/arm/mach-s3c2440/mach-mini2440.c: 198: warning: excess elements in struct initializer

I thought it was an error code and I didn't understand it all morning.
In the afternoon, by looking for online information (really difficult to find), and then compare the original 2.6.32 kernel in foreign lovers written mach-mini2440.c
File, vaguely known as a header file problem.
So add in your own mach-mini2440.c
# Include <linux/mtd. h>
# Include <linux/mtd/nand. h>
# Include <linux/mtd/nand_ecc.h>
# Include <linux/mtd/partitions. h>
# Include <plat/nand. h>
Sure enough, but there is still a line of warning:
Arch/arm/mach-s3c2440/mach-mini2440.c: 233: warning: 'mini2440 _ nand_info 'defined but not used

Download the generated zImage to the board and run it without any situations described in this article. It is estimated that the migration still fails.
It seems that there are many vulnerabilities in this article, and this time I have to rely on the experts on the Internet.

 

Yesterday's Problem
Warning: 'mini2440 _ nand_info 'defined but not used
Today, we finally solved the problem, except yesterday
You have to add other things, in this function:
Static void _ init mini2440_map_io (void)
{
}
Add the following code:
Initi_device_nand.dev.platform_data = & mini2440_nand_info;
Make zimage again, there is no more warning, download to the board,
The partition information of NAND Flash is displayed successfully.
Of course, there is also a so-called "Stone Age" transplant method on the Internet.
After all, there are a lot of internal principles that I still don't understand. Now first
After a while, let's take a look at the migration process.
I have two feelings about the transplantation over the past two days: "Believe in books as well as have no books ",
Second, I don't want to learn some original methods. I just stand on the shoulders of giants to develop
I cannot thoroughly learn it. Although the transplantation is successful, it is still confused ......

 

Related Article

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.