Commit graph

1593 commits

Author SHA1 Message Date
Amaury Pouly
d13e5b964e mkimxboot: add NWZ-E370 1.0.1 firmware (US)
Change-Id: I49ddcbe2f5c1c3aabc604b81b89272cf0292e28e
2013-09-28 12:14:45 +02:00
Amaury Pouly
b60712deb6 sonynwz: rework dualboot mechanism
Now boot to RB if play/pause is pressed during 1 second, and to OF if
back is pressed 1 second. Otherwise power off. If hold is on, also power
off. In USB and alarm context, always boot and back determines OF vs RB.

Change-Id: Ie1d6c971901d6473255461cc7d71a5ee3177ecad
2013-09-26 20:19:30 +02:00
Amaury Pouly
d527c5595c mkimxboot: always clean up dualboot elf files
Change-Id: I80ed1af784aa80bec9fa0b1e9322f25e69672510
2013-09-26 20:14:09 +02:00
Amaury Pouly
6ac481e8bc Add support for the sony NWZ-E360/E370 to mkimxboot
Change-Id: Ied73591326339d22b4f21d311da9e6b1b9c223ed
2013-09-25 14:31:39 +02:00
Dominik Riebeling
5d9086bcbe Handle ambiguous state in configuration dialog.
If a single player is detected it might still have ambiguous as state due to
the mountpoint not being found. Make sure to display a sensible error message
in that case.

Change-Id: I7d62e739019b26a583fe6aab502d0f870e67587e
2013-09-18 23:37:39 +02:00
Dominik Riebeling
5c31063a3f Add "FAT" as supported filesystem on Windows.
In some cases Windows reports the string "FAT" (without any type number).
Accept that as well.

Change-Id: Ia278ccc574913106cb5ca6751af70125f769c59c
2013-09-18 23:37:39 +02:00
Dominik Riebeling
b943c59f35 Rework autodetection to better handle ambiguous cases.
The old detection code simply assumed only one player to be connected and threw
all information it could find together, causing wrong results in various cases.
Rewrite it to better handle this.

- Don't expect only a single player to be attached. Return a list of players
  found instead. The configuration dialog can then show the user a list to
  select from. This is not implemented yet, the configuration dialog will only
  show the devices found and tell the user to disconnect all but one.

- Handle ambiguous cases better. A player found that is ambiguous is treated as
  such, and if refining the result didn't lead to a single match for each
  possible player a single entry is created that indicates it being ambiguous.

