mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-15 00:16:48 +00:00
fusee: add package3 magic
This commit is contained in:
parent
715eacbf8e
commit
4ad300c33c
2 changed files with 8 additions and 7 deletions
|
@ -52,8 +52,8 @@ def write_kip_meta(f, kip, ofs):
|
|||
def write_header(f, all_kips, wb_size, tk_size, xf_size, ex_size, ms_size, fs_size, rb_size, git_revision, major, minor, micro, relstep, s_major, s_minor, s_micro, s_relstep):
|
||||
# Unpack kips
|
||||
emummc, kips = all_kips
|
||||
# Write reserved0 (previously entrypoint) as infinite loop instruction.
|
||||
f.write(pk('<I', 0xEAFFFFFE))
|
||||
# Write magic as PK31 magic.
|
||||
f.write(b'PK31')
|
||||
# Write metadata offset = 0x10
|
||||
f.write(pk('<I', 0x20))
|
||||
# Write flags
|
||||
|
@ -64,8 +64,8 @@ def write_header(f, all_kips, wb_size, tk_size, xf_size, ex_size, ms_size, fs_si
|
|||
f.write(pk('<I', len(KIP_NAMES)))
|
||||
# Write reserved1
|
||||
f.write(b'\xCC' * 0xC)
|
||||
# Write magic
|
||||
f.write('FSS0')
|
||||
# Write legacy magic
|
||||
f.write(b'FSS0')
|
||||
# Write total size
|
||||
f.write(pk('<I', 0x800000))
|
||||
# Write reserved2
|
||||
|
|
|
@ -42,15 +42,16 @@ namespace ams::nxboot {
|
|||
static_assert(sizeof(ExternalPackageKipMeta) == 0x30);
|
||||
|
||||
struct ExternalPackageHeader {
|
||||
static constexpr u32 Magic = util::FourCC<'F','S','S','0'>::Code;
|
||||
static constexpr u32 Magic = util::FourCC<'P', 'K', '3', '1'>::Code;
|
||||
static constexpr u32 LegacyMagic = util::FourCC<'F','S','S','0'>::Code;
|
||||
|
||||
u32 reserved0; /* Previously entrypoint. */
|
||||
u32 magic; /* Previously entrypoint. */
|
||||
u32 metadata_offset;
|
||||
u32 flags;
|
||||
u32 meso_size;
|
||||
u32 num_kips;
|
||||
u32 reserved1[3];
|
||||
u32 magic;
|
||||
u32 legacy_magic;
|
||||
u32 total_size;
|
||||
u32 reserved2; /* Previously crt0 offset. */
|
||||
u32 content_header_offset;
|
||||
|
|
Loading…
Reference in a new issue