|
19 | 19 | PROJECT_ICON = os.getenv("PROJECT_ICON", "assets/icon.raw") |
20 | 20 | PROJECT_APPS = { |
21 | 21 | # Project name Type, SubType, Size |
22 | | - 'launcher': [0, 0, 1048576], |
23 | | - 'updater': [0, 0, 524288], # Should be first to allow growth but it interfere with boot for now |
24 | | - 'retro-core': [0, 0, 851968], |
25 | | - 'prboom-go': [0, 0, 851968], |
26 | | - 'snes9x': [0, 0, 655360], |
27 | | - 'gwenesis': [0, 0, 1048576], |
28 | | - 'fmsx': [0, 0, 655360], |
29 | | - 'gbsp': [0, 0, 851968], |
| 22 | + 'updater': [0, 0, 393216], |
| 23 | + 'launcher': [0, 16, 1048576], |
| 24 | + 'retro-core': [0, 16, 851968], |
| 25 | + 'prboom-go': [0, 16, 851968], |
| 26 | + 'snes9x': [0, 16, 655360], |
| 27 | + 'gwenesis': [0, 16, 1048576], |
| 28 | + 'fmsx': [0, 16, 655360], |
| 29 | + 'gbsp': [0, 16, 851968], |
30 | 30 | } |
31 | 31 | # PROJECT_APPS = {} |
32 | 32 | # for t in glob.glob("*/CMakeLists.txt"): |
@@ -88,8 +88,11 @@ def build_image(apps, output_file, img_type="odroid", fatsize=0, target="unknown |
88 | 88 | ota_next_id = 16 |
89 | 89 | for app in apps: |
90 | 90 | part = PROJECT_APPS[app] |
91 | | - args += [str(part[0]), str(ota_next_id), str(part[2]), app, os.path.join(app, "build", app + ".bin")] |
92 | | - ota_next_id += 1 |
| 91 | + subtype = part[1] |
| 92 | + if part[0] == 0 and (part[1] & 0xF0) == 0x10: # Rewrite OTA indexes to maintain order |
| 93 | + subtype = ota_next_id |
| 94 | + ota_next_id += 1 |
| 95 | + args += [str(part[0]), str(subtype), str(part[2]), app, os.path.join(app, "build", app + ".bin")] |
93 | 96 | if fatsize: |
94 | 97 | args += ["1", "129", fatsize, "vfs", "none"] |
95 | 98 |
|
@@ -201,10 +204,6 @@ def monitor_app(app, port, baudrate=115200): |
201 | 204 | apps = [app for app in PROJECT_APPS.keys() if app in apps] # Ensure ordering and uniqueness |
202 | 205 |
|
203 | 206 | try: |
204 | | - if command in ["build-fw", "build-img", "release", "install"] and "launcher" not in apps: |
205 | | - print("\nWARNING: The launcher is mandatory for those apps and will be included!\n") |
206 | | - apps.insert(0, "launcher") |
207 | | - |
208 | 207 | if command in ["clean", "release"]: |
209 | 208 | print("=== Step: Cleaning ===\n") |
210 | 209 | for app in apps: |
|
0 commit comments