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;