How to upgrade 4G with 2G NandFlash?

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

How to upgrade 4G with 2G NandFlash?

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is the Uboot code 2G replaced by 4G need to be modified, the following about Linux3.0 kernel need to modify the file.

Linux kernel modification file

Linux-3.0.1/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. In the previous file system released by Feiling, the /etc/init.d/rcS script mounted the fourth partition under the /mnt directory. This can be based on its own needs. NandFlash still uses three partitions, you can not change this file. If you change this file, use 4 partitions. Don't forget to change the /etc/init.d/rcS file and mount the fourth partition under the /mnt directory.

Before changing, check whether the /etc/init.d/rcS file in the file system has mounted the fourth partition, or execute the mount command to check whether the current system is three partitions or four partitions, and modify it according to the actual situation.

Linux-3.0.1/arch/arm/plat-samsung/dev-nand.c

# Nandflash device description information.

Linux-3.0.1/drivers/mtd/nand/nand_base.c

# NandFlash Driver Files for Basic Read and Write Operations

Linux-3.0.1/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Linux-3.0.1/drivers/mtd/nand/s3c_nand.c

# NandFlash driver files, NandFlash driver registration, NandFlash device scanning and other important.

Linux-3.0.1/include/mtd/mtd-abi.h

# NandFlash driver header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

File system parts do not need any changes, use 2G version of Yaffs2 production tools

mkyaffs2image-256DDR will create rootfs.yaffs2 for 4G NandFlash.

Note: After the above operations are completed, after the system runs successfully, you can execute the df -h command in the HyperTerminal or DNW. At this time, you can see the size of the NandFlash space.

-------------------------------------------------- --------------------------Cutting ---------------------- -------------------------------------------------- ------

Android2.3 2G NandFlash upgrade 4G NandFlash approach

It should be noted that the Samsung 6410 platform is not suitable for product development using the Android 2.3 system. If the Android system is used in the product, it is recommended to use the A8, A9 processor with a Samsung 210 processor or higher. Looks like 6410 Android is the development board manufacturers do more of their own, learning can, but basically just learning to use it. . .

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is where the Uboot code 2G is replaced by 4G. The following are the files that need to be modified in the Android 2.3 kernel.

Linux kernel modification file

Android2.3_kernel_v1.01/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. The previously released Android system has three partitions. After modifying this file, be careful not to forget to modify the file system. The file system part needs to mount the fourth partition to /mnt/disk. .

Android2.3_kernel_v1.01/arch/arm/plat-samsung/dev-nand.c

# Nandflash Device description information, which defines the NandFlash register address range, is the most basic file in the NandFlash driver.

Android2.3_kernel_v1.01/drivers/mtd/nand/nand_base.c

# NandFlash driver files for basic read and write and erase operations are important files in the NandFlash driver.

Android2.3_kernel_v1.01/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Android2.3_kernel_v1.01/drivers/mtd/nand/s3c_nand.c

# NandFlash driver file, NandFlash driver registration, NandFlash device scanning, hardware ECC and other important functions.

Android2.3_kernel_v1.01/include/linux/mtd/nand.h

The #NandFlash macro, along with an important structure definition file, is one of the very important header files in the NandFlash driver.

Android2.3_kernel_v1.01/include/mtd/mtd-abi.h

# NandFlash driver header file, which defines some auxiliary structures.

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

The file system section is slightly modified. Mount the /mnt/disk folder to the /dev/block/mtdblock3 block device.

Modify the file:

Android2.3.4_32bit/vendor/forlinx/OK6410/init.rc

The revised content is as follows:

On fs

# mount mtd partitions

# Mount /system rw first to give the filesystem a chance to save a checkpoint

Mount yaffs2 mtd@system /system

Mount yaffs2 mtd@system /system rw remount

Mount yaffs2 mtd@userdata /data nosuid nodev

Mount yaffs2 mtd@cache /cache nosuid nodev

Mount yaffs2 /dev/block/mtdblock3 /mnt/disk

The last line adds new commands. The init.rc file already contains other commands.

This modification is based on OK6410 Linux2.6.28/3.0.1

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is the Uboot code 2G replaced by 4G need to be modified, the following about Linux3.0 kernel need to modify the file.

Linux kernel modification file

Linux-3.0.1/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. In the previous file system released by Feiling, the /etc/init.d/rcS script mounted the fourth partition under the /mnt directory. This can be based on its own needs. NandFlash still uses three partitions, you can not change this file. If you change this file, use 4 partitions. Don't forget to change the /etc/init.d/rcS file and mount the fourth partition under the /mnt directory.

Before changing, check whether the /etc/init.d/rcS file in the file system has mounted the fourth partition, or execute the mount command to check whether the current system is three partitions or four partitions, and modify it according to the actual situation.

Linux-3.0.1/arch/arm/plat-samsung/dev-nand.c

# Nandflash device description information.

Linux-3.0.1/drivers/mtd/nand/nand_base.c

# NandFlash Driver Files for Basic Read and Write Operations

Linux-3.0.1/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Linux-3.0.1/drivers/mtd/nand/s3c_nand.c

# NandFlash driver files, NandFlash driver registration, NandFlash device scanning and other important.

Linux-3.0.1/include/mtd/mtd-abi.h

# NandFlash driver header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

File system parts do not need any changes, use 2G version of Yaffs2 production tools

mkyaffs2image-256DDR will create rootfs.yaffs2 for 4G NandFlash.

Note: After the above operations are completed, after the system runs successfully, you can execute the df -h command in the HyperTerminal or DNW. At this time, you can see the size of the NandFlash space.

-------------------------------------------------- --------------------------Cutting ---------------------- -------------------------------------------------- ------

Android2.3 2G NandFlash upgrade 4G NandFlash approach

It should be noted that the Samsung 6410 platform is not suitable for product development using the Android 2.3 system. If the Android system is used in the product, it is recommended to use the A8, A9 processor with a Samsung 210 processor or higher. Looks like 6410 Android is the development board manufacturers do more of their own, learning can, but basically just learning to use it. . .

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is where the Uboot code 2G is replaced by 4G. The following are the files that need to be modified in the Android 2.3 kernel.

Linux kernel modification file

Android2.3_kernel_v1.01/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. The previously released Android system has three partitions. After modifying this file, be careful not to forget to modify the file system. The file system part needs to mount the fourth partition to /mnt/disk. .

Android2.3_kernel_v1.01/arch/arm/plat-samsung/dev-nand.c

# Nandflash Device description information, which defines the NandFlash register address range, is the most basic file in the NandFlash driver.

Android2.3_kernel_v1.01/drivers/mtd/nand/nand_base.c

# NandFlash driver files for basic read and write and erase operations are important files in the NandFlash driver.

Android2.3_kernel_v1.01/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Android2.3_kernel_v1.01/drivers/mtd/nand/s3c_nand.c

# NandFlash driver file, NandFlash driver registration, NandFlash device scanning, hardware ECC and other important functions.

Android2.3_kernel_v1.01/include/linux/mtd/nand.h

The #NandFlash macro, along with an important structure definition file, is one of the very important header files in the NandFlash driver.

Android2.3_kernel_v1.01/include/mtd/mtd-abi.h

# NandFlash driver header file, which defines some auxiliary structures.

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

The file system section is slightly modified. Mount the /mnt/disk folder to the /dev/block/mtdblock3 block device.

Modify the file:

Android2.3.4_32bit/vendor/forlinx/OK6410/init.rc

The revised content is as follows:

On fs

# mount mtd partitions

# Mount /system rw first to give the filesystem a chance to save a checkpoint

Mount yaffs2 mtd@system /system

Mount yaffs2 mtd@system /system rw remount

