Current Burn-write:
Fs:
NFS 30000000 192.168.1.17:/WORK/NFS_ROOT/FIRST_FS_MDEV.YAFFS2//NFS mount cannot be used here, can only be burned directly
NAND Erase.part root//reason: The kernel does not yet support dm9000c
NAND write.yaffs 30000000 260000 $filesize
Kernel
NFS 30000000 192.168.1.17:/work/nfs_root/uimage_new//Use Uboot support for dm9000, where you can use Uboot's NFS axe King
Bootm 30000000
Porting kernel linux-3.4.2 support for dm9000c to mount the root filesystem with NFS
1. Compiling
2. Resolving errors
2.1 Header file is wrong: Remove or rename
2.2 Macros wrong: Renaming or using new macros
2.3 Some functions are not used: renaming or using new functions
The current kernel has dm9000, after booting the kernel and root file system
1. Set IP
#ifconfig eth0 192.168.1.3
#ping 192.168.1.17
After pinging the server, the method of hanging the file system is:
Mount-t Nfs-o nolock,vers=2 192.168.1.17:/work/nfs_root/fs_mini_mdev_new/mnt
MINI2440 has supported its own dm9000.
Its entry function is:
Platform_driver_register (&dm9000_driver);
Platform_driver Dm9000_driver = {
Dm9000_probe
Platform_device Mini2440_device_eth
Platform_device *mini2440_devices[]
Platform_add_devices (Mini2440_devices, Array_size (mini2440_devices));
Array mini2440_devices[] is registered in the kernel.
We use the mach-smdk2440 inside No
/* DM9000AEP 10/100 Ethernet Controller */
static struct resource mini2440_dm9k_resource[] = {
[0] = {
. Start = Mach_mini2440_dm9k_base,
. end = Mach_mini2440_dm9k_base + 3,
. Flags = Ioresource_mem
},
[1] = {
. Start = Mach_mini2440_dm9k_base + 4,
. end = Mach_mini2440_dm9k_base + 7,
. Flags = Ioresource_mem
},
[2] = {
. Start = Irq_eint7,
. end = Irq_eint7,
. Flags = IORESOURCE_IRQ | Ioresource_irq_highedge,
}
};
/*
* The DM9000 has no EEPROM, and it's MAC address is set by
* The bootloader before starting the kernel.
*/
static struct Dm9000_plat_data Mini2440_dm9k_pdata = {
. Flags = (Dm9000_platf_16bitonly | Dm9000_platf_no_eeprom),
};
static struct Platform_device Mini2440_device_eth = {
. Name = "dm9000",
. id =-1,
. num_resources = Array_size (Mini2440_dm9k_resource),
. resource = Mini2440_dm9k_resource,
. Dev = {
. Platform_data = &mini2440_dm9k_pdata,
},
};
So add in mach-smdk2440.c:
Add by Flinn for dm9000
#define MACH_SMDK2440_DM9K_BASE (S3C2410_CS4 + 0x300)
/* DM9000AEP 10/100 Ethernet Controller */
static struct resource smdk2440_dm9k_resource[] = {
[0] = {
. Start = Mach_smdk2440_dm9k_base,
. end = Mach_smdk2440_dm9k_base + 3,
. Flags = Ioresource_mem
},
[1] = {
. Start = Mach_smdk2440_dm9k_base + 4,
. end = Mach_smdk2440_dm9k_base + 7,
. Flags = Ioresource_mem
},
[2] = {
. Start = Irq_eint7,
. end = Irq_eint7,
. Flags = IORESOURCE_IRQ | Ioresource_irq_highedge,
}
};
/*
* The DM9000 has no EEPROM, and it's MAC address is set by
* The bootloader before starting the kernel.
*/
static struct Dm9000_plat_data Smdk2440_dm9k_pdata = {
. Flags = (Dm9000_platf_16bitonly | Dm9000_platf_no_eeprom),
};
static struct Platform_device Smdk2440_device_eth = {
. Name = "dm9000",
. id =-1,
. num_resources = Array_size (Smdk2440_dm9k_resource),
. resource = Smdk2440_dm9k_resource,
. Dev = {
. Platform_data = &smdk2440_dm9k_pdata,
},
};
Compilation Error:
Arch/arm/mach-s3c24xx/mach-smdk2440.c:186:error:variable ' smdk2440_dm9k_pdata ' have initializer but incomplete type
Because the header file is missing
#include <linux/dm9000.h>
Kernel linux-3.4.2 Support dm9000