Note that there are some explanatory texts on larger screens.

plurals
  1. POiMX6Q NAND Boot issue in WinCE
    text
    copied!<p>I'm trying to boot <code>eboot.nb0</code> from NAND. (Micron, <code>MT29F4G08ABBDA</code>) in WinCE7. Processor: <code>i.MX6Q</code></p> <p>I have successfully booted <code>u-boot.bin</code> from NAND using <code>kobs-ng tool</code> in linux. Also, if i use modified <code>eboot.nb0</code> instead of <code>u-boot.bin</code> in <code>kobs</code>, it is booting without any problem.</p> <p>But when i use <code>MFGTool</code> (in WinCE) for flashing <code>eboot.nb0</code>, it is not booting.</p> <p>Following is the nanddump output when i am using <code>kobs</code> (linux) for flashing:</p> <p>FCB:</p> <pre><code>0x00000000: 00 00 00 00 00 00 00 00 00 00 00 00 cf fc ff ff 0x00000010: 46 43 42 20 00 00 00 01 50 3c 19 06 00 00 00 00 0x00000020: 00 08 00 00 40 08 00 00 40 00 00 00 00 00 00 00 0x00000030: 00 00 00 00 00 00 00 00 04 00 00 00 00 02 00 00 0x00000040: 00 02 00 00 04 00 00 00 0a 00 00 00 03 00 00 00 0x00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x00000070: 00 00 00 00 00 02 00 00 00 0b 00 00 01 01 00 00 0x00000080: 01 01 00 00 00 01 00 00 cf 07 00 00 00 00 00 00 0x00000090: 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 </code></pre> <p>DBBT:</p> <pre><code>0x00080000: 00 ff ff ff ff ff ff ff ff ff 00 00 00 00 44 42 0x00080010: 42 54 00 00 00 01 00 00 00 00 00 00 00 00 00 00 0x00080020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x00080030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 </code></pre> <p>and <code>eboot.nb0</code> at Page 200.</p> <p>Here, why we are getting first 12 bytes as zeros? (<code>METADATA_SIZE</code> is set to 10). Why two additional zeros?</p> <p>In WinCE (Using MFGTool):</p> <p>FCB: [Metadata: <code>ff ff ff ff ff ff fe ff ff ff</code> ] (only 10 bytes of metadata)</p> <pre><code>75 b8 fe ff 46 43 42 20 0 0 0 1 50 3c 19 6 0 0 0 0 0 8 0 0 40 8 0 0 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 2 0 0 0 2 0 0 4 0 0 0 a 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d8 f9 8a d9 11 0 0 0 0 2 0 0 40 3 0 0 40 1 0 0 40 1 0 0 0 1 0 0 cf 7 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 44 cd ab ef d4 84 a9 ef ff ff ff ff ff ff ff ff ff ff ff ff </code></pre> <p>DBBT:</p> <pre><code>0 0 0 0 44 42 42 54 0 0 0 1 0 0 0 0 0 0 0 0 </code></pre> <p>and <code>eboot.nb0</code> at <code>200</code> page.</p> <p>Following is the nandtype info structure:</p> <pre><code>//MT29F4G08ABBDAHC { {NAND, 4096, 2048 * 64, 64, 2048}, //FlashInfo fi; {0x2C, 0xAC, 0x90, 0x15}, //BYTE NANDCode[NANDID_LENGTH] 3, //BYTE NumBlockCycles 5, //BYTE ChipAddrCycleNum 8, //BYTE DataWidth 1, //BYTE BBMarkNum {0}, //BYTE BBMarkPage 6, //BYTE StatusBusyBit 0, //BYTE StatusErrorBit 64, //WORD SpareDataLength 0x70, //BYTE CmdReadStatus 0x00, //BYTE CmdRead1 0x30, //BYTE CmdRead2 0x90, //BYTE CmdReadId 0xff, //BYTE CmdReset 0x80, //BYTE CmdWrite1 0x10, //BYTE CmdWrite2 0x60, //BYTE CmdErase1 0xD0, //BYTE CmdErase2 {80, 60, 25, 6} //NANDTiming timings } </code></pre> <p>Following is the BootBlock structure:</p> <pre><code>typedef struct _BootBlockStruct_t { UINT32 m_u32Checksum; //!&lt; First fingerprint in first byte. UINT32 m_u32FingerPrint; //!&lt; 2nd fingerprint at byte 4. UINT32 m_u32Version; //!&lt; 3rd fingerprint at byte 8. union { struct { NAND_Timing_t m_NANDTiming; //!&lt; Optimum timing parameters for Tas, Tds, Tdh in nsec. UINT32 m_u32Reserved; //mx28 needs a dword reservation UINT32 m_u32DataPageSize; //!&lt; 2048 for 2K pages, 4096 for 4K pages. UINT32 m_u32TotalPageSize; //!&lt; 2112 for 2K pages, 4314 for 4K pages. UINT32 m_u32SectorsPerBlock; //!&lt; Number of 2K sections per block. UINT32 m_u32NumberOfNANDs; //!&lt; Total Number of NANDs - not used by ROM. UINT32 m_u32TotalInternalDie; //!&lt; Number of separate chips in this NAND. UINT32 m_u32CellType; //!&lt; MLC or SLC. UINT32 m_u32EccBlockNEccType; //!&lt; Type of ECC, can be one of BCH-0-20 UINT32 m_u32EccBlock0Size; //!&lt; Number of bytes for Block0 - BCH UINT32 m_u32EccBlockNSize; //!&lt; Block size in bytes for all blocks other than Block0 - BCH UINT32 m_u32EccBlock0EccType; //!&lt; Ecc level for Block 0 - BCH UINT32 m_u32MetadataBytes; //!&lt; Metadata size - BCH UINT32 m_u32NumEccBlocksPerPage; //!&lt; Number of blocks per page for ROM use - BCH UINT32 m_u32EccBlockNEccLevelSDK; //!&lt; Type of ECC, can be one of BCH-0-20 UINT32 m_u32EccBlock0SizeSDK; //!&lt; Number of bytes for Block0 - BCH UINT32 m_u32EccBlockNSizeSDK; //!&lt; Block size in bytes for all blocks other than Block0 - BCH UINT32 m_u32EccBlock0EccLevelSDK; //!&lt; Ecc level for Block 0 - BCH UINT32 m_u32NumEccBlocksPerPageSDK; //!&lt; Number of blocks per page for SDK use - BCH UINT32 m_u32MetadataBytesSDK; //!&lt; Metadata size - BCH UINT32 m_u32EraseThreshold; //!&lt; To set into BCH_MODE register. UINT32 m_u32BootPatch; //!&lt; 0 for normal boot and 1 to load patch starting next to FCB. UINT32 m_u32PatchSectors; //!&lt; Size of patch in sectors. UINT32 m_u32Firmware1_startingSector; //!&lt; Firmware image starts on this sector. UINT32 m_u32Firmware2_startingSector; //!&lt; Secondary FW Image starting Sector. UINT32 m_u32SectorsInFirmware1; //!&lt; Number of sectors in firmware image. UINT32 m_u32SectorsInFirmware2; //!&lt; Number of sector in secondary FW image. UINT32 m_u32DBBTSearchAreaStartAddress;//!&lt; Page address where dbbt search area begins UINT32 m_u32BadBlockMarkerByte; //!&lt; Byte in page data that have manufacturer marked bad block marker, this will //!&lt; bw swapped with metadata[0] to complete page data. UINT32 m_u32BadBlockMarkerStartBit; //!&lt; For BCH ECC sizes other than 8 and 16 the bad block marker does not start //!&lt; at 0th bit of m_u32BadBlockMarkerByte. This field is used to get to the //!&lt; start bit of bad block marker byte with in m_u32BadBlockMarkerByte. UINT32 m_u32BBMarkerPhysicalOffset; //!&lt; FCB value that gives byte offset for bad block marker on physical NAND page. UINT32 m_u32BCHType; UINT32 m_u32TMTiming2_ReadLatency; UINT32 m_u32TMTiming2_PreambleDelay; UINT32 m_u32TMTiming2_CEDelay; UINT32 m_u32TMTiming2_PostambleDelay; UINT32 m_u32TMTiming2_CmdAddPause; UINT32 m_u32TMTiming2_DataPause; UINT32 m_u32TMSpeed; UINT32 m_u32TMTiming1_BusyTimeout; UINT32 m_u32DISBBM; UINT32 m_u32BBMark_spare_offset; UINT32 m_u32Onfi_sync_enable; UINT32 m_u32Onfi_sync_speed; UINT32 m_u32Onfi_syncNANDData; UINT32 m_u32DISBB_Search; } FCB_Block; struct { UINT32 m_u32NumberBB; //!&lt; # Bad Blocks stored in this table for NAND0. UINT32 m_u32Number2KPagesBB; //!&lt; Bad Blocks for NAND0 consume this # of 2K pages. } DBBT_Block; }; } BootBlockStruct_t; Following are the values i'm assigning (Which are equal to linux): FCB m_u32FingerPrint = 0x20424346 m_u32Version = 0x01000000 m_u32Reserved = 0 m_NANDTiming.m_u8DataSetup = 80 m_NANDTiming.m_u8DataHold = 60 m_NANDTiming.m_u8AddressSetup = 25 m_NANDTiming.m_u8DSAMPLE_TIME = 6 m_u32PageDataSize = 2048 m_u32TotalPageSize = 2112 m_u32SectorsPerBlock = 64 m_u32NumberOfNANDs = 0 m_u32TotalInternalDie = 0 m_u32CellType = 0 m_u32EccBlockNEccType = 4 m_u32EccBlock0Size = 512 m_u32EccBlockNSize = 512 m_u32EccBlock0EccType = 4 m_u32MetadataBytes = 10 m_u32NumEccBlocksPerPage = 3 m_u32EccBlockNEccLevelSDK = 0 m_u32EccBlock0SizeSDK = 0 m_u32EccBlockNSizeSDK = 0 m_u32EccBlock0EccLevelSDK = 0 m_u32NumEccBlocksPerPageSDK = 0 m_u32MetadataBytesSDK = 0 m_u32EraseThreshold = 0 m_u32Firmware1_startingPage = 512 m_u32Firmware2_startingPage = 2816 m_u32PagesInFirmware1 = 91 m_u32PagesInFirmware2 = 91 m_u32DBBTSearchAreaStartAddress = 256 m_u32BadBlockMarkerByte = 1999 m_u32BadBlockMarkerStartBit = 0 m_u32BBMarkerPhysicalOffset = 2048 m_u32BCHType = 0 m_NANDTMTiming.m_u32TMTiming2_ReadLatency = 0 m_NANDTMTiming.m_u32TMTiming2_PreambleDelay = 0 m_NANDTMTiming.m_u32TMTiming2_CEDelay = 0 m_NANDTMTiming.m_u32TMTiming2_PostambleDelay = 0 m_NANDTMTiming.m_u32TMTiming2_CmdAddPause = 0 m_NANDTMTiming.m_u32TMTiming2_DataPause = 0 m_NANDTMTiming.m_u32TMSpeed = 0 m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0 m_u32DISBBM = 0 DBBT m_u32Checksum = 0x00000000 m_u32FingerPrint = 0x54424244 m_u32Version = 0x01000000 </code></pre> <p>In WinCE, it is not at all booting.</p> <p>Where is the mistake? If metadata size difference is the problem , how i can solve it? ( I have also tried by changing <code>METADATA_SIZE</code> = 12, which increases metadata size, but not booting.) What are those two extra bytes in linux (kobs)?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload