Index: apps/installer-ipodclassic/main.c |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | }
|
134 | 134 | uint32_t database = fatsectors + reserved;
|
135 | 135 | uint32_t clusoffset = 0;
|
136 | | - uint32_t* buf = memalign(0x20000, 0x10);
|
| 136 | + uint32_t* buf = memalign(0x10, 0x20000);
|
137 | 137 | memset(buf, 0, 0x800);
|
138 | 138 | memcpy(buf, "\xeb\x58\x00MSWIN5.0\0\x10", 0xd);
|
139 | 139 | ((uint8_t*)buf)[0xd] = secperclus;
|
— | — | @@ -220,8 +220,8 @@ |
221 | 221 | bool updating = disk_mount(0);
|
222 | 222 | cputc(3, '.');
|
223 | 223 |
|
224 | | - norbuf = memalign(0x100000, 0x10);
|
225 | | - oldnor = memalign(0x100000, 0x10);
|
| 224 | + norbuf = memalign(0x10, 0x100000);
|
| 225 | + oldnor = memalign(0x10, 0x100000);
|
226 | 226 | memset(norbuf, 0xff, 0x100000);
|
227 | 227 | cputc(3, '.');
|
228 | 228 | bootflash_readraw(oldnor, 0, 0x100000);
|
— | — | @@ -442,6 +442,9 @@ |
443 | 443 | cost += script[sp++];
|
444 | 444 | progressbar_setpos(&progressbar, cost, false);
|
445 | 445 | }
|
| 446 | +
|
| 447 | + if (oldnor) free(oldnor);
|
| 448 | +
|
446 | 449 | ui->blenda(165, 36, 255, framebuf, 0, 0, 165, bg, 77, 100, 320, actions, 0, 72, 165);
|
447 | 450 | displaylcd(77, 100, 165, 36, framebuf, 0, 0, 165);
|
448 | 451 | progressbar_init(&progressbar, 15, 304, 135, 159, 0x77ff, 0xe8, 0x125f, 0, 256);
|
— | — | @@ -451,6 +454,16 @@ |
452 | 455 | progressbar_setpos(&progressbar, i, false);
|
453 | 456 | }
|
454 | 457 |
|
| 458 | + free(norbuf);
|
| 459 | + free(framebuf);
|
| 460 | + free(actions);
|
| 461 | + free(bg);
|
| 462 | +
|
| 463 | + release_library(libui);
|
| 464 | + release_library(libpng);
|
| 465 | + library_unload(libui);
|
| 466 | + library_unload(libpng);
|
| 467 | +
|
455 | 468 | shutdown(false);
|
456 | 469 | reset();
|
457 | 470 | }
|
Index: apps/installer-ipodclassic/Makefile |
— | — | @@ -210,13 +210,8 @@ |
211 | 211 |
|
212 | 212 | flashfiles/emcore-ipodclassic.bin: $(EMCOREDIR)/build/ipodclassic/emcore.bin emcore
|
213 | 213 | @echo [EMBCFG] $@
|
214 | | - @$(EMCOREBOOTCFG) $< $@ "(3, '/.emcore/boot.emcoreapp', None, (2, 'bootmenu', None, None))"
|
| 214 | + @$(EMCOREBOOTCFG) $< $@ "(3, '/.boot/init.emcoreapp', None, (2, 'bootmenu', None, None))"
|
215 | 215 |
|
216 | | -$(EMBIOSDIR)/build/ipodclassic/embios.bin: embios
|
217 | | -
|
218 | | -embios:
|
219 | | - @make -C $(EMBIOSDIR) ipodclassic
|
220 | | -
|
221 | 216 | emcore:
|
222 | 217 | @make -C $(EMCOREDIR) ipodclassic
|
223 | 218 |
|