-
Notifications
You must be signed in to change notification settings - Fork 20
/
self.h
72 lines (61 loc) · 1.45 KB
/
self.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _SELF_H_
#define _SELF_H_
#include "types.h"
#include "config.h"
#include "np.h"
/*! PS3 specific ELF constants. */
/*! LV2 OS ABI. */
#define ELFOSABI_CELL_LV2 0x66
/*! PRX ELF type. */
#define ET_PS3PRX 0xFFA4
/*! PS3 Params. */
#define PT_PS3_PARAMS 0x60000001
/*! PS3 PRX. */
#define PT_PS3_PRX 0x60000002
/*! PRX Relocations. */
#define PT_PS3_PRX_RELOC 0x700000A4
/*! SELF config. */
typedef struct _self_config
{
/*! Add section headers. */
BOOL add_shdrs;
/*! Compress data. */
BOOL compress_data;
/*! Skip sections. */
BOOL skip_sections;
/*! Key revision. */
u16 key_revision;
/*! Auth ID. */
u64 auth_id;
/*! Vendor ID. */
u32 vendor_id;
/*! SELF type. */
u32 self_type;
/*! Application version. */
u64 app_version;
/*! Firmware version. */
u64 fw_version;
/*! Control flags. */
u8 *ctrl_flags;
/*! Capability flags. */
u8 *cap_flags;
#ifdef CONFIG_CUSTOM_INDIV_SEED
/*! Individuals seed. */
u8 *indiv_seed;
/*! Individuals seed size. */
u32 indiv_seed_size;
#endif
/*! NPDRM config (used if not NULL). */
npdrm_config_t *npdrm_config;
} self_config_t;
/*! Print SELF info. */
BOOL self_print_info(FILE *fp, sce_buffer_ctxt_t *ctxt);
/*! Create ELF from SELF. */
BOOL self_write_to_elf(sce_buffer_ctxt_t *ctxt, const s8 *elf_out);
/*! Create SELF from ELF. */
BOOL self_build_self(sce_buffer_ctxt_t *ctxt, self_config_t *sconf);
#endif