All Projects

ID  descProjectTask TypeCategorySeveritySummaryOpened
13086RockboxBugsRbutilLowrbutil fails to build bootloader2016-10-142 Task Description

Affected versions:
RBUtil V1.4.0
git version 2a2800b528010320ca504a39106806ec21f0220 (2016-10-12)

rbutil fails to build bootloader. Tested for Iriver H1x0 and H3x0 platforms.

Progress window shows:

Adding bootloader firmware file
Error in patching: reading firmware failed

Terminal output shows:

[httpget.cpp:230 INFO] Get URIhttp://download.rockbox.org/bootloader/iriver/bootloader-h300.bin
[httpget.cpp:200 INFO] Request started
[httpget.cpp:148 INFO] Request finished, status code: 200
[httpget.cpp:151 INFO] Data from cache: true
[bootloaderinstallbase.cpp:71 INFO] Downloading bootloader finished, error: false
/tmp/qt_temp.U16458: Resource temporarily unavailable
[selectiveinstallwidget.cpp:195 INFO] continuing install with stage 1
[selectiveinstallwidget.cpp:197 ERROR] Last part returned error.
[selectiveinstallwidget.cpp:214 INFO] All install stages done.
[rockboxinfo.cpp:27 INFO] Getting version info from rockbox-info.txt

Fired up gdb and debugged the git 2a2800b5280103… build:

The failure is in function mkboot_iriver in mkboot.c line 98:
Line 98:

  i = fread(image+16, 1, len, f);

len is calculated as 2636272.
But file size of /tmp/qt_temp.U16458 is only 2621440, resulting in a short read of 2621424 bytes. So error condition “i < len” fires and function returns without building bootloader.

I tested this on two different gentoo systems. It worked on one, but failed on the other. Both are more or less up to date, but have one significant difference: 32bit vs 64bit system.

The system that did compile and run perfectly uses:
gcc i686-pc-linux-gnu-4.9.4 (len=2636272, file size=2637824)
The system that failed uses:
gcc x86_64-pc-linux-gnu-4.9.3 (len=2636272, file size=2621440)

So, the failing rbutil creates a temporary file that is too short. I didn’t debug deeper to find out why.

cu
John

Showing tasks 1 - 1 of 1 Page 1 of 1

Available keyboard shortcuts

Tasklist

Task Details

Task Editing