Mount yaffs2 mtd@userdata /data nosuid nodev

Mount yaffs2 mtd@cache /cache nosuid nodev

Mount yaffs2 /dev/block/mtdblock3 /mnt/disk

The last line adds new commands. The init.rc file already contains other commands.

This modification is based on OK6410 Linux2.6.28/3.0.1

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is the Uboot code 2G replaced by 4G need to be modified, the following about Linux3.0 kernel need to modify the file.

Linux kernel modification file

Linux-3.0.1/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. In the previous file system released by Feiling, the /etc/init.d/rcS script mounted the fourth partition under the /mnt directory. This can be based on its own needs. NandFlash still uses three partitions, you can not change this file. If you change this file, use 4 partitions. Don't forget to change the /etc/init.d/rcS file and mount the fourth partition under the /mnt directory.

Before changing, check whether the /etc/init.d/rcS file in the file system has mounted the fourth partition, or execute the mount command to check whether the current system is three partitions or four partitions, and modify it according to the actual situation.

Linux-3.0.1/arch/arm/plat-samsung/dev-nand.c

# Nandflash device description information.

Linux-3.0.1/drivers/mtd/nand/nand_base.c

# NandFlash Driver Files for Basic Read and Write Operations

Linux-3.0.1/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Linux-3.0.1/drivers/mtd/nand/s3c_nand.c

# NandFlash driver files, NandFlash driver registration, NandFlash device scanning and other important.

Linux-3.0.1/include/mtd/mtd-abi.h

# NandFlash driver header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

File system parts do not need any changes, use 2G version of Yaffs2 production tools

mkyaffs2image-256DDR will create rootfs.yaffs2 for 4G NandFlash.

Note: After the above operations are completed, after the system runs successfully, you can execute the df -h command in the HyperTerminal or DNW. At this time, you can see the size of the NandFlash space.

-------------------------------------------------- --------------------------Cutting ---------------------- -------------------------------------------------- ------

Android2.3 2G NandFlash upgrade 4G NandFlash approach

It should be noted that the Samsung 6410 platform is not suitable for product development using the Android 2.3 system. If the Android system is used in the product, it is recommended to use the A8, A9 processor with a Samsung 210 processor or higher. Looks like 6410 Android is the development board manufacturers do more of their own, learning can, but basically just learning to use it. . .

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is where the Uboot code 2G is replaced by 4G. The following are the files that need to be modified in the Android 2.3 kernel.

Linux kernel modification file

Android2.3_kernel_v1.01/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. The previously released Android system has three partitions. After modifying this file, be careful not to forget to modify the file system. The file system part needs to mount the fourth partition to /mnt/disk. .

Android2.3_kernel_v1.01/arch/arm/plat-samsung/dev-nand.c

# Nandflash Device description information, which defines the NandFlash register address range, is the most basic file in the NandFlash driver.

Android2.3_kernel_v1.01/drivers/mtd/nand/nand_base.c

# NandFlash driver files for basic read and write and erase operations are important files in the NandFlash driver.

Android2.3_kernel_v1.01/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Android2.3_kernel_v1.01/drivers/mtd/nand/s3c_nand.c

# NandFlash driver file, NandFlash driver registration, NandFlash device scanning, hardware ECC and other important functions.

Android2.3_kernel_v1.01/include/linux/mtd/nand.h

The #NandFlash macro, along with an important structure definition file, is one of the very important header files in the NandFlash driver.

Android2.3_kernel_v1.01/include/mtd/mtd-abi.h

# NandFlash driver header file, which defines some auxiliary structures.

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

The file system section is slightly modified. Mount the /mnt/disk folder to the /dev/block/mtdblock3 block device.

Modify the file:

Android2.3.4_32bit/vendor/forlinx/OK6410/init.rc

The revised content is as follows:

On fs

# mount mtd partitions

# Mount /system rw first to give the filesystem a chance to save a checkpoint

