Difference between revisions of "Makerom"
m |
m (grammar) |
||
Line 8: | Line 8: | ||
}} | }} | ||
− | makerom is a tool which can be used to | + | makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files. |
== Using Makerom == | == Using Makerom == | ||
=== Command line === | === Command line === | ||
− | Since CCI and CIA are NCCH containers, makerom was built so CXIs could be built stand alone | + | 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 from an ELF file. As a result there are many combinations which can be used; for simplicity, specific functions will be explained by breaking them up into argument groups: |
'''Creating CXIs from scratch:''' | '''Creating CXIs from scratch:''' | ||
Line 48: | Line 48: | ||
=== Creating RSF files === | === Creating RSF files === | ||
− | Inspired by Nintendo's format for their makerom, | + | Inspired by Nintendo's format for their makerom, a yaml configuration file is 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. | + | For CXI, RSF files can be used to specify permissions, and access control settings. Makerom can use default settings by use of the "-desc" option, which removes the requirement for specifying them in the RSF file. |
Sample RSF to be used with "-desc": [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample0.rsf download] | Sample RSF to be used with "-desc": [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample0.rsf download] | ||
Line 57: | Line 57: | ||
=== Creating ELF files === | === Creating ELF files === | ||
− | ELF files created using the official SDK can be used with makerom. | + | ELF files that are created using the official SDK can be used with makerom. ELF files created using [https://github.com/smealum/ctrulib ctrulib] can be used, provided they are linked with this linker script: [https://gist.github.com/yellows8/6da7984a80a825b10294 download] |
== Compiling Source == | == Compiling Source == | ||
Line 64: | Line 64: | ||
For Linux, gcc/g++/make must be installed. | For Linux, gcc/g++/make must be installed. | ||
− | All additional libraries used by makerom | + | All additional libraries used by makerom are included in the source, and are linked statically. |
== Issues == | == Issues == |
Revision as of 19:15, 2 November 2014
makerom | |
General | |
---|---|
Author(s) | 3dsguy |
Type | PC utility |
Version | 0.8 |
Links | |
Download | |
Source |
makerom is a tool which can be used to create NCCH, CCI, and CIA files.
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 from an ELF file. As a result there are many combinations which can be used; 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 CIAs:
-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, a yaml configuration file is 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. Makerom can use default settings by use of the "-desc" option, which removes the requirement for specifying 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 that are created using the official SDK can be used with makerom. 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)