[U-Boot] Undefined reference to'flash_sect_protect' in env_flash.c

Hi there,
I met this compiling error, any idea?
/common/env_flash.c:312: undefined reference to `flash_sect_protect' /common/env_flash.c:316: undefined reference to `flash_sect_erase' /common/env_flash.c:329: undefined reference to `flash_sect_protect' make: *** [u-boot] Error 1
Regards,
Johnson Yu

Hi,
I met this compiling error, any idea?
/common/env_flash.c:312: undefined reference to `flash_sect_protect' /common/env_flash.c:316: undefined reference to `flash_sect_erase' /common/env_flash.c:329: undefined reference to `flash_sect_protect' make: *** [u-boot] Error 1
Sure you are missing the definition of those functions. Maybe you'd care to give us information so we can reproduce this? Is this a standard configuration? What version of U-Boot?
Thanks Detlev

Hi Detlev,
Hi,
I met this compiling error, any idea?
/common/env_flash.c:312: undefined reference to `flash_sect_protect' /common/env_flash.c:316: undefined reference to `flash_sect_erase' /common/env_flash.c:329: undefined reference to `flash_sect_protect' make: *** [u-boot] Error 1
Sure you are missing the definition of those functions. Maybe you'd care to give us information so we can reproduce this? Is this a standard configuration? What version of U-Boot?
Thanks Detlev
These problems have gone and I did finally get the u-boot.bin on version 2009.06. I'm porting u-boot to a self-made board over AT91RM9200. There are some further small problems with the operation on NOR flash, whose model is INTEL 28F640J3.
I copied flash.c from board/xm250/ and made modifications to suit my own board because xm250 uses the same flash chip. I followed the steps that: burning loader.bin-> u-boot.bin -> entering u-boot prompt -> downloading and copying boot.bin to address 0x10000000 -> downloading and copying u-boot.gz to address 0x10010000, then set BMS to low and reset the board......smooth process except the following info:
1)existed at the startup of u-boot:
Program downloaded successfully
Jump to Application!
U-Boot 2009.06 (Jun 30 2009 - 14:35:56)
DRAM: 32 MB Flash lock bit operation timed out Flash lock bit operation failed at 10000000, CSR=EA000006 Flash lock bit operation failed at 10060000, CSR=FFFFFFFF Flash: 8 MB *** Warning - bad CRC, using default environment
2)existed when running "protect" command:
U-Boot> protect off 10020000 1009ffff Flash lock bit operation failed at 10020000, CSR=FFFFFFFF ..Flash lock bit operation failed at 10040000, CSR=FFFFFFFF ..Flash lock bit operation failed at 10060000, CSR=FFFFFFFF ..Flash lock bit operation failed at 10080000, CSR=FFFFFFFF .. done Un-Protected 4 sectors
All seem to be timed out operations.....any idea please?
Regards,
Johnson Yu
___________________________________________________________ All New Yahoo! Mail Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

Hi,
I met this compiling error, any idea?
/common/env_flash.c:312: undefined reference to `flash_sect_protect' /common/env_flash.c:316: undefined reference to `flash_sect_erase' /common/env_flash.c:329: undefined reference to `flash_sect_protect' make: *** [u-boot] Error 1
Sure you are missing the definition of those functions. Maybe you'd care to give us information so we can reproduce this? Is this a standard configuration? What version of U-Boot?
These problems have gone and I did finally get the u-boot.bin on version 2009.06. I'm porting u-boot to a self-made board over AT91RM9200. There are some further small problems with the operation on NOR flash, whose model is INTEL 28F640J3.
I copied flash.c from board/xm250/ and made modifications to suit my own board because xm250 uses the same flash chip.
Ah, please don't do that. A quick search shows that this chip is CFI compatible. So instead of using yet another customer flash driver(tm), please try using the cfi driver (-> CONFIG_FLASH_CFI_DRIVER).
All seem to be timed out operations.....any idea please?
Yes, use the standard driver ;)
Cheers Detlev

Hi,
Simply put, my question is:
To port U-boot-2009.06 into an AT91RM9200-based self-produced board, all the modifications have successfully been done and this latest U-boot runs on my board, named ceiboard. Normal procedure is, downloading loader.bin then U-boot.bin and running on RAM, after that loading boot.bin to FLASH 0x10000000 followed by U-boot.gz on FLASH too, and then set BMS to boot from external memory--FLASH. So, boot.bin runs first and it uncompresses U-boot.gz to RAM and jump to that address on RAM. Now, I don't want this boot.bin thing as a separate file and want it as part of U-boot.bin, how should I do it??
My solution is:
1) copy entry.S, crt0.S, initboot.c, AT91RM9200.h to /board/geari/ceiboard/(which is my board location); and change the jump instruction in crt0.S---not to call the uncompress function, boot(), in AT91RM9200BOOT/main.c, but to call _start in /cpu/arm920t/start.S --- and, of course, to not confuse the compiler, I changed _start of start.S to uboot_start and kept _start in AT91RM9200BOOT/entry.S as the unique entry point of the program. like below:
b boot ===> b uboot_start (in crt0.S)
2) modify linker script /board/geari/ceiboard/u-boot.lds to: ..text : { board/geari/ceiboard/entry.o (.text) board/geari/ceiboard/crt0.o (.text) cpu/arm920t/start.o (.text) *(.text) } and with rest of u-boot.lds intact.
then I started compiling, and got some errors:
/home/johnson-yn/GEARI/u-boot-ceiboard/include/asm/arch/AT91RM9200.h:103: error: expected identifier or ‘(’ before numeric constant /home/johnson-yn/GEARI/u-boot-ceiboard/include/asm/arch/AT91RM9200.h:104: error: expected ‘;’ before ‘AT91_REG’ make[1]: *** [mkimage.o] Error 1 make[1]: Leaving directory `/home/johnson-yn/GEARI/u-boot-ceiboard/tools' make: *** [tools] Error 2
any suggestions????
Regards,
Johnson. Yu
Detlev Zundel wrote:
Hi,
I met this compiling error, any idea?
/common/env_flash.c:312: undefined reference to `flash_sect_protect' /common/env_flash.c:316: undefined reference to `flash_sect_erase' /common/env_flash.c:329: undefined reference to `flash_sect_protect' make: *** [u-boot] Error 1
Sure you are missing the definition of those functions. Maybe you'd care to give us information so we can reproduce this? Is this a standard configuration? What version of U-Boot?
Thanks Detlev
___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html
participants (2)
-
Detlev Zundel
-
Johnson Yu