Makerom
makerom is a tool which can be used to created NCCH and CCI and CIA files.
makerom | |
General | |
---|---|
Author(s) | 3dsguy |
Type | PC utility |
Version | 0.8 |
Links | |
Download | |
Source |
Using Makerom
Command line
Since CCI and CIA are NCCH containers, makerom was built so CXIs could be built stand alone, or straight into a container format. It is also possible rebuild CXIs as easily building a CXI from an elf. As a result the are many combinations which can be used, and for simplicity specific functions will be explained by breaking them up into argument groups:
Creating CXIs from scratch:
-elf <elf path> -rsf <rsf path> [-icon <icon path> -banner <banner path>]
Rebuilding CXIs:
-code <decompressed exefs .code> -exheader <exheader from original CXI> -rsf <rsf path> [-icon <icon path> -banner <banner path> -romfs <cleartext romfs binary>]
Creating CFAs:
-f cfa -rsf <rsf path> [-icon <icon path> -romfs <romfs binary>]
Creating CCIs:
-f cci [-content <path>:<index> ...]
Creating CCIs:
-f cia [-content <path>:<index>:<id> ...]
Using Desc presets:
-desc <app type>:<firm version>
- 'app type' can be SDApp / ECApp / Demo / DlpChild
- 'firm version' is the target kernel version minor for the intended 3DS system.
Examples: Create a CCI, using a manual CFA, and a desc preset:
makerom -f cci -elf homebrew.elf -rsf app.rsf -desc sdapp:33 -icon homebrew.icn -banner homebrew.bnr -content manual.cfa:1 -o homebrew.cci
Create a CIA using an already built application CXI and manual CFA:
makerom -f cia -content homebrew.cxi:0:0 -content manual.cfa:1:1 -o homebrew.cia
Rebuild a CXI:
makerom -code code.bin -exheader exheader.bin -icon icon.bin -banner banner.bin -romfs romfs.bin -rsf app.rsf -desc sdapp:33 -o rebuild.cxi
Creating RSF files
Inspired by Nintendo's format for their makerom, is a yaml configuration file, required for creating NCCH files. CIA/CCI can be created without using a RSF file, but default settings will be used.
For CXI, RSF files can be used to specify permissions, and access control settings. However makerom can use default settings by use of the "-desc" option, which removes the requirement for specifing them in the RSF file.
Sample RSF to be used with "-desc": download
Sample RSF to be used without "-desc": download
Creating ELF files
ELF files created using the official SDK can be used with makerom. But ELF files created using ctrulib, can be used, provided they are linked with this linker script: download
Compiling Source
For Windows use MinGW, 64bit versions of MinGW are supported also.
For Linux, gcc/g++/make must be installed.
All additional libraries used by makerom, are included in the source, and are linked statically.
Issues
- Proper ticket index generation isn't complete (CIA tickets are valid for only one content)
- RomFs hasn't been completely implemented (But valid pre-built romfs can be used as substitute)