[U-Boot-Users] Port U-Boot to SBC-2410X

luo.jinhua
2005-08-31T13:55:39Z

hi, all.

SBC-2410X is a board based on SAMSUNG S3C2410 made by friendly-arm, which is
similiar to smdk2410. Now, I succeed to port U-Boot to SBC-2410X.

In addition to write the new hardware-specific configurations for SBC-2410X
according to steps from U-Boot's README, I make U-Boot's nand subsystem work
on SBC-2410X and add to hush cmdline-editing (but AUTO_COMPLETE cannot work to
go with it yet).

About bugs of NAND subsystem
=============================
The original nand subsystem lacks flash_chip-specific functions like NF_Conf
and the related enum variable NFCE_STATE for each board, right? Though some
boards put them in one sole head file in their board directory, it seems
broken because the compilation always shows errors.

Take VCMA9 board for example.
Though VCMA9 defines NFCE_STATE, NF_Cmd etc in "board/mpl/vcma9/vcma9.h", but
when compiling arm-linux-gcc will complains:
In file included from /root/u-boot-1.1.3/include/config.h:2,
from /root/u-boot-1.1.3/include/common.h:35,
from cmd_nand.c:11:
/root/u-boot-1.1.3/include/configs/VCMA9.h:280:1: warning: this is the
location of the previous definition
cmd_nand.c: In function `NanD_WaitReady':
cmd_nand.c:557: warning: implicit declaration of function `NF_WaitRB'
cmd_nand.c: In function `NanD_Command':
cmd_nand.c:572: warning: implicit declaration of function `NF_Cmd'
cmd_nand.c:566: warning: unused variable `nandptr'
cmd_nand.c: In function `NanD_Address':
cmd_nand.c:614: warning: implicit declaration of function `NF_Addr'
cmd_nand.c: In function `NanD_IdentChip':
cmd_nand.c:645: warning: implicit declaration of function `NF_SetCE'
cmd_nand.c:645: error: `NFCE_LOW' undeclared (first use in this function)
cmd_nand.c:645: error: (Each undeclared identifier is reported only once
cmd_nand.c:645: error: for each function it appears in.)
cmd_nand.c:652: error: `NFCE_HIGH' undeclared (first use in this function)
cmd_nand.c:671: warning: implicit declaration of function `NF_Read'
cmd_nand.c: In function `NanD_ReadBuf':
cmd_nand.c:812: warning: unused variable `nandptr'
cmd_nand.c: In function `nand_read_ecc':
cmd_nand.c:915: error: `NFCE_LOW' undeclared (first use in this function)
cmd_nand.c:1029: error: `NFCE_HIGH' undeclared (first use in this function)
cmd_nand.c: In function `nand_write_page':
cmd_nand.c:1136: warning: implicit declaration of function `NF_Write'
cmd_nand.c:1047: warning: unused variable `nandptr'
cmd_nand.c: In function `nand_write_ecc':
cmd_nand.c:1278: error: `NFCE_LOW' undeclared (first use in this function)
cmd_nand.c:1324: error: `NFCE_HIGH' undeclared (first use in this function)
cmd_nand.c: In function `nand_read_oob':
cmd_nand.c:1356: error: `NFCE_LOW' undeclared (first use in this function)
cmd_nand.c:1385: error: `NFCE_HIGH' undeclared (first use in this function)
cmd_nand.c: In function `nand_write_oob':
cmd_nand.c:1407: error: `NFCE_LOW' undeclared (first use in this function)
cmd_nand.c:1461: error: `NFCE_HIGH' undeclared (first use in this function)
cmd_nand.c:1399: warning: unused variable `nandptr'
cmd_nand.c: In function `nand_erase':
cmd_nand.c:1530: error: `NFCE_LOW' undeclared (first use in this function)
cmd_nand.c:1609: error: `NFCE_HIGH' undeclared (first use in this function)
make[1]: *** [cmd_nand.o] Error 1
make[1]: Leaving directory `/root/u-boot-1.1.3/common'
make: *** [common/libcommon.a] Error 2

I finally put them in "include/linux/mtd/nand.h", and it works.

cmdline editing
==================
Though U-Boot brings in hush, it lacks cmdline-editing. That is inconvenient.
I pick codes heavily borrowed from vivi bootloader and integrate them into
U-Boot. Now, the hush can locate the history command and acts like xterm.

I would like to pack the new board codes and nand subsystem fixes as one
patch, while the cmdline-editing codes (in "common/main.c") is the other. Is
this ok?

gdlc mail
Open WebMail Project (http://openwebmail.org)