diff --git a/Makefile b/Makefile index c8b6591..432b49f 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ LV1_DIR=source/lv1 # Configuration CFLAGS = -Wall -Os -I$(LV1_DIR) -ffunction-sections -fdata-sections \ - -m64 -mno-toc -DBYTE_ORDER=BIG_ENDIAN -mno-altivec -D$(CURRENT_TARGET) + -m64 -mno-toc -DBYTE_ORDER=BIG_ENDIAN -mno-altivec -D$(CURRENT_TARGET) $(CYGNOS_DEF) AFLAGS = -Iinclude -m64 LDFLAGS = -nostdlib -n -m64 -Wl,--gc-sections @@ -23,7 +23,7 @@ OBJS = $(LV1_DIR)/startup.o \ $(LV1_DIR)/vsprintf.o \ $(LV1_DIR)/puff/puff.o -TARGETS = xell-1f xell-2f xell-gggggg +TARGETS = xell-1f xell-2f xell-gggggg xell-gggggg_cygnos_demon xell-1f_cygnos_demon xell-2f_cygnos_demon # Build rules all: $(foreach name,$(TARGETS),$(addprefix $(name).,build)) @@ -50,6 +50,11 @@ clean: xell-gggggg.elf: CURRENT_TARGET = HACK_GGGGGG xell-1f.elf xell-2f.elf: CURRENT_TARGET = HACK_JTAG +xell-gggggg_cygnos_demon.elf: CURRENT_TARGET = HACK_GGGGGG +xell-gggggg_cygnos_demon.elf: CYGNOS_DEF = -DCYGNOS +xell-1f_cygnos_demon.elf xell-2f_cygnos_demon.elf: CURRENT_TARGET = HACK_JTAG +xell-1f_cygnos_demon.elf xell-2f_cygnos_demon.elf: CYGNOS_DEF = -DCYGNOS + %.elf: $(LV1_DIR)/%.lds $(OBJS) @$(CC) -n -T $< $(LDFLAGS) -o $@ $(OBJS) @@ -65,4 +70,4 @@ stage2.elf32.gz: FORCE @echo -n "xxxxxxxxxxxxxxxx" >> $@ # add footer @dd if=stage2.elf32.gz of=$@ conv=notrunc bs=16384 seek=1 # inject stage2 -FORCE: \ No newline at end of file +FORCE: diff --git a/source/lv1/xell-1f_cygnos_demon.lds b/source/lv1/xell-1f_cygnos_demon.lds new file mode 100644 index 0000000..f3281c9 --- /dev/null +++ b/source/lv1/xell-1f_cygnos_demon.lds @@ -0,0 +1,16 @@ + ENTRY(_start) + SECTIONS + { + . = 0x800000001c000000; + .text : { *(.text) } + .data : { *(.data) } + .sdata : { *(.sdata) } + .rodata : { *(.rodata)} + + . = 0x800000001c080000; + + bss_start = .; + .bss : { *(.bss) } + .sbss : { *(.sbss) } + bss_end = .; + } diff --git a/source/lv1/xell-2f_cygnos_demon.lds b/source/lv1/xell-2f_cygnos_demon.lds new file mode 100644 index 0000000..07e79ea --- /dev/null +++ b/source/lv1/xell-2f_cygnos_demon.lds @@ -0,0 +1,16 @@ + ENTRY(_start) + SECTIONS + { + . = 0x800000001c040000; + .text : { *(.text) } + .data : { *(.data) } + .sdata : { *(.sdata) } + .rodata : { *(.rodata)} + + . = 0x800000001c080000; + + bss_start = .; + .bss : { *(.bss) } + .sbss : { *(.sbss) } + bss_end = .; + } diff --git a/source/lv1/xell-gggggg_cygnos_demon.lds b/source/lv1/xell-gggggg_cygnos_demon.lds new file mode 100644 index 0000000..f3281c9 --- /dev/null +++ b/source/lv1/xell-gggggg_cygnos_demon.lds @@ -0,0 +1,16 @@ + ENTRY(_start) + SECTIONS + { + . = 0x800000001c000000; + .text : { *(.text) } + .data : { *(.data) } + .sdata : { *(.sdata) } + .rodata : { *(.rodata)} + + . = 0x800000001c080000; + + bss_start = .; + .bss : { *(.bss) } + .sbss : { *(.sbss) } + bss_end = .; + }