The 2.6.14 kernel is rarely used now, but due to project needs, the 2.6.14 kernel was recently ported to S3C2440, and the CS8900 network card driver was ported (for network card driver porting, refer to http://blog.csdn.net/ce123/article/details/8424399 ). The reason for porting the network card driver is that the yaffs2 format file system has not been successfully mounted, and the error message after startup is as follows:
view plain copy
Mounted devfs on /dev
Freeing init memory: 92K
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Freeing init memory: 92K
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
I can only put this question aside for now, and finally successfully mounted nfs. I will study the problem of yaffs2 format file system in depth later. I will sort out what I have done recently, for fear of forgetting it.
view plain copy
print?
- ARCH ?= arm
- CROSS_COMPILE ?= arm-linux-
view plain copy
print?
- static void __init smdk2440_map_io(void)
- {
- s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
- s3c24xx_init_clocks(12000000);//12M
- s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
- s3c24xx_set_board(&smdk2440_board);
- }
view plain copy
print?
- #include
- #include
- #include
-
- /* NAND parity */
-
- static struct mtd_partition smdk_default_nand_part[] = {
- [0]= {
- .name = "Board_uboot",
- .offset = 0x00000000,
- .size = 0x00080000,
- },
- [1]= {
- .name = "Board_kernel",
- .offset= 0x00240000,
- .size = 0x00200000,
- },
- [2]= {
- .name = "Board_yaffs2",
- .offset= 0x00440000,
- .size = 0x0FB40000,
- }
- };
name: represents the partition name
size: represents the size of the flash partition (unit: bytes)
offset: represents the starting address of the flash partition (offset relative to 0x0)
is divided into 3 areas, storing uboot, kernel and file system respectively.
view plain copy
print?
- static struct s3c2410_nand_set smdk_nand_sets[] = {
- [0] = {
- .name = "NAND",
- .nr_chips = 1,
- .nr_partitions = ARRAY_SIZE(smdk_default_nand_part),
- .partitions = smdk_default_nand_part,
- },
- };
nr_partitions: Indicates the number of partitions defined in partition_info
partitions: partition information table
view plain copy
print?
- static struct s3c2410_platform_nand smdk_nand_info = {
- .tacls = 20,
- .twrph0 = 60,
- .twrph1 = 20,
- .nr_sets = ARRAY_SIZE(smdk_nand_sets),
- .sets = smdk_nand_sets,
- };
The meanings of tacls, twrph0, and twrph1 can be found in the S3C2440 data sheet. These three values will eventually be set to NFCONF.
sets: supported partition sets
nr_set: number of partition sets
view plain copy
print?
- struct platform_device s3c_device_nand = {
- .name = "s3c2410-nand",
- .id = -1,
- .num_resources = ARRAY_SIZE(s3c_nand_resource),
- .resource = s3c_nand_resource,
- .dev = {
- .platform_data = &smdk_nand_info
- }
- };
name: device name
id: valid device number, if there is only one device, it is -1, if there are multiple devices, it starts counting from 0.
num_resource: how many register areas
resource: the first address of the register area array
dev: supported Nand Flash devices
view plain copy
print?
- static struct platform_device *smdk2440_devices[] __initdata = {
- &s3c_device_usb,
- &s3c_device_lcd,
- &s3c_device_wdt,
- &s3c_device_i2c,
- &s3c_device_iis,
- &s3c_device_nand, //Add
- };
view plain copy
print?
- chip->eccmode = NAND_ECC_NONE;
view plain copy
print?
- config DEVFS_FS
- bool "/dev file system support (OBSOLETE)"
- depends on EXPERIMENTAL
- help
- This is support for devfs, a virtual file system (like /proc) which
- provides the file system interface to device drivers, normally found
- in /dev. Devfs does not depend on major and minor number
- allocations. Device drivers register entries in /dev which then
- appear automatically, which means that the system administrator does
- not have to create character and block special device files in the
- /dev directory using the mknod command (or MAKEDEV script) anymore.
-
- This is work in progress. If you want to use this, you *must* read
- the material in
, especially
- the file README there.
-
- Note that devfs no longer manages /dev/pts! If you are using UNIX98
- ptys, you will also need to mount the /dev/pts filesystem (devpts).
-
- Note that devfs has been obsoleted by udev,
-
.
- It has been stripped down to a bare minimum and is only provided for
- legacy installations that use its naming scheme which is
- unfortunately different from the names normal Linux installations
- use.
-
- If unsure, say N.
-
- config DEVFS_MOUNT
- bool "Automatically mount at boot"
- depends on DEVFS_FS
- help
- This option appears if you have CONFIG_DEVFS_FS enabled. Setting
- this to 'Y' will make the kernel automatically mount devfs onto /dev
- when the system is booted, before the init thread is started.
- You can override this with the "devfs=nomount" boot option.
-
- If unsure, say N.
-
- config DEVFS_DEBUG
- bool "Debug devfs"
- depends on DEVFS_FS
- help
- If you say Y here, then the /dev file system code will generate
- debugging messages. See the file
-
for more
- details.
-
- If unsure, say N.
-
- config DEVPTS_FS_XATTR
- bool "/dev/pts Extended Attributes"
- depends on UNIX98_PTYS
- help
- Extended attributes are name:value pairs associated with inodes by
- the kernel or by users (see the attr(5) manual page, or visit
-
for details).
-
- If unsure, say N.
-
- config DEVPTS_FS_SECURITY
- bool "/dev/pts Security Labels"
- depends on DEVPTS_FS_XATTR
- help
- Security labels support alternative access control models
- implemented by security modules like SELinux. This option
- enables an extended attribute handler for file security
- labels in the /dev/pts filesystem.
-
- If you are not using a security module that requires using
- extended attributes for file security labels, say N.
-
- config TMPFS
- bool "Virtual memory file system support (former shm fs)"
- help
- Tmpfs is a file system which keeps all files in virtual memory.
-
- Everything in tmpfs is temporary in the sense that no files will be
- created on your hard drive. The files live in memory and swap
- space. If you unmount a tmpfs instance, everything stored therein is
- lost.
-
- See
for details.
http://blog.csdn.net/ce123/article/details/6581248 ), and the basic process is very similar. You can usually port a kernel by following this process, but understanding the process behind it is the best way.
Keywords:linux-2.6.14
Reference address:Linux-2.6.14 ported to S3C2440
offset: represents the starting address of the flash partition (offset relative to 0x0)
is divided into 3 areas, storing uboot, kernel and file system respectively.
view plain copy
print?
view plain copy
print?
- struct platform_device s3c_device_nand = {
- .name = "s3c2410-nand",
- .id = -1,
- .num_resources = ARRAY_SIZE(s3c_nand_resource),
- .resource = s3c_nand_resource,
- .dev = {
- .platform_data = &smdk_nand_info
- }
- };
name: device name
id: valid device number, if there is only one device, it is -1, if there are multiple devices, it starts counting from 0.
num_resource: how many register areas
resource: the first address of the register area array
dev: supported Nand Flash devices
id: valid device number, if there is only one device, it is -1, if there are multiple devices, it starts counting from 0.
num_resource: how many register areas
resource: the first address of the register area array
dev: supported Nand Flash devices
view plain copy
print?
- static struct platform_device *smdk2440_devices[] __initdata = {
- &s3c_device_usb,
- &s3c_device_lcd,
- &s3c_device_wdt,
- &s3c_device_i2c,
- &s3c_device_iis,
- &s3c_device_nand, //Add
- };
view plain copy
print?
- chip->eccmode = NAND_ECC_NONE;
view plain copy
print?
- config DEVFS_FS
- bool "/dev file system support (OBSOLETE)"
- depends on EXPERIMENTAL
- help
- This is support for devfs, a virtual file system (like /proc) which
- provides the file system interface to device drivers, normally found
- in /dev. Devfs does not depend on major and minor number
- allocations. Device drivers register entries in /dev which then
- appear automatically, which means that the system administrator does
- not have to create character and block special device files in the
- /dev directory using the mknod command (or MAKEDEV script) anymore.
-
- This is work in progress. If you want to use this, you *must* read
- the material in
, especially
- the file README there.
-
- Note that devfs no longer manages /dev/pts! If you are using UNIX98
- ptys, you will also need to mount the /dev/pts filesystem (devpts).
-
- Note that devfs has been obsoleted by udev,
-
.
- It has been stripped down to a bare minimum and is only provided for
- legacy installations that use its naming scheme which is
- unfortunately different from the names normal Linux installations
- use.
-
- If unsure, say N.
-
- config DEVFS_MOUNT
- bool "Automatically mount at boot"
- depends on DEVFS_FS
- help
- This option appears if you have CONFIG_DEVFS_FS enabled. Setting
- this to 'Y' will make the kernel automatically mount devfs onto /dev
- when the system is booted, before the init thread is started.
- You can override this with the "devfs=nomount" boot option.
-
- If unsure, say N.
-
- config DEVFS_DEBUG
- bool "Debug devfs"
- depends on DEVFS_FS
- help
- If you say Y here, then the /dev file system code will generate
- debugging messages. See the file
-
for more
- details.
-
- If unsure, say N.
-
- config DEVPTS_FS_XATTR
- bool "/dev/pts Extended Attributes"
- depends on UNIX98_PTYS
- help
- Extended attributes are name:value pairs associated with inodes by
- the kernel or by users (see the attr(5) manual page, or visit
-
for details).
-
- If unsure, say N.
-
- config DEVPTS_FS_SECURITY
- bool "/dev/pts Security Labels"
- depends on DEVPTS_FS_XATTR
- help
- Security labels support alternative access control models
- implemented by security modules like SELinux. This option
- enables an extended attribute handler for file security
- labels in the /dev/pts filesystem.
-
- If you are not using a security module that requires using
- extended attributes for file security labels, say N.
-
- config TMPFS
- bool "Virtual memory file system support (former shm fs)"
- help
- Tmpfs is a file system which keeps all files in virtual memory.
-
- Everything in tmpfs is temporary in the sense that no files will be
- created on your hard drive. The files live in memory and swap
- space. If you unmount a tmpfs instance, everything stored therein is
- lost.
-
- See
for details.
http://blog.csdn.net/ce123/article/details/6581248 ), and the basic process is very similar. You can usually port a kernel by following this process, but understanding the process behind it is the best way.
Keywords:linux-2.6.14
Reference address:Linux-2.6.14 ported to S3C2440
- chip->eccmode = NAND_ECC_NONE;
view plain copy
print?
- config DEVFS_FS
- bool "/dev file system support (OBSOLETE)"
- depends on EXPERIMENTAL
- help
- This is support for devfs, a virtual file system (like /proc) which
- provides the file system interface to device drivers, normally found
- in /dev. Devfs does not depend on major and minor number
- allocations. Device drivers register entries in /dev which then
- appear automatically, which means that the system administrator does
- not have to create character and block special device files in the
- /dev directory using the mknod command (or MAKEDEV script) anymore.
-
- This is work in progress. If you want to use this, you *must* read
- the material in
, especially
- the file README there.
-
- Note that devfs no longer manages /dev/pts! If you are using UNIX98
- ptys, you will also need to mount the /dev/pts filesystem (devpts).
-
- Note that devfs has been obsoleted by udev,
-
.
- It has been stripped down to a bare minimum and is only provided for
- legacy installations that use its naming scheme which is
- unfortunately different from the names normal Linux installations
- use.
-
- If unsure, say N.
-
- config DEVFS_MOUNT
- bool "Automatically mount at boot"
- depends on DEVFS_FS
- help
- This option appears if you have CONFIG_DEVFS_FS enabled. Setting
- this to 'Y' will make the kernel automatically mount devfs onto /dev
- when the system is booted, before the init thread is started.
- You can override this with the "devfs=nomount" boot option.
-
- If unsure, say N.
-
- config DEVFS_DEBUG
- bool "Debug devfs"
- depends on DEVFS_FS
- help
- If you say Y here, then the /dev file system code will generate
- debugging messages. See the file
-
for more
- details.
-
- If unsure, say N.
-
- config DEVPTS_FS_XATTR
- bool "/dev/pts Extended Attributes"
- depends on UNIX98_PTYS
- help
- Extended attributes are name:value pairs associated with inodes by
- the kernel or by users (see the attr(5) manual page, or visit
-
for details).
-
- If unsure, say N.
-
- config DEVPTS_FS_SECURITY
- bool "/dev/pts Security Labels"
- depends on DEVPTS_FS_XATTR
- help
- Security labels support alternative access control models
- implemented by security modules like SELinux. This option
- enables an extended attribute handler for file security
- labels in the /dev/pts filesystem.
-
- If you are not using a security module that requires using
- extended attributes for file security labels, say N.
-
- config TMPFS
- bool "Virtual memory file system support (former shm fs)"
- help
- Tmpfs is a file system which keeps all files in virtual memory.
-
- Everything in tmpfs is temporary in the sense that no files will be
- created on your hard drive. The files live in memory and swap
- space. If you unmount a tmpfs instance, everything stored therein is
- lost.
-
- See
for details.
http://blog.csdn.net/ce123/article/details/6581248 ), and the basic process is very similar. You can usually port a kernel by following this process, but understanding the process behind it is the best way.
Keywords:linux-2.6.14
Reference address:Linux-2.6.14 ported to S3C2440
Previous article:fastcall and asmlinkage macros in linux kernel
Next article:__read_mostly variable in linux kernel
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
Guess you like
- Learn about C2000 32-bit microcontrollers
- Migrate ssh service to EK200-zlib-openssl-openssh
- Application Note Download | Keysight Technologies "Quickly Find and Identify Hidden Signal Errors"
- Ask a Question
- Cost less than 5 yuan, reliable single-fire power supply solution (using NP101A chip, including PDF...
- Mobile station development board TI MSP430FR5969LaunchPad is here!
- Can the STM32F103T8U6 use CAN?
- The romance and art of electronic engineers
- 【AT-START-F425 Review】Interpretation of I2C i2c_application.c
- Based on TI Da Vinci series TMS320DM8148 floating-point DSP C674xRGMII Gigabit Ethernet port, HDMI output interface