1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 /* vi: set sw=4 ts=4: */
4 * (SEA)ttle i(MA)ge is the image which used in project seattle.
6 * Created by David Hsieh <david_hsieh@alphanetworks.com>
7 * Copyright (C) 2008-2009 Alpha Networks, Inc.
10 #ifndef __SEAMA_HEADER_FILE__
11 #define __SEAMA_HEADER_FILE__
15 #define SEAMA_MAGIC 0x5EA3A417
18 * SEAMA looks like the following map.
19 * All the data of the header should be in network byte order.
21 * +-------------+-------------+------------
23 * +-------------+-------------+ |
24 * | reserved | meta size | |
25 * +-------------+-------------+ header
26 * | image size (0 bytes) | |
27 * +-------------+-------------+ |
29 * +-------------+-------------+------------
31 * +-------------+-------------+ | |
32 * | reserved | meta size | | |
33 * +-------------+-------------+ | |
35 * +-------------+-------------+ header |
37 * | 16 bytes of MD5 digest | | |
40 * +-------------+-------------+ | |
42 * +-------------+-------------+------- |
44 * | Image of the 1st entity | |
48 * +-------------+-------------+-------------
50 * +-------------+-------------+ | |
51 * | reserved | meta size | | |
52 * +-------------+-------------+ | |
54 * +-------------+-------------+ header |
56 * | 16 bytes of MD5 digest | | |
59 * +-------------+-------------+ | |
61 * +-------------+-------------+------- |
63 * | Image of the 2nd entity | |
67 * +-------------+-------------+-------------
74 * |<-------- 32 bits -------->|
75 * +-------------+-------------+
77 * +-------------+-------------+
78 * | reserved | meta size |
79 * +-------------+-------------+
81 * +-------------+-------------+
84 typedef struct seama_hdr seamahdr_t
;
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
));