Platform:freescale MPC8379ERDB Board (There are no complete parameter and instructions with the board when getting it)
Pls pay attention to the following points:The base address of the Nand Flash is 0xF8000000, including u-boot and dtb files.
Porting Steps:1. modify the file : include/configs/MPC837XERDB.h#define CFG_PROMPT "Ehometech# " /* Monitor Command Prompt */ ==> line 508
#define CONFIG_IPADDR 192.168.0.220 ==> ipaddr for the board
#define CONFIG_SERVERIP 192.168.0.200
#define CONFIG_GATEWAYIP 192.168.0.1
2.pls remove all the '#if 0' in parts concerning nand flashfor example below:
//#if 0
#define CONFIG_CMD_NAND
//#endif
3.modify the base address for the nand flash as below#define CFG_NAND_BASE 0xf8000000 /* 0xf8000000 */
#define CFG_MAX_NAND_DEVICE 1
#define NAND_MAX_CHIPS 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#define CFG_LBLAWBAR1_PRELIM CFG_NAND_BASE
#define CFG_LBLAWAR1_PRELIM 0x8000000E /* 32KB */
4.exect the command below for configurationmake MPC837XERDB_config
5.exect the command below for building u-boot.binmake
and then brun the u-boot.bin image into the flash with base address 0xf8000000
6.reset u-boot and set the parameter=>setenv bootcmd run run_vscld1\;tftp 1000000 uImage\;tftp 1200000 mpc8379erdb.dtb\;tftp 2000000 ramdisk\;bootm 1000000 2000000 1200000
setenv bootargs root=/dev/ram rw console=ttyS0,115200 ramdisk_size=135696
modify the file mpc8379_rdb.dtb in the kernel, add the following parts, pay attention for the address for every part.
elbc@e0005000 {
linux,phandle =
;
device_type = "elbc";
compatible = "fsl-elbc";
reg = ;
interrupts = <4d>;
interrupt-parent = < &ipic >;
/* allow-direct-device-sleep; */
};
nand@f8000000 {
device_type = "nand";
compatible = "fsl-nand";
reg = ;
partitions = <>;/* DTB 1M RO */
partition-names = "U-Boot-NAND", "JFFS2-NAND", "Ramdisk-NAND",
"Reserve-NAND", "Kernel-NAND", "DTB-NAND";
};
7.building dtb file:
dtc –f –I dts –O dtb –R 8 –S 0x3000 mpc8379_rdb.dts >/tftpboot/mpc8379erdb.dtb
8.configure the kernel for supporint MTD:
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
--- Memory Technology Device (MTD) support
[*] MTD partitioning support
[*] Command line partition table parsing
<*> Caching block device access to MTD devices
Mapping Drivers for chip access --->
<*> Flash device in physical memory map based on OF description
<*> NAND Device support --->
[*] NAND support for MPC837x
File systems --->
Miscellaneous filesystems --->
<*> Journaling Flash File System v2 (JFFS2) support
(0) JFFS2 debugging verbosity
[*] JFFS2 write-buffering support
9.building uImage file
=> tftp 200000 $nand_jffs2_fs
=> nand erase
=> nand write.jffs2 200000 100000 $filesize /* flash JFFS2 FS to the jffs2-nand partition of NAND device */
mount -t jffs2 /dev/mtdblock7 /mnt/cdrom/