Commit graph

31981 commits

Author SHA1 Message Date
Dominik Riebeling
2b054e6135 Fix cutelogger with MSVC.
We're compiling cutelogger directly, not as DLL. Therefore we must not add
__declspec attributes to the header.

Change-Id: I41b87fd4ba34dfbcd0d37245ff1c1f279139bb33
2013-11-04 23:32:57 +01:00
Dominik Riebeling
4d2ce949b3 Use cutelogger for Rockbox Utility internal trace.
Change tracing from qDebug() to use cutelogger, which is available under the
LGPL2.1. This allows to automatically add filename and line number to the log,
and also provides multiple log levels.

Change-Id: I5dbdaf902ba54ea99f07ae10a07467c52fdac910
2013-11-04 23:32:52 +01:00
Amaury Pouly
335ec75d60 Add support for the ZEN X-Fi3 to rbutil
Change-Id: I086bc2fbdaf29fad3f6f08b198eb13d21e09dd78
Reviewed-on: http://gerrit.rockbox.org/419
Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2013-11-04 23:06:46 +01:00
Amaury Pouly
6375c47f03 Add support for CAB archives to rbutil
Change-Id: Ia8b4953343caf8bc2b3c5a6cfd53c921c6d082b1
Reviewed-on: http://gerrit.rockbox.org/418
Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2013-11-04 23:00:23 +01:00
Amaury Pouly
289acf3333 Fix libmspack to compile with rbutil
The build system used by rbutil is not very robust: all the files
are eventually compiled to the same directory so we cannot have
two files with the same name (system.c would conflicts with
system.cpp) so rename one file to avoid this. Also change all
include directives to local ones because we don't have to expose
the entire mspack source to inclusion.

Change-Id: I3fe0638d69fdc30566eb9425abfe33c807678b28
Reviewed-on: http://gerrit.rockbox.org/417
Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2013-11-04 22:15:00 +01:00
Amaury Pouly
739a7ae0e9 Add libmspack to rbutil
Change-Id: I520c14131ec1e12013f106c13cba00aac058ad83
Reviewed-on: http://gerrit.rockbox.org/391
Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2013-11-04 22:14:17 +01:00
Amaury Pouly
27111d83be hwstub: fix stmp3600
The microseconds register has a different address

Change-Id: I29d2e7feea9eb34b0d539ee217babd092542b612
2013-10-26 17:34:58 +02:00
Amaury Pouly
1085d15a3e hwstub: produce sb1 image too (for STMP3600)
Change-Id: Ib7f38fba1e524ed7438cdc395441d801c5eabcaa
2013-10-26 17:34:35 +02:00
Amaury Pouly
2778e7613a Forgot the config files for ZEN, ZEN Mozaic and ZEN X-Fi
Change-Id: Id95d0078d7f4862e596d47ef1bdbfe75942c50fa
2013-10-26 13:23:27 +02:00
Amaury Pouly
78c060b09c imx233: rework vdd5v shared irq handling
The previous code disabled the irq when there were fired. This seems
unreliable for some mysterious reason. Instead simply disable them
before enabling the irq.

Change-Id: I7ee1aa25dbc41c7dd53aa7c7744aa5e4d70ff2d8
Reviewed-on: http://gerrit.rockbox.org/640
Reviewed-by: benjamin brown <foolshperson@gmail.com>
Tested-by: benjamin brown <foolshperson@gmail.com>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-10-23 13:33:02 +02:00
Amaury Pouly
4aa32fb8f4 imx233: fix partition window computation
The code was broken in two ways:
- it called storage_read_sectors with a wrong drive number
- calling storage_read_sectors too early at boot time will fail because
  we are in the init function, so the drive is not yet registered.
To fix this, use a user provided read callback instead of storage read
functions.

