Rockbox

  • Status New
  • Percent Complete
    0%
  • 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
  • Private
Attached to Project: Rockbox
Opened by Michael Chicoine - 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>

Michael Chicoine commented on 2011-11-10 20:52

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

Fred Bauer commented on 2011-11-11 20:58

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

Michael Chicoine commented on 2011-11-12 01:20

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.

Michael Chicoine commented on 2011-11-12 01:44

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/bloat-o-meter.py 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

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing