fengc234 发表于 2014-5-9 11:41:31

关于TQ3358开发板的分区

我在uboot中的evm.c中看到对nand的进行了如下分区:
fastboot_ptentry 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   #####

Download u-boot.bin to Nand Flash
Download MLO to Nand Flash
Download Linux Kernel (uImage.bin) to Nand Flash
Download LOGO Picture (logo.bin) to NandFlash
Download UBIFS image (root.bin) to Nand Flash
Download YAFFS image (root.bin) to Nand Flash
Download Program to SDRAM and Run it
Boot the system
Format the Nand Flash
Set the boot parameters
Download User Program
Enter TFTP download mode menu
Reboot u-boot
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   #####

Download u-boot.bin to Nand Flash
Download MLO to Nand Flash
Download Linux Kernel (uImage.bin) to Nand Flash
Download LOGO Picture (logo.bin) to NandFlash
Download UBIFS image (root.bin) to Nand Flash
Download YAFFS image (root.bin) to Nand Flash
Download Program to SDRAM and Run it
Boot the system
Format the Nand Flash
Set the boot parameters
Download User Program
Enter TFTP download mode menu
Reboot u-boot
Test kernel Image (uImage)
Enter your selection: 6

25929024 bytes read

NAND erase: device 0 offset 0xa80000, size 0xf580000
Skipping bad block at0x02e40000                                          
Skipping bad block at0x035e0000                                          
Skipping bad block at0x06440000                                          
Skipping bad block at0x0d340000                                          
Erasing at 0xffe0000 -- 100% complete.
OK

NAND write: device 0 offset 0xa80000, size 0x18ba540
Writting at 0x227b000 -- 100% complete.
25931136 bytes written: OK
为何会这样呢?

TQ-ZQL 发表于 2014-5-9 11:47:43

加了偏移的,0x300000,具体在哪里在加可以自己跟踪下。
页: [1]
查看完整版本: 关于TQ3358开发板的分区