Change-Id: I5ab79d48391fae619d5f8ae09c3d499fc43854c8
2013-10-22 15:55:28 +02:00
Amaury Pouly
51ed6da0b1 zenxfi2: fix red by adding partition style
Change-Id: Id5b8907b68d1913f8f36d7494d7e78b63562187c
2013-10-22 00:56:47 +02:00
Amaury Pouly
eefab13469 utils/regtools: add a bunch of regdumps for various sources
Change-Id: I67bbd2d1b02ca4541f70d2e9c8c0e6000300dcac
2013-10-22 00:52:43 +02:00
Amaury Pouly
2e0c558064 Introduce rbutil/mkzenboot, a replacement for tools/mkzenboot
The old tools/mkzenboot has a number of problems: very hard to maintain,
poor integration with rbutil. Restart from scratch by recycling all the
crypto and descrambling code, rewrite the actual firmware modification part
to handle all scenarios in a much clearer way. The code is ready to be
integrated into Rockbox Utility, by using the very similar interface to
mkimxboot.
I copied all the keys from the old mkzenboot, so it can potentially support
the older Creative ports, but since this is untested, I prefer not do so
at the moment. However, I did add a "mixed" boot option to support the
dualboot style used in the older ports.

Change-Id: I80cfc48fa78187baa1b1692e8a30ec7137cea37b
2013-10-22 00:48:33 +02:00
Amaury Pouly
5cfb148ae2 tools/configure: add the Creative targets to selector
Change-Id: I74c7c3cfea95350b88155c2d6d1111c84172b39d
2013-10-22 00:42:36 +02:00
Amaury Pouly
cec5ac7bf7 utils/hwstub: fix zen target id
Change-Id: I9199f573a050223a811a8e82e403f113fb876cca
2013-10-22 00:35:32 +02:00
Amaury Pouly
3d3f419b1a tools/scramble: document zen/xzfi/zmoz targets
Change-Id: I9b48d22968b7632ef88d9dd598ff65fd448c3dcc
2013-10-22 00:34:45 +02:00
Amaury Pouly
7a65710836 tea5760uk: use correct i2c address on the Creative
Actually 0x20 is the right address, the 0x22 applies to the meizu which
probably use a Chinese clone with a non-spec compliant address.

Change-Id: I65b9ab6477c07a2293226536db3e696d34d3bc2c
2013-10-22 00:34:45 +02:00
Amaury Pouly
a0728672bf Initial commit for the Creative ZEN and ZEN X-Fi
Change-Id: Ibd7b1b0b957ef11c200cb63eff7da53f11774748
2013-10-22 00:34:45 +02:00
Amaury Pouly
d3bc64833c Initial commit for the Creative ZEN Mozaic
Change-Id: Ib65aad9f5de37e514047955cad7ca40dc0af4f74
2013-10-22 00:34:44 +02:00
Amaury Pouly
9ed9807854 hwstub: rework i2c completely
Change-Id: I1e5f87f15f0ca9586d8185316ffcaeef6d9d4d38
2013-10-22 00:34:44 +02:00
Amaury Pouly
bfb67f41a9 hwstub: don't touch mmu registers on non-STMP targets, they might not exist
Change-Id: Ib18475fd90e0d29ab6d7214116f7a0041584d621
2013-10-22 00:34:44 +02:00
Amaury Pouly
4da8a441d1 tools/scramble: add support for a couple more Creative devices
This is mostly for consistency, this tool will be unused by the newer targets.
Also update the usage() display to mention -no-ciff

Change-Id: I4500f5fdce771ad3c53701a0bbaace916e88759d
2013-10-22 00:34:35 +02:00
Amaury Pouly
0ff8ce764e tools/mkzenboot: compile in C99 mode
Change-Id: I580ffb3af71846213c0ffc18ead4e51a72ba1475
2013-10-22 00:17:06 +02:00
Amaury Pouly
3d1666042e imx233/system: don't do frequency management on < stmp3780, it's not working
Change-Id: Ie9ff5122f1cb4fe3809bb4c6b88ef0cfc353e0e1
2013-10-22 00:16:22 +02:00
Amaury Pouly
151fa30257 imx233/sdmmc: add write protect pin config
The setting is currently unused but it provides some documentation and basic
support for a more comprehensive implementation of read-only support.

