• Status New
  • Percent Complete
  • Task Type Bugs
  • Category Bootloader
  • Assigned To No-one
  • Operating System Sansa AMSv1
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by mc2739 - 2011-11-10

FS#12380 - e200v2 - mkamsboot cannot patch bootloader since r30937

Since r30937, the e200v2 bootloader is too large and mkamsboot errors with:

[ERR] Packed data (120926 bytes) doesn't fit in the firmware (120860 bytes)

Steps to reproduce:
1. build e200v2 bootloader
2. cd to rbutil/mkamsboot
3. run make to create the mkamsboot utility
4. run mkamsboot <path-to-e200pa.bin> <path-to-bootloader-e200v2.sansa> <path-to-output.bin>

funman suggested using thumb mode for the bootloader. The resulting bootloader is small enough for mkamsboot to patch (120048 bytes total size - 878 bytes smaller) and does boot properly on the e200v2.

The command used to create the thumb version bootloader is:

../tools/configure –target=sansae200v2 –type=b –thumb

edit: It looks like bootloader USB mode is not working with the thumb build

I take it gcc -Os is too dangerous? It saves about 4k.

gcc -Os also creates a working bootloader (179 bytes smaller than -O), although it is not as small as the thumb bootloader.

The non-working bootloader USB mode is a separate issue. I will open another bug report for that issue.

In reply to kugel's question in #rockbox:

< kugel> mc2739: did the code size increase the bootloader or is there some static array that got larger?

../utils/analysis/ bootloader-30936.elf bootloader-30937.elf
function old new delta
lcd_alpha_bitmap_part_mix - 1272 +1272
lcd_alpha_bitmap_part 1096 92 -1004

(add/remove: 1/0 grow/shrink: 0/1 up/down: 1272/-1004)
Total: 268 bytes

bahus commented on 2024-02-17 11:41

Bootloader still doesn't fit. Only now –thumb option doesn't help:
[ERR] Packed data (131229 bytes) doesn't fit in the firmware (120860 bytes)


Available keyboard shortcuts


Task Details

Task Editing