U-boot transplant, structure has no member named ' CAMDIVN
speed.c:in function ' GET_HCLK ':
Speed.c:114:error:structure has no member named ' CAMDIVN '
speed.c:in function ' GET_PCLK ':
Speed.c:154:error:structure has no member named ' CAMDIVN '
MAKE[1]: * * * [SPEED.O] Error 1
MAKE[1]: Leaving directory '/usr/wuxuezhi/u-boot-1.1.6/cpu/arm920t/s3c24x0 '
Make: * * * [cpu/arm920t/s3c24x0/libs3c24x0.a] Error 2
Add a struct variable named CAMDIVN to the clock&power structure on the s3c24x0.h under include
Refer to "Embedded Linux complete development process" P273,
(1) Add a # define Cfg_flash_cfi_driver 1 in Include/configs/sbc2410x.h
(2) Remove FLASH.O from the Board/sbc2410x/makefile
cobjs : =sbc2410x.o flash.o changed to Cobjs : =sbc2410x.o
(3) make test, error is as follows : Compile a lot of warnings, as if it is a compiler problem, here first of all, O (∩_∩) o haha ~
[email protected] u-boot-1.1.6]$ make Sbc2410x_config
Configuring for sbc2410x Board ...
[[email protected] u-boot-1.1.6]$ make
.......
./bmp_logo Logos/denx.bmp >/home/alu/mywork/systems/u-boot-1.1.6/include/bmp_logo.h
MAKE[1]: Leaving directory '/home/alu/mywork/systems/u-boot-1.1.6/tools '
Make-c examples All
MAKE[1]: Entering directory '/home/alu/mywork/systems/u-boot-1.1.6/examples '
/usr/local/arm/usr/bin/arm-ep9312-linux-gnueabi-gcc-g-os-fno-strict-aliasing-fno-common-ffixed-r8-msoft-float-d__kernel__-dtext_base=0x33f80000-i/home/alu/mywork/systems/u-boot-1.1.6/include-fno-builtin-ffreestanding-nostdinc-isystem/usr/local/arm/usr/ bin/. /lib/gcc/arm-ep9312-linux-gnueabi/4.1.1/include-pipe -dconfig_arm-d__arm__-march=armv4-mabi=apcs-gnu-wall- Wstrict-prototypes-c-o hello_world.o hello_world.c
hello_world.c:1: Warning:target CPU does not support Interworkin G
in file included from/home/alu/mywork/systems/u-boot-1.1.6/include/common.h:105,
from hello_world.c:24 :
/home/alu/mywork/systems/u-boot-1.1.6/include/flash.h:36: error: ' Cfg_max_flash_sect ' undeclared here (not in a function)
MAKE[1]: * * * [HELLO_WORLD.O] Error 1
MAKE[1]: Leaving directory '/home/alu/mywork/systems/u-boot-1.1.6/examples '
Make: * * * [examples] Error 2
[Email protected] u-boot-1.1.6]$
There are a lot of compile warnings on the top, regardless, see the error below, this error is caused by undefined ' cfg_max_flash_sect ' . Oh is asked a lot of heroes just know. Add the definition of ' cfg_max_flash_sect ' in include/configs/sbc2410x.h , temporarily defined as # define Cfg_max_flash_sect 1 seems to say that this should be based on the Flash data sheet to define, but I do not know how to define, regardless of the first. Define post-compilation:
added the definition of ' cfg_max_flash_sect ' to compile, with a good bunch of errors:
Cfi_flash.c:1224:error: ' flash_info_t ' has no member named ' CMD _reset '
cfi_flash.c:in function ' Flash_write_cfiword ':
Cfi_flash.c:1257:error: ' flash_info_t ' has no member Named ' Portwidth '
Cfi_flash.c:1279:error: ' flash_info_t ' has no member named ' Vendor '
Cfi_flash.c:1288:error: ' Flash_info_t ' have no member named ' Portwidth '
Cfi_flash.c:1292:error: ' flash_info_t ' has no member named ' Portwidth ' cfi_flash.c:1312:error: ' flash_info_t ' has no member named ' Write_tout '
cfi_flash.c:in function ' flash_make_addr ' :
Cfi_flash.c:221:warning:control reaches end of non-void function
Make[1]: * * * [CFI_FLASH.O] Error 1
make[1]: Leaving directory '/home/alu/mywork/systems/u-boot-1.1.6/drivers '
Make: * * [DRIVERS/LIBDRIVERS.A] Error 2
[[ Email protected]ost u-boot-1.1.6]$
Analysis: in INCLUDE/FLASH.H:
typedef struct {
ULongSize
UShortSector_count;
ULongflash_id;
ULongStart[cfg_max_flash_sect];
UcharProtect[cfg_max_flash_sect];
#ifdef CFG_FLASH_CFI
Uchar portwidth; < Span class= "Apple-converted-space" > &NBSP;&NBSP;
uchar chipwidth;
...
Cfi_flash.c:220:error:structure has no member named ' Portwidth ' "This error means:
There is no portwidth in the structure, from Flash_info_ The definition of T-structure can be known, and is CFG_FLASH_CFI undefined.
So, in include/configs/100ask24x0.h plus a #define CFG_FLASH_CFI 1
(4) Add #define CFG_FLASH_CFI 1 recompile, error:
cfi_flash.c:in function ' flash_init ':
Cfi_flash.c:411:error: ' Cfg_monitor_base ' undeclared function)
Cfi_flash.c:411:error: (each undeclared identifier was reported only once
Cfi_flash.c:411:error:for EAC h function it appears in.)
Make[1]: * * [CFI_FLASH.O] Error 1
make[1]: Leaving directory '/home/boy/document/system/ub/u-boot-1.1.6/drivers '
Make: * * * [DRIVERS/LIBDRIVERS.A] Error 2
Find problem in Flash.h and There is no definition of cfg_monitor_base in 100ask24x0.h, and the 207:ulong flash_get_size in cfi_flash.c (ulong BASE, int banknum);
208: #if defined (cfg_env_is_in_flash) | | defined ( Cfg_env_addr_redund) | | (cfg_monitor_base >= CFG_FLASH_ BASE)
defined in 100ask24x0.h: #define cfg_monitor_base 0x00000000 in the compilation:
(5) When compiling, there should be an error, mine is this, but others did not appear. will require defining a # define CFG_ENV_ADDR (Cfg_flash_base + 0x0f0000) This address I do not know how to define, is the definition of LV800, still do not know is right or wrong!
(6) Finally the compiler passed! Altogether added in the sbc2410x.h
#define CFG_FLASH_CFI_DRIVER 1
#define Cfg_max_flash_sect 1
#define CFG_FLASH_CFI 1
#define Cfg_monitor_base 0x00000000
#define CFG_ENV_ADDR (cfg_flash_base + 0x0f0000) These definitions.
(7) Can finally go down to the top of the board to run, although the display is still a problem
U-boot 1.1.6 (Oct 29 2008-14:15:28)
DRAM: MB
Flash: 0 kB?????? ? Flash Displays a problem
Warning-bad CRC, using default environment
In: serial
Out: serial
Small knowledge:
1) use FL to display memory
SMDK2410 # FL
bank # 1:amd:1x AMD29LV400BB (4Mbit) (this is not modified nor flash settings before)
size:0 MB in one sectors sector Start Addresses:
00000000 (RO) 00004000 (RO) 00006000 (RO) 00008000 (RO) 00010000 (RO)
< Span class= "Apple-converted-space" > 00020000 00030000 00040000 00050000 &NBSP;00060000&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
00070000 (RO)
smdk2410 #
2) Pro off all to remove all memory protection status
Erase All erase all memory
MD 0 display memory information
SMDK2410 # MD 0
00000000:FFFFFFFF ffffffff ffffffff ffffffff................
00000010:FFFFFFFF ffffffff ffffffff ffffffff................
00000020:FFFFFFFF ffffffff ffffffff ffffffff................
00000030:FFFFFFFF ffffffff ffffffff ffffffff................
00000040:FFFFFFFF ffffffff ffffffff ffffffff................
00000050:FFFFFFFF ffffffff ffffffff ffffffff................
00000060:FFFFFFFF ffffffff ffffffff ffffffff................
00000070:FFFFFFFF ffffffff ffffffff ffffffff................
00000080:FFFFFFFF ffffffff ffffffff ffffffff................
00000090:FFFFFFFF ffffffff ffffffff ffffffff&NBSP;................&NBSP;
000000a0:ffffffff ffffffff ffffffff ffffffff , .........
000000b0:ffffffff ffffffff ffffffff ffffffff ................
000000c0:ffffffff ffffffff ffffffff ffffffff ................
000000d0:ffffffff ffffffff ffffffff ffffffff ................
000000e0:ffffffff ffffffff ffffffff ffffffff ... ,
000000f0:ffffffff ffffffff ffffffff ffffffff , ..........
SMDK2410 #
3) Memory copy cp.b Destination address to store $ ( filesize) behind the $ (filesize) is the downloaded file size, directly with $ (filesize), does not change.
4) Define debug and you can use CFI for debugging. As to what is, do not know! Never tried, just heard ...
uboot1.1.6 nor FLASH problem solving method