# ====================== bootloader ======================

# ---- uImage file ----
# original code from binwalk     
# From: Craig Heffner, U-Boot image.h header definitions file
0      belong    0x27051956     uImage header, header size: 64 bytes,
!:mime firmware/u-boot
>4     ubelong   x              header CRC: 0x%X,
>8     bedate    x              created: %s,
>12    belong    <1             {invalid}
>12    ubelong   x              image size: %d bytes,
>16    ubelong   x              Data Address: 0x%X,
>20    ubelong   x              Entry Point: 0x%X,
>24    ubelong   x              data CRC: 0x%X,
>28    byte      0              OS: {invalid}invalid OS,
>28    byte      1              OS: OpenBSD,
>28    byte      2              OS: NetBSD,
>28    byte      3              OS: FreeBSD,
>28    byte      4              OS: 4.4BSD,
>28    byte      5              OS: Linux,
>28    byte      6              OS: SVR4,
>28    byte      7              OS: Esix,
>28    byte      8              OS: Solaris,
>28    byte      9              OS: Irix,
>28    byte      10             OS: SCO,
>28    byte      11             OS: Dell,
>28    byte      12             OS: NCR,
>28    byte      13             OS: LynxOS,
>28    byte      14             OS: VxWorks,
>28    byte      15             OS: pSOS,
>28    byte      16             OS: QNX,
>28    byte      17             OS: Firmware,
>28    byte      18             OS: RTEMS,
>28    byte      19             OS: ARTOS,
>28    byte      20             OS: Unity OS,
>29    byte      0              CPU: {invalid}invalid CPU,
>29    byte      1              CPU: Alpha,
>29    byte      2              CPU: ARM,
>29    byte      3              CPU: Intel x86,
>29    byte      4              CPU: IA64,
>29    byte      5              CPU: MIPS,
>29    byte      6              CPU: MIPS 64 bit,
>29    byte      7              CPU: PowerPC,
>29    byte      8              CPU: IBM S390,
>29    byte      9              CPU: SuperH,
>29    byte      10             CPU: Sparc,
>29    byte      11             CPU: Sparc 64 bit,
>29    byte      12             CPU: M68K,
>29    byte      13             CPU: Nios-32,
>29    byte      14             CPU: MicroBlaze,
>29    byte      15             CPU: Nios-II,
>29    byte      16             CPU: Blackfin,
>29    byte      17             CPU: AVR,
>29    byte      18             CPU: STMicroelectronics ST200,
#>30    byte    x        image type: %d,
>30    byte      0              image type: {invalid} Image,
>30    byte      1              image type: Standalone Program,
>30    byte      2              image type: OS Kernel Image,
>30    byte      3              image type: RAMDisk Image,
>30    byte      4              image type: Multi-File Image,
>30    byte      5              image type: Firmware Image,
>30    byte      6              image type: Script file,
>30    byte      7              image type: Filesystem Image,
>30    byte      8              image type: Binary Flat Device Tree Blob
>31    byte      0              compression type: none,
>31    byte      1              compression type: gzip,
>31    byte      2              compression type: bzip2,
>31    byte      3              compression type: lzma,
>32    string    x              image name: "%s"

# U-Boot boot loader
# original code from binwalk
0	string	U-Boot\x20  U-Boot version string,
!:mime bootloader/u-boot
>7  byte    <48         {invalid}
>7  byte    >57         {invalid}
>8  byte    !0x2E       {invalid}
>0  string  x           "%s"

# CFE bootloader
# original code from binwalk
0	string	CFE1	    CFE boot loader
!:mime bootloader/cfe
>4  string  !CFE1       {invalid}
>40	string	CFE1CFE1	{invalid}
