⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boot.txt

📁 bios YL2440源码
💻 TXT
字号:
/*=====================================================================

    Memory layout on NAND flash:
    
    Block 0 has the NAND boot loader (NBOOT.BIN)
    Block 1 is the TOC block which specifies the layout on the NAND
    Block 2 is the start block for secondary bootloader
    Block n is the start of image. n is defined in the block 1 structure
    
    
    structures:
    
    #define MAX_SG_SECTORS      10
    
    IMAGE_DESCRIPTOR: (116 bytes)
    
    typedef struct _IMAGE_DESCRIPTOR {
        DWORD       dwVersion;
        DWORD       dwSignature;
        UCHAR       ucString[IMAGE_STRING_LEN];
        DWORD       dwFileType;
        DWORD       dwLoadAddress;
        DWORD       dwJumpAddress;
        DWORD       dwTtlSectors;
        SG_SECTOR   sgList[MAX_SG_SECTORS];
    } IMAGE_DESCRIPTOR, *PIMAGE_DESCRIPTOR;
    
    where SG_SECTOR is defined as:
    
    SG_SECTOR: (8 bytes)
    
    typedef struct _SG_SECTOR {
        DWORD       dwSector;
        DWORD       dwLength;
    } SG_SECTOR, *PSG_SECTOR;
    
    The layout on the first sector of TOC block is:
    
    typedef struct _TOC_SECTOR {
        DWORD               dwSignature;        //  4 bytes
        IMAGE_DESCRIPTOR    id[4];              //  480 bytes
        UCHAR               Pad[32];            //  32 bytes
    } TOC_SECTOR, *PTOC_SECTOR;

    Here is what we are doing in the first stage bootloader:
    
    1.  Do the usual things to initialize the hardware
    2.  By default, it will always boot the id[0], unless App4 button is pressed
        and at the same time another app button is pressed. NBOOT will boot from 
        id[num] where num is the app button that is pressed.
    
        For development, we can write our own TOC sector so that id[0] points to 
        Block2 which is the start block for secondary bootloader, more than likely
        Eboot. 
        
*/ 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -