freemyipod r165 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r164‎ | r165 | r166 >
Date:16:29, 19 August 2010
Author:theseven
Status:new
Tags:
Comment:
Fix a bunch of bugs that prevented the installer from booting
Modified paths:
  • /apps/installer-nano2g/Makefile (modified) (history)
  • /apps/installer-nano2g/bootstub/bootstub.S (modified) (history)
  • /embios/trunk/loader/ipodnano2g/version.h (modified) (history)
  • /embios/trunk/tools/libembiosbootcfg.py (modified) (history)

Diff [purge]

Index: apps/installer-nano2g/bootstub/bootstub.S
@@ -320,15 +320,17 @@
321321 orr r0, r0, #5
322322 orr r0, r0, #0x1000
323323 mcr p15, 0, r0,c1,c0 @ Re-enable the Protection Unit and caches
 324+ ldr r1, _stubend + 4
324325 ldr r0, _stubend
325 - ldr r1, _stubend + 4
326 - add r1, r1, r0
 326+ add r0, r1, r0
327327 mov r2, #0x08000000
328328 movepayloadloop:
329 - cmp r1, r0
330 - ldrhi r3, [r0], #4
 329+ cmp r0, r1
 330+ ldrhi r3, [r1], #4
331331 strhi r3, [r2], #4
332332 bhi movepayloadloop
 333+ bl flushcache
 334+ mcr p15, 0, r0,c7,c5
333335 mov pc, #0x08000000
334336
335337
@@ -906,7 +908,4 @@
907909 bmi sleepmsloop
908910 mov pc, lr
909911
910 - nop
911 - nop
912 -
913912 _stubend:
\ No newline at end of file
Index: apps/installer-nano2g/Makefile
@@ -61,9 +61,9 @@
6262
6363 build/$(NAME).integrated.bin: $(EMBIOSDIR)/build/ipodnano2g/embios.bin build/$(NAME).embiosapp
6464 @echo [EMBAPP] $@
65 - @$(EMBIOSEMBEDAPP) $^ $@ --run-from=08000000
 65+ @$(EMBIOSEMBEDAPP) $^ $@ --run-from=0x08000000
6666
67 -build/$(NAME).embiosapp: build/$(NAME).plain.embiosapp $(BITMAPS)
 67+build/$(NAME).embiosapp: build/$(NAME).plain.embiosapp $(BITMAPS) flashfiles.built
6868 @echo [GENINS] $<
6969 @$(GENINSTALLER) $< $@
7070
@@ -151,6 +151,7 @@
152152 endif
153153
154154 flashfiles: $(FLASHFILES)
 155+ @touch flashfiles.built
155156
156157 flashfiles/uninstaller-nano2g.embiosapp.ucl: $(UNINSTDIR)/build/uninstaller-nano2g.embiosapp.ucl uninstaller-nano2g
157158 @echo [CP] $@
@@ -178,11 +179,11 @@
179180
180181 flashfiles/embios-ipodnano2g.bin: $(EMBIOSDIR)/build/ipodnano2g/embios.bin embios
181182 @echo [EMBCFG] $@
182 - @$(EMBIOSBOOTCFG) $< $@ --file=/iLoader/boot.embiosapp --file-compressed --file-run-from=08000000 \
183 - --flash="iloader " --flash-compressed --flash-run-from=09e00000
 183+ @$(EMBIOSBOOTCFG) $< $@ --file=/iLoader/boot.embiosapp --file-compressed --file-run-from=0x08000000 \
 184+ --flash=iloader --flash-compressed --flash-run-from=0x09e00000
184185
185186 embios:
186 - @make -C $(EMBIOSDIR)
 187+ @make -C $(EMBIOSDIR) ipodnano2g
187188
188189 embiosldr-ipodnano2g:
189190 @make -C $(EMBIOSDIR)/loader/ipodnano2g
Index: embios/trunk/tools/libembiosbootcfg.py
@@ -48,30 +48,30 @@
4949 if "tryfile" in args: tryfile = 1 if args["tryfile"] else 0
5050 if "filename" in args: filename = args["filename"].ljust(256, "\0")
5151 if "filecomp" in args:
52 - if args["filecomp"]: fileflags = fileflags | 2
 52+ if args["filecomp"]: fileflags = fileflags | 1
 53+ else: fileflags = fileflags & ~1
 54+ if "filecopy" in args:
 55+ if args["filecopy"]: fileflags = fileflags | 2
5356 else: fileflags = fileflags & ~2
54 - if "filecopy" in args:
55 - if args["filecopy"]: fileflags = fileflags | 1
56 - else: fileflags = fileflags & ~1
5757 if "filedest" in args: filedest = args["filedest"]
5858 if "tryflash" in args: tryflash = 1 if args["tryflash"] else 0
5959 if "flashname" in args: flashname = args["flashname"].ljust(8)
6060 if "flashcomp" in args:
61 - if args["flashcomp"]: flashflags = flashflags | 2
 61+ if args["flashcomp"]: flashflags = flashflags | 1
 62+ else: flashflags = flashflags & ~1
 63+ if "flashcopy" in args:
 64+ if args["flashcopy"]: flashflags = flashflags | 2
6265 else: flashflags = flashflags & ~2
63 - if "flashcopy" in args:
64 - if args["flashcopy"]: flashflags = flashflags | 1
65 - else: flashflags = flashflags & ~1
6666 if "flashdest" in args: flashdest = args["flashdest"]
6767 if "trymmap" in args: trymmap = 1 if args["trymmap"] else 0
6868 if "mmapaddr" in args: mmapaddr = args["mmapaddr"]
6969 if "mmapsize" in args: mmapsize = args["mmapsize"]
7070 if "mmapcomp" in args:
71 - if args["mmapcomp"]: mmapflags = mmapflags | 2
 71+ if args["mmapcomp"]: mmapflags = mmapflags | 1
 72+ else: mmapflags = mmapflags & ~1
 73+ if "mmapcopy" in args:
 74+ if args["mmapcopy"]: mmapflags = mmapflags | 2
7275 else: mmapflags = mmapflags & ~2
73 - if "mmapcopy" in args:
74 - if args["mmapcopy"]: mmapflags = mmapflags | 1
75 - else: mmapflags = mmapflags & ~1
7676 if "mmapdest" in args: mmapdest = args["mmapdest"]
7777 data = struct.pack("<I256sIII8sIIIIIII", tryfile, filename, fileflags, filedest,
7878 tryflash, flashname, flashflags, flashdest,
Index: embios/trunk/loader/ipodnano2g/version.h
@@ -25,7 +25,7 @@
2626 #define __VERSION_H__
2727
2828
29 -#define VERSION "0.0.1pre"
 29+#define VERSION "0.0.1"
3030 #define VERSION_MAJOR 0
3131 #define VERSION_MINOR 0
3232 #define VERSION_PATCH 1