This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WinCE 6 NAND boot format --- comment is not understood

Other Parts Discussed in Thread: OMAP3530

Dear Adeneo,

I have a question about the comment highlighted in the below file found in C:\WINCE600\PLATFORM\EVM_OMAP3530\SRC\BOOTLOADER\EBOOT\NAND\MAKEFILE.INC

What is that comment referring to and is it accurate?  What action should the developer take?

# All rights reserved ADENEO EMBEDDED 2010

!if 0

; Copyright (c) 2007, 2008 BSQUARE Corporation. All rights reserved.

;================================================================================

; Texas Instruments OMAP(TM) Platform Software

; (c) Copyright Texas Instruments, Incorporated. All Rights Reserved.

;

; Use of this software is controlled by the terms and conditions found

; in the license agreement under which this software has been supplied.

;

;================================================================================

!endif

#

# Take xldr.nb0, ebootnd.nb0 and iplnand.nb0 (WM only) to generate raw files

#

# Boot ROM requires xldr to be preceeded with two words containing image

# size and destination address. The xldrtocnand.raw file contains these

# two words and is prepended to the xldr image.

#

# Note that boot ROM expects xldr to be copied into 4 consecutive blocks

# to support data redundancy. Blocks are 128K while xldr is only 16K

# so there will be gaps in each block. For ease of creating the image

# the xldr nb0 file has been configured to be a full 128K minus the

# table of contents.

_FILES=$(_PLATFORMROOT)\$(_TGTPLAT)\files

_SRC=$(_PLATFORMROOT)\$(_TGTPLAT)\src\bootloader\xldr\nand

_TGT=$(_RAWFILETGT)\$(WINCEDEBUG)

_BIN=$(_PLATFORMROOT)\$(_TGTPLAT)\bin

xldr_romimage_raw:

!if "$(NOLINK)" == ""

romimage $(ROMIMAGE_FLAGS) xldrnand.bib

# The OMAP boot ROM will not load the NAND XLDR unless some bytes are modified near the image start

$(_FILES)\fileset.exe $(_TGT)\xldrnand.nb0 0x4 0x3c 0xff

copy /Y $(_FILES)\Logo.bmp $(_TGT)\logo.nb0

!if "$(WINCEREL)"=="1"

xcopy /Q /I $(_TGT)\xldrnand.* $(_FLATRELEASEDIR)

xcopy /Q /I $(_TGT)\logo.nb0 $(_FLATRELEASEDIR)

!endif

!endif

!if "$(NOLINK)" == ""

copy /b $(_SRC)\xldrtocnand.raw + $(_TGT)\xldrnand.nb0 $(_TGT)\xldrnand.1block

copy /b $(_TGT)\xldrnand.1block + $(_TGT)\xldrnand.1block + $(_TGT)\xldrnand.1block + $(_TGT)\xldrnand.1block $(_TGT)\xldrnand.4blocks

del $(_TGT)\xldrnand.1block >nul

copy /b $(_TGT)\xldrnand.4blocks + $(_TGT)\ebootnd.nb0 $(_TGT)\OMAP35xx-nand.raw

copy /b $(_TGT)\OMAP35xx-nand.raw + $(_FILES)\Logo.bmp $(_TGT)\OMAP35xx-nand-logo.raw

del $(_TGT)\xldrnand.4blocks >nul

!if "$(WINCEREL)"=="1"

xcopy /Q /I $(_TGT)\*.raw $(_FLATRELEASEDIR)

!endif

!endif

  • Hi Dave,

    As you see in makefile.inc it is being already taken care by adding four extra bytes

    $(_FILES)\fileset.exe $(_TGT)\xldrnand.nb0 0x4 0x3c 0xff

    If you have a prebuilt xldrnand.nb0 open it in hex editor you should see those four at the starting of the image.

    I don't have a prebuilt binary and I never checked for them in xldrnand.nb0 file.

    As far as I know the developer need not to do anything for that.

    Regards,

    GSR

  • Hi Dave,

    My understanding is the following:

    1. The first 80 bytes of initial xldrnand.nb0 are like these:

    FE 03 00 EA 00 00 00 00 00 00 00 00 00 00 00 00

    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

    45 43 45 43 D4 0C 02 5C D4 DC 00 00 00 00 00 00

    2. $(_FILES)\fileset.exe $(_TGT)\xldrnand.nb0 0x4 0x3c 0xff will change xldrnand,nb0 from byte 4, 0x3c(60) bytes to 0xff.

    The first 80 bytes of modified xldrnand.nb0 are like these:

    FE 03 00 EA FF FF FF FF FF FF FF FF FF FF FF FF

    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

    45 43 45 43 E0 7C 20 40 E0 7C 00 00 00 00 00 00

    3. 8 extra bytes have to be added at the beginning of xldrnand.nb0 in order for the ROM code to boot from NAND flash.

    These 8 bytes are added by "copy /b $(_SRC)\xldrtocnand.raw + $(_TGT)\xldrnand.nb0 $(_TGT)\xldrnand.1block" in makefile.inc.

    The file xldrtocnand.raw has that 8 bytes data (F8 8F 00 00 00 00 20 40).

    0x40200000 is the starting address and 0x00008FF8 is the size of xldrnand.nb0 (refer to xldrnand.bib).

    Hope it helps.

    James