Commit Graph

48 Commits

Author SHA1 Message Date
Dave Murphy
22756068dd
npdmtool: don't error with missing debug flags, error with multiple set (#50) 2024-10-23 16:24:50 +01:00
Michael Scire
28bd095683 elf2nro: add support for aligned header flag 2024-10-14 20:09:52 +01:00
Michael Scire
e36a8251cd npdmtool: add new flags from 18.0.0/19.0.0 2024-10-14 20:09:52 +01:00
Michael Scire
786ccde466 ndpmtool/elftool: support force_debug_prod 2024-10-14 20:09:52 +01:00
Michael Scire
becb4df6f6 use actual lowest/highest priorities, ignoring field names 2022-05-22 16:11:49 +01:00
Michael Scire
70d270d001 Add support for optional OptimizeMemoryAllocation npdm flag 2022-05-22 16:11:49 +01:00
Michael Scire
6fd5ae6e48 generate correct save_data_owner_ids 2022-05-22 16:11:49 +01:00
Michael Scire
87f4744e62 elf2kip/npdmtool: update json format to reflect modern OS.
Version field was incorrectly labeled "process_category". This is now supported (and defaults to 0 if not present on npdm, 1 if not present on kip). process_category is alias.

Support was added for mesosphere large-address map extension (these bits are reserved in official OS).

Support was added for specifying the signature key generation, which determines modulus used to verify ACID.

Support was added for system call capabilities in range [0x80, 0xBF], which kernel allows since 11.0.0.

"title_id" (and min/max) were renamed to program_id. If program_id not present, title_id used as alias.
2022-05-22 16:11:49 +01:00
Dave Murphy
6bad2b90e6 remove type redefinitions 2021-12-27 02:45:15 +00:00
Michael Scire
6f1d635208 build_romfs: fix use-after-free in romfs building 2021-07-17 16:02:12 +02:00
Michael Scire
f6561ef910 romfs: trim trailing spaces 2021-07-17 16:02:12 +02:00
Michael Scire
07835aa357 elf2kip: add support for 12.0.0 immortal process flag 2021-04-10 17:22:07 +02:00
fincs
c2977a7167 nxlink: fix Windows build 2020-12-02 13:16:31 +01:00
Michael Theall
1b660e22c3 Use poll to avoid busy-looping 2020-12-02 12:48:58 +01:00
Michael Scire
72b9e5cc85 npdmtool: be friendlier about disable das field 2020-12-02 02:55:22 +01:00
Michael Scire
fe13e1c1da npdmtool: add support for 11.0.0 DisableDeviceAddressSpaceMerge 2020-12-02 02:00:05 +01:00
Michael Scire
980dbbfe4c npdmtool: add compatibility for 8.0.0+ memory region capabilities 2020-08-21 20:22:07 +02:00
SciresM
48ec411d85
elf2kip: add compatibility for 8.0.0+ memory region capabilities (#30) 2020-08-06 15:32:09 +01:00
Michael Scire
f1ffee8e1d npdmtool: generate FAC compatible with 4.1.0 and under 2020-07-09 01:14:22 +01:00
Michael Scire
2c7bedf37b npdmtool: trim trailing whitespace 2020-07-09 01:14:22 +01:00
HookedBehemoth
d34444b575
npdmtool: add content and save data owner parsing (#27) 2020-06-06 15:11:30 +02:00
Somebody Whoisbored
e607ced3e2 Support SystemResourceSize property in NPDM META (#26) 2020-01-10 12:35:29 +01:00
Michael Scire
20cf1efd2b elf2kip: allow specifying whether to use secure memory or not 2019-12-10 13:09:54 +01:00
HookedBehemoth
026ed556df show help only once when requested 2019-09-02 21:22:27 +02:00
Steven Mattera
d12b301b19 Limited the name to 10 characters. (#23) 2019-05-09 12:48:17 +02:00
roblabla
9d39e91fb0 Allow service_host and service_access to be NULL.
Fixes compatibility with old-style JSON, and is more flexible anyways.
2018-10-30 17:41:00 +01:00
roblabla
1c382d5c09 Avoid using duplicate keys in service_access
Splits service_access into service_host and service_access, both arrays of
strings.

We output service_host first, as that seems to be what Nintendo is doing - all
their NPDMs have service hosts before service accesses.
2018-10-16 16:05:20 -04:00
roblabla
ab742daada Add array-style kernel_capabilities to npdms.
The array-style kernel caps look like:

"kernel_capabilities": [
    { type: "irq_pair", value: [1, 2] },
    // ...
]

Deprecates duplicate-key style.
2018-10-16 16:05:20 -04:00
roblabla
23b1993b42 JSON->NPDM: Write IRQs in the correct order 2018-10-16 16:05:20 -04:00
roblabla
34a304999c Improve error handling in elf2kip 2018-10-16 16:05:20 -04:00
thedax
3c91ce8d6b Nacptool: fix bug with title id parsing on Windows. (#19)
* Fix bug with title id parsing on Windows.

On Windows, longs (as specified by %lX) are 32-bit, not 64-bit, so assuming its size results in the upper 32-bits of the title id being lost.

* Use SCNx64 instead.
2018-10-08 12:10:55 -04:00
Michael Scire
16fcc678e2 elf2nso/elf2nro: Parse Build ID into header. 2018-07-30 16:15:19 -04:00
Marco Baxemyr
d82447b006 romfs.c now closes the directories it opens (#13)
Fixes #12
2018-06-25 00:21:12 +02:00
Dave Murphy
1aceda46f4 add --args (#11)
* add --args

allows gathering of arguments to be sent to the nro and avoid attempted parsing by nxlink. This allows arguments starting with - and -- to be passed to the nro without getopt complaining.
2018-06-23 15:12:18 -04:00
yellows8
0e2d4806b1 Added a newline to the 'pinging switch' print and fixed a string warning in build_pfs0. 2018-05-15 17:49:23 -04:00
Dave Murphy
48d96a7033 sanitise large file support 2018-05-08 13:30:21 +02:00
fincs
e2d64bb2fe strtoul -> strtoull (don't assume LP64 for Windows) 2018-05-03 01:15:43 +02:00
SciresM
e68cd31c1d Add npdmtool (#9)
* Add npdmtool.

* Add support for hex string kernel version.

* elf2kip: Fixed shift for kernel_flags.
2018-05-02 12:02:07 -04:00
SciresM
227306d95a Fix errors in elf2kip (#8) 2018-05-01 19:13:41 +02:00
SciresM
92268de97b Add elf2kip (ELF -> KIP1 tool). (#7)
* Add elf2kip
2018-04-24 20:08:49 -04:00
Dave Murphy
7bec1f76f7 use unbuffered IO on windows (#6) 2018-04-19 16:15:06 -04:00
SciresM
8b93b8598b Add RomFS Building from directory to elf2nro (#5)
build_romfs, romfsdir support in elf2nro
2018-04-19 14:48:55 -04:00
Dave Murphy
42739f52c9 check env var exists before comparing (#4) 2018-03-18 22:17:45 -04:00
Dave Murphy
b53e334c76 add nxlink 2018-03-15 21:22:50 +01:00
yellows8
ffe4cfd5e2 Fixed nro bss handling where bss was 1 page too large. 2018-02-03 20:34:35 -05:00
yellows8
93f5cb18a2 Added nacptool. 2017-12-31 22:56:30 -05:00
yellows8
3d8238e1d5 Append custom data to the end of NRO for storing assets. 2017-12-30 22:13:59 -05:00
Dave Murphy
2bfd935f4a autoconfiscate 2017-12-21 13:26:34 +00:00