| Line 1... |
Line 1... |
| 1 |
NAME := installer-nano2g
|
1 |
NAME := installer-nano2g
|
| - |
|
2 |
BASENAME ?= $(NAME)
|
| - |
|
3 |
FATNAME ?= INSTAL~1BOO
|
| 2 |
|
4 |
|
| 3 |
EMBIOSDIR ?= ../../embios/trunk/
|
5 |
EMBIOSDIR ?= ../../embios/trunk/
|
| 4 |
ILOADERDIR ?= ../iloader/
|
6 |
ILOADERDIR ?= ../iloader/
|
| 5 |
UNINSTDIR ?= ../uninstaller-nano2g/
|
7 |
UNINSTDIR ?= ../uninstaller-nano2g/
|
| 6 |
UMSBOOTDIR ?= ../../umsboot/
|
8 |
UMSBOOTDIR ?= ../../umsboot/
|
| - |
|
9 |
NOTEBOOTDIR ?= ../../noteboot/
|
| 7 |
TOOLSDIR ?= ../../tools/
|
10 |
TOOLSDIR ?= ../../tools/
|
| 8 |
|
11 |
|
| 9 |
BITMAPS = build/backdrop.ucl build/welcome.ucl build/repartition.ucl build/installing.ucl build/badpartition.ucl \
|
12 |
BITMAPS = build/backdrop.ucl build/welcome.ucl build/repartition.ucl build/installing.ucl build/badpartition.ucl \
|
| 10 |
build/cancelled.ucl build/repartitioning.ucl build/preparing.ucl build/installfiles.ucl build/flashing.ucl
|
13 |
build/cancelled.ucl build/repartitioning.ucl build/preparing.ucl build/installfiles.ucl build/flashing.ucl
|
| 11 |
|
14 |
|
| Line 22... |
Line 25... |
| 22 |
STUBEMBED := python tools/stubembed.py
|
25 |
STUBEMBED := python tools/stubembed.py
|
| 23 |
COMPILECONFIG := python $(ILOADERDIR)/tools/compileconfig.py
|
26 |
COMPILECONFIG := python $(ILOADERDIR)/tools/compileconfig.py
|
| 24 |
EMBIOSBOOTCFG := python $(EMBIOSDIR)/tools/embiosbootcfg.py
|
27 |
EMBIOSBOOTCFG := python $(EMBIOSDIR)/tools/embiosbootcfg.py
|
| 25 |
EMBIOSEMBEDAPP := python $(EMBIOSDIR)/tools/embiosembedapp.py
|
28 |
EMBIOSEMBEDAPP := python $(EMBIOSDIR)/tools/embiosembedapp.py
|
| 26 |
CRYPTFW := python $(EMBIOSDIR)/tools/ipodcrypt.py nano2g-cryptfirmware
|
29 |
CRYPTFW := python $(EMBIOSDIR)/tools/ipodcrypt.py nano2g-cryptfirmware
|
| - |
|
30 |
GENNOTE := python $(NOTEBOOTDIR)/gennote.py
|
| 27 |
SCRAMBLE := python $(TOOLSDIR)/scramble.py
|
31 |
SCRAMBLE := python $(TOOLSDIR)/scramble.py
|
| 28 |
|
32 |
|
| 29 |
CFLAGS += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940t
|
33 |
CFLAGS += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940t
|
| 30 |
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sections
|
34 |
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sections
|
| 31 |
|
35 |
|
| Line 44... |
Line 48... |
| 44 |
|
48 |
|
| 45 |
all: $(NAME)
|
49 |
all: $(NAME)
|
| 46 |
|
50 |
|
| 47 |
-include $(OBJ:%=%.dep)
|
51 |
-include $(OBJ:%=%.dep)
|
| 48 |
|
52 |
|
| 49 |
$(NAME): build/$(NAME).ipodx
|
53 |
$(NAME): build/$(BASENAME).bootnote build/$(BASENAME).ipodx
|
| 50 |
|
54 |
|
| 51 |
build/$(NAME).ipodx: build/$(NAME).fw
|
55 |
build/$(BASENAME).ipodx: build/$(NAME).fw
|
| 52 |
@echo [SCRAMB] $<
|
56 |
@echo [SCRAMB] $<
|
| 53 |
@$(SCRAMBLE) $< $@ --signature=nn2x --targetid=62
|
57 |
@$(SCRAMBLE) $< $@ --signature=nn2x --targetid=62
|
| 54 |
|
58 |
|
| 55 |
build/$(NAME).fw: build/$(NAME).bin
|
59 |
build/$(NAME).fw: build/$(NAME).bin
|
| 56 |
@echo [CFW] $<
|
60 |
@echo [CFW] $<
|
| 57 |
@$(CRYPTFW) $< $@
|
61 |
@$(CRYPTFW) $< $@
|
| 58 |
|
62 |
|
| - |
|
63 |
build/$(BASENAME).bootnote: build/$(NAME).bin
|
| - |
|
64 |
@echo [GENNOT] $<
|
| - |
|
65 |
@$(GENNOTE) $< "$(FATNAME)" $@
|
| - |
|
66 |
|
| 59 |
build/$(NAME).bin: build/bootstub.bin build/$(NAME).integrated.bin
|
67 |
build/$(NAME).bin: build/bootstub.bin build/$(NAME).integrated.bin
|
| 60 |
@echo [STUBEM] $@
|
68 |
@echo [STUBEM] $@
|
| 61 |
@$(STUBEMBED) $^ $@
|
69 |
@$(STUBEMBED) $^ $@
|
| 62 |
|
70 |
|
| 63 |
build/$(NAME).integrated.bin: $(EMBIOSDIR)/build/ipodnano2g/embios.bin build/$(NAME).embiosapp
|
71 |
build/$(NAME).integrated.bin: $(EMBIOSDIR)/build/ipodnano2g/embios.bin build/$(NAME).embiosapp.ucl
|
| 64 |
@echo [EMBAPP] $@
|
72 |
@echo [EMBAPP] $@
|
| 65 |
@$(EMBIOSEMBEDAPP) $^ $@ --run-from=0x08000000
|
73 |
@$(EMBIOSEMBEDAPP) $^ $@ --run-from=0x08f00000 --compressed
|
| - |
|
74 |
|
| - |
|
75 |
build/$(NAME).embiosapp.ucl: build/$(NAME).embiosapp
|
| - |
|
76 |
@echo [UCL] $<
|
| - |
|
77 |
@$(UCLPACK) $< $@
|
| 66 |
|
78 |
|
| 67 |
build/$(NAME).embiosapp: build/$(NAME).plain.embiosapp $(BITMAPS) flashfiles.built
|
79 |
build/$(NAME).embiosapp: build/$(NAME).plain.embiosapp $(BITMAPS) flashfiles.built
|
| 68 |
@echo [GENINS] $<
|
80 |
@echo [GENINS] $<
|
| 69 |
@$(GENINSTALLER) $< $@
|
81 |
@$(GENINSTALLER) $< $@ /notes/$(BASENAME).bootnote fsfiles
|
| 70 |
|
82 |
|
| 71 |
build/bootstub.bin: build/bootstub.elf
|
83 |
build/bootstub.bin: build/bootstub.elf
|
| 72 |
@echo [OC] $<
|
84 |
@echo [OC] $<
|
| 73 |
@$(OBJCOPY) -O binary $^ $@
|
85 |
@$(OBJCOPY) -O binary $^ $@
|
| 74 |
|
86 |
|