The current code needs a bit of additional cleanup (the result exposes internal
data to the caller it shouldn't) to be done later.

Change-Id: I22dc2f73cdd6a9d90c34f3a0703aa9e0a2d2087a
2013-09-18 23:37:39 +02:00
Dominik Riebeling
fe45f8f090 Show mountpoint on multiple devices found message as well.
Change-Id: I315813646ee3fe3b510510e99e2dbf88c649f4d8
2013-09-18 23:37:39 +02:00
Dominik Riebeling
f3b56eba58 Handle multiple devices with identical USB IDs correctly when listing.
Use insertMulti() instead of insert() when adding found USB devices to the
list. This means the keys of the list will now be ambiguous. This is not a
problem since the value is only used to display the user a nice string.
Previously we'd loose two identical devices attached to the system since the
second one would overwrite the first.

This does not apply for Windows, since Windows will list each function of a
composite device. This results in a device running Rockbox (with HID enabled)
showing up twice, which isn't wanted.

Change-Id: I1306b71122a210c55871ff8e14d2b5a04012cc4e
2013-09-18 23:37:39 +02:00
Dominik Riebeling
935c7fbff7 List detected devices if multiple are found.
In preparation of giving the user a list to choose from add displaying a list
of all devices connected. Since devices might be ambiguous (multiple devices
share the same USB ID but detecting by other means failed) the listed devices
might exceed the number of actually attached ones.

Change-Id: Ice52da15523e5f3493a6fb687392301c4d5b8a36
2013-09-18 23:37:38 +02:00
Dominik Riebeling
3dcf833edd langstat: improve code style a bit.
Change-Id: Ide53de01282fa49640e490a02a6e20abf4d6605a
2013-09-18 23:37:38 +02:00
Amaury Pouly
a2d4a4a560 mkimxboot: fix crash
I was too aggressive when converting reads to standard reads, this
one is memory based and not file based

Change-Id: Ibe7162894cc44cbd79f56cafe7136bda0f76bcdc
2013-08-22 17:49:50 +02:00
Amaury Pouly
05bd3e4cd2 mkimxboot: add entry for ZEN X-Fi3 1.00.25e firmware
Change-Id: I2c6cc4003bcc96662211fa066dd9e6e438b7e258
2013-08-22 00:48:55 +02:00
Amaury Pouly
99f3ca174e sbtools: more code refactoring
Factor all printf method with a unique one defined in misc.h

Change-Id: I58fbf8916b76e873a2e6678506d2c8aece7834ec
2013-08-21 22:20:53 +02:00
Dominik Riebeling
ce714cb023 Note skipped mountpoints to log when populating dropdown list.
Helps in cases the dropdown list doesn't show an expected entry.

Change-Id: I7236c6dd8504dc3a6889443efd7de7bcda90b8a3
2013-08-18 18:59:06 +02:00
Dominik Riebeling
ee55acdc93 Fix typo in source string.
Change-Id: Iaa3f3c34b6f6931a6620dfbe3d24cf6a57b96e77
2013-08-18 18:49:08 +02:00
Michael Sevakis
a56f1ca1ed Cleanup MV/MD macros a little.
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal
with function parameters. IF_MD/IF_MV are enough.

Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0
if not.

Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
2013-08-17 12:18:22 -04:00
Amaury Pouly
cb8274373b sbtools: more printf fixing
Change-Id: Id617297c196b381fd1c381da3eff4345e3157529
2013-08-10 21:37:27 +02:00
Amaury Pouly
21672ba31c mkimxboot: fix red
Change-Id: Id5d27fc00969b6999df665e7182b7ff27bccfacd
2013-08-06 21:24:39 +02:00
Amaury Pouly
da8ebcec2f mkimxboot: code simplification
Change-Id: Ic16334c262ee5bce3575c306440f7e1de2b247f9
2013-08-06 21:24:38 +02:00
Bertrik Sikken
93de093690 mkamsboot: add support for clip zip original firmware 01.01.21 (tested by me)
Change-Id: Ief8a8e6dfe87a17285dd5259fd3c4cebfc962643
2013-07-12 22:23:36 +02:00
Amaury Pouly
03a4ba5481 mkimxboot: rewrite dualboot
Rewrite dualboot in C code instead of assembly. Also properly
handle subtarget and simply Makefile. This should make the
dualboot stub more readable and easier to extend. The new code
also gracefully handles power up from RTC alarm on imx233.

Change-Id: I7c225254b1463a97e76b6cb4de476aa2d2c9d2f9
2013-07-07 17:36:21 +02:00
Amaury Pouly
55babd5895 mkimxboot: add zen style 100/300 firmware to the list
The tool cannot produce any firmware yet but it can extract the
OF from the installer.

Change-Id: I98684b2bf43310443d93b482aa853464f6f87fa8
2013-06-18 15:02:01 +02:00
Amaury Pouly
d561017f35 mkimxboot: factor code, add support for ELF files
Refactor code.
This tool can now either load a scrambled rockbox
firmware (in which case the model is check against the
firmware), or any ELF file. This is useful for example
for hwstub which produces a ELF file and still needs
to be loaded by producing a SB file.

Change-Id: I7aa381b3f6587788d1950793e89ce5608c53cccc
2013-06-16 02:14:52 +02:00
Amaury Pouly
7c7fa36918 sbtools,mkximboot: fix whitespace
Change-Id: I8d8adb783707172d1aaef302366c240310350ed8
2013-06-15 22:27:34 +02:00
Amaury Pouly
58e27b9fa1 mkimxboot: refactor code, no functional change
The mkimxboot was becoming messy with juge functions and
redundant code. Factor reading/writing/loading code into smaller
functions. Introduce the concept of rockbox firmware to simplify
support of other formats than scramble.

Change-Id: I3a61295ca5abca1a0eee8c9e8709c6b8dfa256a6
2013-06-15 22:27:34 +02:00
Amaury Pouly
6483e23f07 mkximxboot: fix usage() formatting
Change-Id: I2f708e2830168f481018b8d8ce98134e40b4e8f8
2013-06-15 22:27:34 +02:00
Dominik Riebeling
67e1de7b43 Only show mountpoints containing a supported filesystem in dropdown.
Change configuration to use filtered mountpoints list. Add HFS+ to the list of
supported filesystems -- while Rockbox doesn't run on HFS+ MacPods will use
that format, and not having them in the list will then make OS X users wonder
why their Ipod isn't showing up. This might need to get revised later.

Change-Id: I5eeeb05be6780cb3952a0081df0ce782eca01589
2013-06-09 19:51:08 +02:00
Dominik Riebeling
a2c3e3fd0d Add note to AMS bootloader installation about OF file.
Some devices contain a bin file in the root folder of the player. This caused
confusion a couple of times, since the installer asks for a bin file. Add a
note that the required file is not present on the player and will get removed
automatically.

Change-Id: I6cd5c25b319770555c3939377a3ed86ed3181dad
2013-06-09 19:51:08 +02:00
Dominik Riebeling
11280e20cc Don't pass -Wno-unused-local-typedefs on OS X.
OS X' gcc 4.0 (still used to be able building fat binaries) doesn't ignore that
option and instead errors out.

Change-Id: Id5927ff04dc606480af9add554eeaa75c169510f
2013-06-09 19:45:16 +02:00
Dominik Riebeling
33bda05469 Treat arch flags separately when building libraries.
On OS X we're passing -arch twice which dependency generation doesn't like.
Since we don't have dependencies that differ between architectures simply don't
add them during dependency generation.

Change-Id: Ie3d58bf9af31edcacb88345c7debf39eb798e302
2013-06-09 19:43:37 +02:00
Dominik Riebeling
280a0eb27e Fix temporary files stored in current folder on first start.
If Rockbox Utility has no configuration file on the machine updateSettings()
will overwrite the global cache folder settings with an empty string before the
value is set properly by the user confirming the configuration dialog.  QDir()
getting an empty string will result in the current working directory getting
used, and thus the temporary files ending up there.

On Windows most users are unlikely to have noticed this since running the
executable from within the distribution zip file will make Windows execute it
in the systems temporary path.

Change-Id: I7724a82af403955786798c7380198086837e128f
2013-06-09 16:55:15 +02:00
Dominik Riebeling
9edc63b0d4 Suppress unused-local-typedefs warning with Qt4.
gcc 4.8 introduces this new warning which some Qt4 headers triggers. Since we
don't want to change Qt simply disable it. The warning doesn't show up when
compiling with Qt5, so only disable it for Qt4.

Change-Id: Ia8fcf0859e0a370def36bc9b43ed4d096a80db28
2013-06-09 16:54:59 +02:00
Dominik Riebeling
6b3c4beba4 Rework langstat.
- Generally improve code and make it compliant to PEP8.
- Make it work with Python3 as well.

Change-Id: I9e99999c59dc501664c36dd38fcb85fb60d6d9e6
2013-06-09 16:54:59 +02:00
Dominik Riebeling
071ccc78a9 Update mkrk27boot Makefile for libtools.make changes.
Change-Id: Iebcb3be6024c2fa6ec94a38b8bb1cb0c7274eb85
2013-05-11 20:34:12 +02:00
Dominik Riebeling
e073bc9484 Implement dependency generation in libtools.make.
Automatically generate dependency files for all sources so changes in headers
are picked up automatically. Use one dependency file for each source file,
since that allows to create them without using external tools (except the
compiler of course).

Change-Id: I246c1ceb525692547af22a2e32c4bab0c11507e1
2013-05-11 20:34:12 +02:00
Dominik Riebeling
4f3fa9accb Change mkdir -p to work on Windows.
Windows mkdir doesn't know about the -p option and requires paths to use \ as
path separator. Try to detect when building on Windows and use the Windows
internal function instead of relying on a compatible mkdir in the path.

Change-Id: I47d47d45edeb38c672321f77d6e91268bf744dba
2013-05-11 20:34:12 +02:00
Dominik Riebeling
8a4075d454 Make libtools compile rule more generic.
Create the object - source dependency internally and use a more generic rule
for compiling. Removes the need for explicit rules for source files located in
a different folder.

This adds the limitation for SOURCES and LIBSOURCES to only hold C files.

Change-Id: I56f6a4b1e7df36347cd2f54051e072251f456092
2013-05-11 20:34:11 +02:00
Dominik Riebeling
8568a8de13 Set APPVERSION globally for extralibs Makefile.
Make sure its value quotes are properly escaped. Otherwise make on Windows
causes problems. Also, expand CPPDEFINES only once.

Change-Id: I52e91f17626b2596f389811b22abc12d94f721d1
2013-05-10 17:48:01 +02:00
Dominik Riebeling
7ab7f865dc Restructure options passed to libs Makefile.
Setup AR before checking for ccache to avoid adding ccache to ar. Setup CC and
CFLAGS in the beginning as well. Quote ar and system speex options to fix
building with ccache enabled.

Change-Id: I21714f0849e990abeac72dcda52c81474e090934
2013-05-10 12:02:18 +02:00
Dominik Riebeling
f7d8b2db93 Only pass AR to extralibs Makefile if the compiler is gcc.
We need this only for cross compiling. Trying to figure the compiler prefix
fails if the compiler isn't gcc (i.e. clang), and we only support gcc when
cross compiling.

Change-Id: I822e1b47ec7e9d7e9fdeae8ccf3b8d417a472ef9
2013-05-09 17:23:42 +02:00
Dominik Riebeling
9e9f692678 Fix Rockbox Utility building on OS X.
Fix a typo that broke building. Also extend the extralibs Makefile to allow
calling it directly.

Change-Id: I2d4dd1689a8654a6b092dfcc58d2753423831816
2013-05-09 16:11:00 +02:00
Dominik Riebeling
8a1cd81b3a Move building libraries to separate Makefile.
Previously several additional rules were added by qmake to build the required
libraries. This has a couple of problems on Windows, requiring the use of a
msys shell.

Additional variables are passed as environment variables. Windows doesn't
understand this. Passing the variables via make command line argument works but
make won't be able to change those variables anymore, breaking things. Use
intermediate variables passed via make command line that are then exported by
the called Makefile. This doesn't work in the generated Makefile since the
export lines must not be part of a rule.

Also cleans up the project file a bit.

Change-Id: Iaffb059ce8bafe17a35bd1e0a74ae7acd966c138
2013-05-04 21:41:50 +02:00
Dominik Riebeling
460e959aa9 Allow overriding make variables via environment variables.
Fixes cross compiling for Rockbox Utility.

Change-Id: I3419cb4c89836ec3bee10072495042b3732fd66b
2013-05-04 21:41:49 +02:00
Dominik Riebeling
9a19a22d85 Add missing USB IDs.
The new autodetection will always use USB IDs to identify players (among other
means). Add missing IDs for players the current implementation relies on other
means for detection only.

Change-Id: I037c23705518210b6ed93b4d13ccb96d933aa198
2013-04-09 22:55:55 +02:00
Dominik Riebeling
e30b3d84e8 Change autodetection result to a list.
Both autodetection functionality and the configuration dialog assumed detection
to only return one found device. This isn't necessarily true, especially since
some players can be detected but detecting their mountpoint might be ambiguous
(only if no previous Rockbox installation is present).

Instead of returning individual results (found "ok" player, found "error"
player etc.) return a list containing an entry for each player. Current
autodetection code will never return more than one entry since it doesn't
handle multiple devices yet, and the configuration dialog will show an error if
multiple devices are found. Thus there is no user visible change yet. Both
autodetection and configuration dialog can now get extended to handle multiple
devices.

Change-Id: I79b763dbd6e7111783194bcc22ab7cc06a4061c1
2013-04-09 22:39:13 +02:00
Dominik Riebeling
703bc407b4 Fix ipodpatcher on OS X.
Fix a typo and update CC handling for OS X.

Change-Id: Icde3cb5956ffe45ee1d610ff34957ed7b17f3f02
2013-04-05 20:03:45 +02:00
Dominik Riebeling
ea0bfe7520 Replace the use of uname to get the build output.
Using uname has a couple of problems, especially when cross compiling. Instead
check the defines set by the preprocessor to figure the type of binaries it
produces. This improves support for cross compiling as it allows to (1) select
the correct default target and (2) makes it possible to use separate build
folders for different targets.

Change-Id: I69a32904dab97755034f2f0d63f8402309d479d2
2013-04-05 19:49:04 +02:00
Dominik Riebeling
891351db60 Fix Qt5 / MinGW problems.
Add missing multimedia module and update some includes.

Change-Id: I98c65c4f2e21e6a63d552669468b1da313520499
2013-04-04 22:42:22 +02:00
Dominik Riebeling
801f3bbec4 Rename "interface" parameter.
Current MinGW #defines interface, causing the preprocessor messing up the
function parameter. Rename it to avoid this.

Change-Id: Id49edbfc056a42456d88c9e260e54844e8b1ca07
2013-04-04 22:42:22 +02:00