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.
-------------------------------------------------- --------------------------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,Smart Android Pos,Smart Mobile Tablet Terminal,Smart Pos Z90
Guangzhou Winson Information Technology Co., Ltd. , https://www.barcodescanner-2d.com