Mount yaffs2 mtd@system /system

Mount yaffs2 mtd@system /system rw remount

Mount yaffs2 mtd@userdata /data nosuid nodev

Mount yaffs2 mtd@cache /cache nosuid nodev

Mount yaffs2 /dev/block/mtdblock3 /mnt/disk

The last line adds new commands. The init.rc file already contains other commands.

This modification is based on OK6410 Linux2.6.28/3.0.1

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is the Uboot code 2G replaced by 4G need to be modified, the following about Linux3.0 kernel need to modify the file.

Linux kernel modification file

Linux-3.0.1/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

An important part of this file is the partition information of NandFlash.

Struct mtd_partition ok6410_nand_part[] = {

{

.name = "Bootloader",

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "Kernel",

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = "User",

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = "File System",

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

This structure divides NandFlash into four partitions. In the previous file system released by Feiling, the /etc/init.d/rcS script mounted the fourth partition under the /mnt directory. This can be based on its own needs. NandFlash still uses three partitions, you can not change this file. If you change this file, use 4 partitions. Don't forget to change the /etc/init.d/rcS file and mount the fourth partition under the /mnt directory.

Before changing, check whether the /etc/init.d/rcS file in the file system has mounted the fourth partition, or execute the mount command to check whether the current system is three partitions or four partitions, and modify it according to the actual situation.

Linux-3.0.1/arch/arm/plat-samsung/dev-nand.c

# Nandflash device description information.

Linux-3.0.1/drivers/mtd/nand/nand_base.c

# NandFlash Driver Files for Basic Read and Write Operations

Linux-3.0.1/drivers/mtd/nand/nand_ids.c

The #NandFlash ID information description file is similar to the nand_ids.c file in the Uboot code, but it is not the same.

Linux-3.0.1/drivers/mtd/nand/s3c_nand.c

# NandFlash driver files, NandFlash driver registration, NandFlash device scanning and other important.

Linux-3.0.1/include/mtd/mtd-abi.h

# NandFlash driver header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

File system:

File system parts do not need any changes, use 2G version of Yaffs2 production tools

mkyaffs2image-256DDR will create rootfs.yaffs2 for 4G NandFlash.

Note: After the above operations are completed, after the system runs successfully, you can execute the df -h command in the HyperTerminal or DNW. At this time, you can see the size of the NandFlash space.

Android2.3 2G NandFlash upgrade 4G NandFlash approach

It should be noted that the Samsung 6410 platform is not suitable for product development using the Android 2.3 system. If the Android system is used in the product, it is recommended to use the A8, A9 processor with a Samsung 210 processor or higher. Looks like 6410 Android is the development board manufacturers do more of their own, learning can, but basically just learning to use it. . .

Uboot code modification

Common folder modifications:

Uboot1.1.6/common/cmd_nand.c

# This file mainly implements Uboot's command collection for NandFlash. For example, executing nand write.uboot will invoke the file.

Uboot1.1.6/common/main.c

# Used to implement boot menu display

Uboot1.1.6/common/env_nand.c

# Execute saveenv command will call this file for storing environment variables to NandFlash

Cpu folder modification content

Uboot1.1.6/cpu/s3c64xx/nand.c

# This file is NandFlash to modify important files and define 8-bit hardware ECC function.

Uboot1.1.6/cpu/s3c64xx/nand_cp.c

# This file implements the NandFlash startup system key code, such as copying the Uboot code into memory.

Uboot1.1.6/cpu/s3c64xx/usbd-otg-hs.c

# It is used to implement the function of DNW programming system in menu form. This part is not related to NandFlash but it is related to Uboot menu item.

Driver folder modification content

Uboot1.1.6/drivers/nand/nand_base.c

# NandFlash drives important files to implement NandFlash's read and write functions.

Uboot1.1.6/drivers/nand/nand_ids.c

# NandFlash ID definition file, which defines the type of NandFlash we currently support. Of course, there are some types that come with the system.

Uboot1.1.6/drivers/nand/nand_util.c

The #NandFlash driver file implements NandFlash read/write accessibility.

Include folder modification content

Uboot1.1.6/include/configs/smdk6410.h

#NandFlash related macro definition

Uboot1.1.6/include/linux/mtd/nand.h

# Define the maximum space of NandFlash page, OOB maximum space

Uboot1.1.6/include/s3c6410.h

# s3c6410 header file

Note: After modifying the file, you need to execute the make clean command before recompiling.

The above is where the Uboot code 2G is replaced by 4G. The following are the files that need to be modified in the Android 2.3 kernel.

Linux kernel modification file

Android2.3_kernel_v1.01/arch/arm/mach-s3c64xx/mach-smdk6410.c

# This file is an important file of the 6410 platform, which implements the addition and initialization of platform devices.

这个文件里面有一个重要地方,就是对NandFlash的分区信息,

struct mtd_partition ok6410_nand_part[] = {

{

.name = “Bootloader”,

.offset = 0,

.size = (2 * SZ_1M),

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = “Kernel”,

.offset = (2 * SZ_1M),

.size = (5*SZ_1M) ,

.mask_flags = MTD_CAP_NANDFLASH,

},

{

.name = “User”,

.offset = (7 * SZ_1M),

.size = (200*SZ_1M) ,

},

{

.name = “File System”,

.offset = MTDPART_OFS_APPEND,

.size = MTDPART_SIZ_FULL,

}

};

note:

这个结构体把NandFlash分成了四个分区,以前发布的Android系统为三个分区,修改这个文件后注意不要忘了修改文件系统,文件系统部分需要把第四个分区挂载到/mnt/disk下面。

android2.3_kernel_v1.01/arch/arm/plat-samsung/dev-nand.c

# Nandflash 设备描述信息,定义NandFlash 寄存器地址范围,是NandFlash驱动中最基本的文件。

android2.3_kernel_v1.01/drivers/mtd/nand/nand_base.c

# NandFlash 驱动文件,实现基本的读写,擦除操作,是NandFlash驱动中重要文件,

android2.3_kernel_v1.01/drivers/mtd/nand/nand_ids.c

# NandFlash ID信息描述文件,与Uboot代码中的nand_ids.c文件类似,但不相同。

android2.3_kernel_v1.01/drivers/mtd/nand/s3c_nand.c

# NandFlash驱动文件,实现NandFlash驱动的注册,NandFlash设备扫描,硬件ECC等重要功能。

android2.3_kernel_v1.01/include/linux/mtd/nand.h

# NandFlash宏,及重要结构体定义文件,是NandFlash 驱动中非常重要的头文件之一。

android2.3_kernel_v1.01/include/mtd/mtd-abi.h

# NandFlash驱动头文件,里面定义一些辅助的结构体。

注意:修改文件后,重新编译前,需要执行make clean 命令

文件系统:

文件系统部分稍微修改一下,把/mnt/disk文件夹挂载到/dev/block/mtdblock3块设备处,

修改文件:

android2.3.4_32bit/vendor/forlinx/OK6410/init.rc

修改内容如下:

on fs

# mount mtd partitions

# Mount /system rw first to give the filesystem a chance to save a checkpoint

mount yaffs2 mtd@system /system

mount yaffs2 mtd@system /system rw remount

mount yaffs2 mtd@userdata /data nosuid nodev

mount yaffs2 mtd@cache /cache nosuid nodev

mount yaffs2 /dev/block/mtdblock3 /mnt/disk

最后一行为新增命令,init.rc 文件已经含有了其他的命令。

POS machine

Pos Machine,Smart Android Pos,Smart Mobile Tablet Terminal,Smart Pos Z90

Guangzhou Winson Information Technology Co., Ltd. , https://www.barcodescanner-2d.com