From 4ad300c33ccfdf8765a76dc2173b1d47c339d932 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 5 Sep 2021 22:59:54 -0700 Subject: [PATCH] fusee: add package3 magic --- fusee/build_package3.py | 8 ++++---- fusee/program/source/fusee_external_package.hpp | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fusee/build_package3.py b/fusee/build_package3.py index 39cbd6bdd..e196c2e7b 100644 --- a/fusee/build_package3.py +++ b/fusee/build_package3.py @@ -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('::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;