Difference between revisions of "Makerom"

From 3dbrew
Jump to navigation Jump to search
(Created page with "{{Infobox homebrew | title = makerom | type = pc utility | author = 3dsguy | source = https://github.com/3DSGuy/Project_CTR/tree/master/makerom ...")
 
Line 3: Line 3:
 
| type        = pc utility
 
| type        = pc utility
 
| author      = [[User:3dsguy|3dsguy]]
 
| author      = [[User:3dsguy|3dsguy]]
 +
| download = https://dl.dropboxusercontent.com/u/60710927/CTR/makerom/makerom.zip
 
| source = https://github.com/3DSGuy/Project_CTR/tree/master/makerom
 
| source = https://github.com/3DSGuy/Project_CTR/tree/master/makerom
 
| version    = 0.8
 
| version    = 0.8
Line 57: Line 58:
 
=== Creating ELF files ===
 
=== Creating ELF files ===
 
ELF files created using the official SDK can be used with makerom. But ELF files created using smea's WIP ctrulib, can be used, provided they are linked with this linker script: [https://dl.dropboxusercontent.com/u/60710927/CTR/makerom/ctr_homebrew.ld download]
 
ELF files created using the official SDK can be used with makerom. But ELF files created using smea's WIP ctrulib, can be used, provided they are linked with this linker script: [https://dl.dropboxusercontent.com/u/60710927/CTR/makerom/ctr_homebrew.ld 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 ==
 
== Issues ==

Revision as of 01:34, 6 May 2014

makerom
General
Author(s)3dsguy
TypePC utility
Version0.8
Links
Download
Source


makerom is a tool which can be used to created NCCH and 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 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 smea's WIP 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)