2004-06-22 21:19:48 +00:00
|
|
|
/*
|
|
|
|
*
|
2005-11-27 22:31:07 +00:00
|
|
|
* (c) 2004, 2005 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
2004-06-22 21:19:48 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-06-22 22:07:54 +00:00
|
|
|
#ifndef __HEAD_H__
|
|
|
|
#define __HEAD_H__
|
|
|
|
|
2004-06-22 21:19:48 +00:00
|
|
|
/*
|
|
|
|
* WARNING: remember that m68k is big endian, like powerPC.
|
|
|
|
* i386 is little-endian
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct emile_l2_header emile_l2_header_t;
|
|
|
|
|
|
|
|
struct emile_l2_header {
|
2004-10-07 09:06:43 +00:00
|
|
|
/* EM01 */
|
|
|
|
|
2004-06-22 21:19:48 +00:00
|
|
|
u_int32_t entry;
|
2004-10-07 09:06:43 +00:00
|
|
|
u_int32_t signature;
|
2005-11-27 22:31:07 +00:00
|
|
|
|
2004-12-03 00:20:08 +00:00
|
|
|
/* EMO4 addendum: if kernel_image_size == 0,
|
|
|
|
* kernel_image_offset is a pointer to a container
|
2005-06-09 19:55:12 +00:00
|
|
|
* EM05 addendum: if kernel_image_size == kernel_size
|
|
|
|
* kernel is not compressed
|
2005-11-27 22:31:07 +00:00
|
|
|
* EM06 addendum: configuration is now in string configuration
|
2004-12-03 00:20:08 +00:00
|
|
|
*/
|
2004-10-07 09:06:43 +00:00
|
|
|
|
2005-11-27 22:31:07 +00:00
|
|
|
/* EM06 */
|
|
|
|
|
|
|
|
u_int16_t conf_size;
|
|
|
|
int8_t configuration[0];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* gestaltID <digit>
|
|
|
|
* modem <bitrate><parity><bits> parity is n/o/e
|
|
|
|
* printer <bitrate><parity><bits>
|
2005-11-28 23:20:25 +00:00
|
|
|
* kernel <protocol>:<unit>/<path>
|
2005-11-27 22:31:07 +00:00
|
|
|
* <protocol> is "iso9660", "container", "block" ...
|
|
|
|
* <unit> is "(fd0)", "(sd3)", "(sd0,4)",...
|
2005-11-28 23:20:25 +00:00
|
|
|
* <path> is "boot/vmlinuz-2.2.25", "/install/mac/vmlinuz-2.2.25",
|
|
|
|
* "59904", "673280,654848",...
|
|
|
|
* parameters <kernel parameters>
|
2005-11-27 22:31:07 +00:00
|
|
|
* initrd <protocol>:<unit>/<path>
|
|
|
|
* configuration <protocol>:<unit>/<path>
|
|
|
|
*/
|
2004-06-22 21:19:48 +00:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
2004-10-07 19:52:44 +00:00
|
|
|
#define EMILE_ID_MASK 0xFFF0
|
|
|
|
#define EMILE_VERSION_MASK 0x000F
|
|
|
|
|
|
|
|
#define EMILE_ID(a) ((a) & EMILE_ID_MASK)
|
|
|
|
#define EMILE_VERSION(a) ((a) & EMILE_VERSION_MASK)
|
|
|
|
|
2004-10-07 09:06:43 +00:00
|
|
|
#define EMILE_01_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'1')
|
|
|
|
#define EMILE_02_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'2')
|
2004-10-07 08:57:32 +00:00
|
|
|
#define EMILE_03_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'3')
|
2004-12-03 00:20:08 +00:00
|
|
|
#define EMILE_04_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'4')
|
2005-06-09 19:55:12 +00:00
|
|
|
#define EMILE_05_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'5')
|
2005-11-27 22:31:07 +00:00
|
|
|
#define EMILE_06_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'6')
|
2004-06-22 22:07:54 +00:00
|
|
|
|
2004-10-07 19:52:44 +00:00
|
|
|
#define EMILE_COMPAT(a,b) ( ( EMILE_ID(a) == EMILE_ID(b) ) && \
|
|
|
|
( EMILE_VERSION(a) <= EMILE_VERSION(b) ) )
|
2004-06-22 22:07:54 +00:00
|
|
|
#endif /* __HEAD_H__ */
|