|
我在uboot中的evm.c中看到对nand的进行了如下分区:
fastboot_ptentry ptn[MAX_PTN] = {
{
.name = "spl",
.start = 0x0000000,
.length = 0x0020000, /* 128 K */
/* Written into the first 4 0x20000 blocks
Use HW ECC */
.flags = FASTBOOT_PTENTRY_FLAGS_WRITE_I |
FASTBOOT_PTENTRY_FLAGS_WRITE_HW_BCH8_ECC |
FASTBOOT_PTENTRY_FLAGS_REPEAT_4,
},
{
.name = "uboot",
.start = 0x0080000,
.length = 0x01E0000, /* 1.875 M */
/* Skip bad blocks on write
Use HW ECC */
.flags = FASTBOOT_PTENTRY_FLAGS_WRITE_I |
FASTBOOT_PTENTRY_FLAGS_WRITE_HW_BCH8_ECC,
},
{
.name = "environment",
.start = MNAND_ENV_OFFSET, /* set in config file */
.length = 0x0020000,
.flags = FASTBOOT_PTENTRY_FLAGS_WRITE_ENV |
FASTBOOT_PTENTRY_FLAGS_WRITE_HW_ECC,
},
{
.name = "kernel",
.start = 0x0280000,
.length = 0x0500000, /* 5 M */
.flags = FASTBOOT_PTENTRY_FLAGS_WRITE_I |
FASTBOOT_PTENTRY_FLAGS_WRITE_HW_BCH8_ECC,
},
{
.name = "filesystem",
.start = 0x0780000,
.length = 0xF880000, /* 248.5 M */
.flags = FASTBOOT_PTENTRY_FLAGS_WRITE_I |
FASTBOOT_PTENTRY_FLAGS_WRITE_HW_BCH8_ECC,
},
};
但是跟打印信息却不太符合
1、数组中设置kernel的起始地址是 0x0280000而打印信息为0x580000
##### Boot for TQ3358 Main Menu #####
##### EmbedSky SD download mode #####
[1] Download u-boot.bin to Nand Flash
[2] Download MLO to Nand Flash
[3] Download Linux Kernel (uImage.bin) to Nand Flash
[4] Download LOGO Picture (logo.bin) to Nand Flash
[5] Download UBIFS image (root.bin) to Nand Flash
[6] Download YAFFS image (root.bin) to Nand Flash
[7] Download Program to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[a] Download User Program
[n] Enter TFTP download mode menu
[r] Reboot u-boot
[t] Test kernel Image (uImage)
Enter your selection: 3
4455664 bytes read
NAND erase: device 0 offset 0x580000, size 0x500000
Erasing at 0xa60000 -- 100% complete.
OK
NAND write: device 0 offset 0x580000, size 0x43fcf0
Writting at 0x9bfcf0 -- 100% complete.
4455664 bytes written: OK
2、数组中设置filesystem的起始地址是 0x0780000而打印信息为0xa80000
##### Boot for TQ3358 Main Menu #####
##### EmbedSky SD download mode #####
[1] Download u-boot.bin to Nand Flash
[2] Download MLO to Nand Flash
[3] Download Linux Kernel (uImage.bin) to Nand Flash
[4] Download LOGO Picture (logo.bin) to Nand Flash
[5] Download UBIFS image (root.bin) to Nand Flash
[6] Download YAFFS image (root.bin) to Nand Flash
[7] Download Program to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[a] Download User Program
[n] Enter TFTP download mode menu
[r] Reboot u-boot
[t] Test kernel Image (uImage)
Enter your selection: 6
25929024 bytes read
NAND erase: device 0 offset 0xa80000, size 0xf580000
Skipping bad block at 0x02e40000
Skipping bad block at 0x035e0000
Skipping bad block at 0x06440000
Skipping bad block at 0x0d340000
Erasing at 0xffe0000 -- 100% complete.
OK
NAND write: device 0 offset 0xa80000, size 0x18ba540
Writting at 0x227b000 -- 100% complete.
25931136 bytes written: OK
为何会这样呢? |
|