Change-Id: I353c33ef765ef6e6c09d59e943da6654a311ad84
2013-10-22 00:14:24 +02:00
Amaury Pouly
17851f742e imx233/audio: workaround unused variable
The exact combination on which recording is needed is too complicated, so
just always cancel the unused warning, the compiler will optimise it away.

Change-Id: I0946586e4b01769c98babc4616f893c38f44c05f
2013-10-22 00:07:50 +02:00
Amaury Pouly
7d62a78af4 imx233: extend partition window support to be more generic
The new code can select among several types of window (user, system, ...).
Furthermore, the type of partitions to use is selectable in config file.
Currently, two types are support: Freescale style MBR and Creative MBLK

Change-Id: I969d60a3d08f2c9448fb4b9c440051b7801b94cd
2013-10-22 00:07:07 +02:00
Amaury Pouly
5c7167c79c imx233/i2c: relax timeout
Change-Id: Ie9cf8c8bb0a89d9cbcc795e04559864b9fbaf639
2013-10-22 00:02:05 +02:00
Amaury Pouly
a31c50ff46 Remove useless braces
Change-Id: I88cce98cd8cc04f0245fba8ef30434167df483fc
2013-10-21 23:58:32 +02:00
Amaury Pouly
15dc944694 imx233: add package defines
Currently we only support the BGA169 but if by chance Rockbox was to run on
a lqfp package for example, some pins may becomes unavailable or different.

Change-Id: I5c0d8d57ae31604572af37e0c2edd0bd7bda73a3
2013-10-21 23:56:24 +02:00
Amaury Pouly
0463bf4cb2 tea5760uk: properly power up the tuner during detect
The old was doing register read/writes without calling tuner_power(), this
is broken for target with real tuner power management.

Change-Id: I5e60234697a8b91de6189daf6a10e871d5119b65
2013-10-21 23:54:04 +02:00
Amaury Pouly
9bdf24a4fe tea5760uk: add support for TEA5761UK
They share most of registers (except test and some extra bits), since our
driver is very basic, it is safe to relax the manufacurer & chip id check.

Change-Id: If54e8b9e0d852cd9128d5e28ff59bd2c7a55d98d
2013-10-21 23:52:40 +02:00
Amaury Pouly
b1a6a24ed7 debug_menu: add tea5760uk tuner debug info
Change-Id: I18ee5374a312335498777713c20f5de9014dacf3
2013-10-21 23:50:55 +02:00
Amaury Pouly
71c5a52add imx233: fix power irq storm
When bootloader is too intelligent, like on Creative devices, it might leave
some unexpected IRQs sources on, this is problematic when those sources share
the same IRQ line.

Change-Id: Ie9333918eb1048b1f2de4ea738cddf556aa75ee2
2013-10-21 01:23:14 +02:00
Amaury Pouly
898b760e59 imx233: fix audioout on stmp3700
Strangely enough, only stmp3780 and stmp3600 have speaker control

Change-Id: Icec1ed4b7e80e8b3787a3d08b32695551b58aeb9
2013-10-21 01:23:14 +02:00
Amaury Pouly
28669ca0fd fuze+: fix typo
Change-Id: I0b86d5cadeb5b792dbdd71ea1e25230a6643afdf
2013-10-21 01:23:14 +02:00
Amaury Pouly
46416c619d imx233: fix usb_detect() to be consistent with vbus detection
The STMP3700 has unreliable vbusvalid irq so we need to use
vdd5gtvddio. Therefore, using the vbusvalid bit produces
inconsistent results between events and detect. Fix that
by making power handle all the usb detect stuff.

Change-Id: Ic521b2f6677602e184fe46352c5359f4b4ba8d56
2013-10-21 01:23:14 +02:00
Amaury Pouly
187017bad1 imx233: simplify sd/mmc code
Change-Id: I7e36b4c1c91540a2ae383109e440818bc610dde6
2013-10-21 01:23:13 +02:00
Amaury Pouly
5b3eaf6f5b imx233/i2c: use 1sec timeout by default instead of blocking
These functions are mostly used by the radio drivers and any blocking
call could potentially block the entire UI, which is pretty bad.
Since any request is expected to finish within a few us, having a 10ms
timeout doesn't seem unreasonable.

