• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/firmware-utils/src/seama.h

  1 // SPDX-License-Identifier: LGPL-2.1-or-later
  2 /* vi: set sw=4 ts=4: */
  3 /*
  4  *      (SEA)ttle i(MA)ge is the image which used in project seattle.
  5  *
  6  *      Created by David Hsieh <david_hsieh@alphanetworks.com>
  7  *      Copyright (C) 2008-2009 Alpha Networks, Inc.
  8  */
  9 
 10 #ifndef __SEAMA_HEADER_FILE__
 11 #define __SEAMA_HEADER_FILE__
 12 
 13 #include <stdint.h>
 14 
 15 #define SEAMA_MAGIC             0x5EA3A417
 16 
 17 /*
 18  *      SEAMA looks like the following map.
 19  *      All the data of the header should be in network byte order.
 20  *
 21  *  +-------------+-------------+------------
 22  *      | SEAMA magic               |     ^
 23  *  +-------------+-------------+     |
 24  *      | reserved    | meta size   |     |
 25  *  +-------------+-------------+   header
 26  *      | image size (0 bytes)      |     |
 27  *  +-------------+-------------+     |
 28  *      ~ Meta data                 ~     v
 29  *  +-------------+-------------+------------
 30  *      | SEAMA magic               |   ^     ^
 31  *  +-------------+-------------+   |     |
 32  *      | reserved    | meta size   |   |     |
 33  *  +-------------+-------------+   |     |
 34  *      | image size                |   |     |
 35  *  +-------------+-------------+ header  |
 36  *      |                           |   |     |
 37  *      | 16 bytes of MD5 digest    |   |     |
 38  *      |                           |   |     |
 39  *      |                           |   |     |
 40  *  +-------------+-------------+   |     |
 41  *      ~ Meta data                 ~   v     |
 42  *  +-------------+-------------+-------  |
 43  *      |                           |         |
 44  *      | Image of the 1st entity   |         |
 45  *      ~                           ~ 1st entity
 46  *      |                           |         |
 47  *      |                           |         v
 48  *  +-------------+-------------+-------------
 49  *      | SEAMA magic               |   ^     ^
 50  *  +-------------+-------------+   |     |
 51  *      | reserved    | meta size   |   |     |
 52  *  +-------------+-------------+   |     |
 53  *      | image size                |   |     |
 54  *  +-------------+-------------+ header  |
 55  *      |                           |   |     |
 56  *      | 16 bytes of MD5 digest    |   |     |
 57  *      |                           |   |     |
 58  *      |                           |   |     |
 59  *  +-------------+-------------+   |     |
 60  *      ~ Meta data                 ~   v     |
 61  *  +-------------+-------------+-------  |
 62  *      |                           |         |
 63  *      | Image of the 2nd entity   |         |
 64  *      ~                           ~ 2nd entity
 65  *      |                           |         |
 66  *      |                           |         v
 67  *  +-------------+-------------+-------------
 68  */
 69 
 70 
 71 /*
 72  *      SEAMA header
 73  *
 74  *      |<-------- 32 bits -------->|
 75  *  +-------------+-------------+
 76  *      | SEAMA magic               |
 77  *  +-------------+-------------+
 78  *      | reserved    | meta size   |
 79  *  +-------------+-------------+
 80  *      | image size                |
 81  *  +-------------+-------------+
 82  */
 83 /* seama header */
 84 typedef struct seama_hdr        seamahdr_t;
 85 struct seama_hdr
 86 {
 87         uint32_t        magic;                  /* should always be SEAMA_MAGIC. */
 88         uint16_t        reserved;               /* reserved for  */
 89         uint16_t        metasize;               /* size of the META data */
 90         uint32_t        size;                   /* size of the image */
 91 } __attribute__ ((packed));
 92 
 93 
 94 #endif
 95 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt