Problem 1.

The partition table printed after Linux booted up in the previous section looks like this:



And the actual partition table for Nand Flash is not consistent, actually in the uboot porting tutorial (08 – Porting uboot from 04/2012 to JZ2440), the MTD partitioning of the kernel is as follows:

0x00000000-0x00040000 : "bootloader"
0x00040000-0x00060000 : "params"
0x00060000-0x00260000 : "kernel"
0x00260000-0x10000000 : "root"
Copy the code

Next modify the MTD partition table in the kernel.

2. Modify the MTD partition table in the kernel

2.1. Location of modified code



Judgment inarch/arm/mach-s3c24xx/common-smdk.c:113:Enter the file, sure enough partition table here:

2.2. Modify the kernel partition table

Change to the following partition table, where the three macros define the following meaning:

  • MTDPART_OFS_APPEND: appends to the end address of the previous partition.
  • MTDPART_SIZ_FULL: All the space left;

Recompile, download to memory on the development board, and then boot the kernel, you can see that the partition table has been modified successfully:



To receive more exciting articles and resources, please subscribe to my wechat official account: “McUlover666”.