Change-Id: I03b19729511547e5bbdeb3476d020e5d87d0d7e1
2013-10-21 01:23:13 +02:00
Amaury Pouly
6006eb59b1 imx233/i2c: always reset the i2c block on timeout
On targets like stmp3700, resetting the dma channel on "soft" timeout
drives the whole block crazy unless it goes through complete reset.

Change-Id: I830b252279989bf9f9cd9c138240a6ea9b003527
2013-10-21 01:23:13 +02:00
Amaury Pouly
efc591e42d imx233/bootloader: fix comment about disk init
Change-Id: I44a676237564490771a1ed2c81e9434fc6c6f74d
2013-10-21 01:23:13 +02:00
Amaury Pouly
e21d8f59da imx233: fix bootloader
The bootloader must call disk_init_subsystem() because it is multithread
(because of USB), otherwise strange things might happen. Calling disk_init()
is unnecessary since it is call when mounting partitions.

Change-Id: If7aff3dea0b96144e2a9b0f6179a9a0a632b93ed
2013-10-21 01:23:13 +02:00
Frank Gevaerts
110e094db5 Switch back to kernel.org.
kernel.org is back, and nic.funet.fi is being difficult, so it's time
to switch back.

Change-Id: If981dedd0cb7bb64de7563de6657f63ebb931a6f
2013-10-20 21:14:57 +02:00
Kevin Zheng
4626b1770b Add missing #include statements.
Although Linux accepts several implicit definitions of SEEK_END found in
stdio.h, the compiler on FreeBSD won't. Rockbox compilation will fail
without stdio.h included.

There is a precedent for including this header, see
lib/rbcodec/codecs/libtremor/ivorbisfile.h.

Change-Id: I58510101b59a354cd6601cb3f323f385a824d2e8
Reviewed-on: http://gerrit.rockbox.org/639
Tested-by: Kevin Zheng <kevinz5000@gmail.com>
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2013-10-20 16:52:46 +02:00
Michael Rodger
6845f6c396 Include 60s timeout for wget commands in rockboxdev.sh
Added a 60s timeout to the script to avoid having to wait for ages when a download stalls.

Change-Id: I97f0aafe4eac0fb3cfc83805c99d19f1ef02b9f9
Reviewed-on: http://gerrit.rockbox.org/636
Reviewed-by: Kevin Zheng <kevinz5000@gmail.com>
Tested-by: Michael Rodger <rockbox@atinyhedgehog.za.net>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-10-19 13:06:04 +02:00
Frank Gevaerts
4ead0344c6 Disable LCD_FLIP and MORSE_INPUT on recorder to make it build.
Disabling these two settings makes the image small enough to build again.
This build has been broken for long enough without any better solution
actually being worked on, so I think this is much better than nothing.

Change-Id: I77c34c1e714fb6e132ed0ce39f0917779efe1125
2013-10-18 22:56:49 +02:00
Kevin Zheng
513914c347 Do not compile with "-ldl" on FreeBSD.
The dynmaic library support provided in dlfcn.h does not require
additional linker flags on FreeBSD. It is provided with the standard C
library and will fail to link if "-ldl" is specified.

Change-Id: I9f21d8369d45a9be94129a1b37b4607adf673c57
Reviewed-on: http://gerrit.rockbox.org/637
Tested-by: Kevin Zheng <kevinz5000@gmail.com>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2013-10-18 03:40:01 +02:00
Amaury Pouly
f5807141b6 imxtools/scsitools: document some of the SCSI vendor commands
Change-Id: I534fc467aad960c61b54d202096823d5c2c9a5e9
2013-10-10 00:11:47 +02:00
Amaury Pouly
468aa959c7 imxtools/sbloader: rewrite hid code
Rewrite code with proper documentation: it uses a UMS like CBW/CSW to wrap
commands and status.

Change-Id: I10476c87aaea96d4b9e54f8c1c266835c8e89721
2013-10-09 13:06:41 +02:00