Samsung provides many firmware upgrade in the format of a .dat
file, at least for nearly all YP's (checked for Q2, R0, T10, Z5).
This is a simple cyclic xor which a fixed key, a md5 sum and a
header specifying the model/version/region.
Change-Id: Ib0461a74196383189fd2d8162da444a85a229c60
This tool is very preliminary but could be use for whatever
purpose since the format of the rsrc sections is now known.
By the way it appears that this format is the same as the
one use by the stmp36xx for its resources.
Change-Id: Idd7057f5cdce5af9726904169bb100c8bacb0981
While elf simplification is a powerful tool it can be useful to
prevent it from happening for debug purposes. Also add a missing
switch description in usage() and missing static.
Change-Id: I80a1904dc4340c412bd3de1c124a2e38d6ac11a2
This is less useful is most cases because sb2 doesn't have the
size restritions but some elf are produced with one section per
file and still yield dozens or hundreds of sections. And this free
anyway so we can do it.
Change-Id: Ia5ca83a8375063ecc7052d1ea73b2b21c00be730
Load, fill and call/jump instructions are extracted as elf files
like for sb2. Because of the size limitations of the sb1
instructions, the resulting elf files can easily have hundreds of
sections. The (currently) implemented elf simplification method
will hopefully reduce this to a few sections only
Change-Id: I8fd6ed935ac3128f244bbd71c782e2a0a1c6d44a
Implement actual loading of a sb1 file to a structure in full
generality. Also implement dumping for debug purpose
Change-Id: I320035ea628719480a79aaccb05dce9a83256927
The STMP36xx series also uses .sb files but with a different
format. The main differences are the encryption and the lack of
sections, making it basically a list of commands: fill, load,
call, jump, switch mode, set sdram settings. Currently only the
sbtoelf has support for the sb1 and can only dump the list of
commands. Actual support for elf creation will come later.
Change-Id: I1f2e0230c91ac64efd0e8430e0c5212098c599fd
The hwemul tool is a small binary blob running on the device
that can received commands over USB. It is mainly intended to be
loaded using the recory mode and allows to read/write registers,
memory, use the OTP device, ... The tool is split into three
parts: dev/ contains the actual blob (which handles both imx233
and stmp3700), lib/ contains the communication library and can
also use the register description produced by the regtools/
to ease register by name, tools/ contains an interactive tool
to send commands to the device when running the blob.
Change-Id: Ie8cb32e987f825d8ed750d48071e43415b4dacb3
These files were produced by parsing some linux and/or sigmatel
provided headers and later tweaked by hand or by programs.
Each file describes one or more soc. A soc has a list of devices.
Each device can either be unique or have several copies at
different addresses. Each device has a list of registers which
can either be unique or indexed. Each register can further have
a list of fields. Registers with a SCT variant are also handled.
Change-Id: Ib50bb3fda268b6d5713f81bd8961de7978a5815e
These tools allow one to read a register description in a XML
file and to produce something useful out of it. Three example
programs are written:
- tester which simply prints the register tree
- headergen which produces a set of headers with the #define
- hwemulgen which produces something for the hwemul tool (to come)
Change-Id: I52573688b29d5faeaf64ce7c5ffe08ee8db3d33c
There is a vendor specific command to read the NVP of the device,
including the KAS. The trick is that the data is randomly
scrambled using a so-called para_noise array of random values.
There seems to be a problem when retrieving large entries (>1000
bytes typically) which causes sg_pt do behave strangely.
Change-Id: Iefa6140df78ab9c7dcf7ac34cb1170979123ecd7
This tool can send vendor specific scsi commands to sony nwz
players such as getting serial number, model id, device info,
and others. It can potentially be used to get some private keys
stored on the device but probably not the KAS used to encrypt
firmware upgrades images(UPG).
Change-Id: Ia49c1edf8d421b20c4e9afeb1192e00e06eb6047
This tool is specific to the em1/mp200 sony based players. In
deals with raw emmc images (which is possible but hard to get).
This tool is also useful as a documentation of the underlying
emmc format used for a future port.
Change-Id: I66c9b0e47351e5d89f6a404aa62038e00fdc1093
The raw encode mode allows to use the raw encode_page routine on
any file which proved to be useful. The guessed fields of the
headers are based on some rk2918 headers which leaked. They are
mainly informative though (date, version, chip).
Change-Id: I139ea0c40f76b6dde041c448bbf3e7ecf9cab24a
If no output prefix is specified, a default is picked:
- filename with extension replaced by .afi for FWU files
- filename with extension replaced by .fw/ for AFI files
- filename without extension and with / for FW files
Change-Id: I6497b8f4a49f1238e5db738429f687cad3ae8a5a
The update_extract tool works by finding the compressed size and
the compressed data in the updater. This is problematic since
without the uncompressed size, inflate can produce extra bytes
at end. This is not a problem for our tools but the device will
plain reject it if sent by MTP/sendfirm for example.
Workaround this issue by reading and rewriting the archive
after decompression so that only the meaningfull data is written.
Change-Id: I117f434b92a56d93d269af49c3e426cd8cc0c7e4
In the case of encrypted SB files without any key match, it is
still possible to dump the section headers. The force option
allows one to do so. It also allows to dump unencrypted sections
of encrypted files if there are some.
Change-Id: I36280230679ac5903f9c451c68c276f5c6959536
I finally found a sensible format for the executable files.
The tool now can output the loading entry to elf files. Some
disassembly and analysis suggest the phys/virt addresses are
correct. However the entries are somehow linked and it is
still unclear how (are there "calls" to the code ? when ?).
Change-Id: Ied38b5bb297176c5755b5ecb3309f4a259c18cd4
I found out that the file has a number of "entries", in
3 categories. The third category seem to contain bootable files.
In the RKnano firmware file I have, these entries are named
"NandBoot1" and "NandBoot2". They seem to use the same format as
the stage3 of the RKnanoFW format but we do not understand this
format precisely for now anyway.
Change-Id: I72d77e609cdeeb802af793c010d6788bf36cd7e2
To support fm radio a kernel module was written. This module is added to
the patched firmware that loads Rockbox. It's pre-compiled but its source
archive provided.
The kernel module provides raw-access to the built-in si4709 radio chip.
Our existing si 47xx drivers can be re-used this way.
The module itself was written Lorenzo Miori, I only integrated it
into the tree.
Change-Id: I6205d28a505d57791eaeb627e6856b9a1eaeaeaa
When scraping files from the repository allow passing an additional list of
files for which the timestamp of the last change is retrieved. Since this is
slow (the log needs to be traversed, since a blob doesn't know about commits
its referenced by) only specified files get this retrieved.
Change-Id: I61a2ef812ac18ffb5898c01ce070046d4ca00a15
The old script depended on svn. An earlier version of this script has already
been used in the 3.11. branch.
Change-Id: Id03abb8f7bd005ede343243194c4453f0b2e8943
The Rockbox source code uses 7z for its archive for size reasons. Add support
for compressing as 7z (by calling the 7z command line utility) so it can be
used for generating Rockbox source archives.
Change-Id: I26097ff61ff183e5ddc07b2c4473f90dc0700178
Don't rely on the build host having the same bitsize as the created binary.
Fixes building a 32bit binary getting a "64bit" postfix when built on a 64bit
Linux.
Change-Id: I2aa61dee82beddd60ebfc8e227551ea49d769664
It should not exit() anymore on error except on malloc failure.
Resource leaks on errors (especially I/O) are quite likely though.
Change-Id: I6fcf72fb08fc683468b390d0b8745d31ca982b48
On Windows /dev/random does not exist, so trying to open it will fail. Replace
it with rand() which is available on all supported platforms and sufficient.
Fixes mkimxboot not working, as well as Rockbox Utility "crashing" (which is in
fact its error handler calling exit(), thus terminating Rockbox Utility) on
Windows.
Change-Id: Ia164f937f329877e8f80f473f27be8c5df2a0a68
Windows requires files to be explicitly opened as binaries, otherwise it will
perform line ending translations. We really don't want the OS to mess with
that.
Change-Id: Id56de354b7ad0e5b056540755f7108456f3263ed
First and rather rough adjustment for git. There are still a lot of places
referring to svn, and various functionality might be broken which needs fixing
later.
Change-Id: Ia628f06e99f527e01f131ce674746fba77d97d23
With git it's not possible to simply export a set of paths from the server
directly. This module offers a similar functionality, but requires a local
clone of the repository. It calls git directly for maximum portability.
This is a prerequisite to making the deployment script used for Rockbox Utility
work again.
Change-Id: I1aca8ddd40d16b6268c1d6a2fc23ac59e964c3c6
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.
The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).
Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.
This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.
Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.
Flyspray: FS#12348
Author: Lorenzo Miori, myself
Merry christmas to ypr0 owners! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
For the git migration we want a nice clean repository with UNIX line
endings. git does not use svn:eol-style, we just need the file contents to be
sane.
Sorry everybody. I know this messes up blame.
Scumbag *NIX developer says migrating to git will make line ending issues go
away; commits giant change to svn which changes line endings anyway. :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30924 a1c6a512-1295-4272-9138-f99709370657
The current implementation fails silently if Windows Media Player is version
10. Add a check and inform the user if the version installed is too old to work
properly with beastpatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30864 a1c6a512-1295-4272-9138-f99709370657
The _GET_CPU macro will write a terminating zero at cpu[8].
Detected by cppcheck
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30749 a1c6a512-1295-4272-9138-f99709370657
Implement simple which functionality. This has less features than which.py but
is sufficient, and removing an external dependency is always good.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30315 a1c6a512-1295-4272-9138-f99709370657
sbtoelf: remove sb version check and print it in the basic info
Thanks TheLemonMan !
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30106 a1c6a512-1295-4272-9138-f99709370657
Introduce a new folder that will hold the original files for various variants
of the Rockbox logo. The "Rb" variant of the icon (used in the Rockbox Utility
icon on Windows) has been missing from svn.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29960 a1c6a512-1295-4272-9138-f99709370657
Since those are created below the build folder but unknown to qmake the
generated Makefile doesn't remove those. Explicitly add appropriate wildcards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29932 a1c6a512-1295-4272-9138-f99709370657
Add support for passing and injecting a build ID to the souces prior to
compiling. Allows to easily create rebuilds of Rockbox Utility without creating
false positives on update detection.
Fix a typo in version.h. Thanks to sideral for noting.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29825 a1c6a512-1295-4272-9138-f99709370657
This allows to manipulate the elf file more easily with objcopy for example. Executable sections are named .text0, .text1, ..., bss sections are named .bss0, .bss1, ...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29817 a1c6a512-1295-4272-9138-f99709370657
sbtoelf: generate a correct section name for undef and string table sections
elftosb: static'ify functions, add cmd file to sb file conversion
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29738 a1c6a512-1295-4272-9138-f99709370657
After downloading the sources insert the number of the revision checked out
into the code. Results in the Rockbox Utility about dialog showing the actual
revision instead of the one of the last change to version.h. Only applied when
building from trunk for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29684 a1c6a512-1295-4272-9138-f99709370657
When loading a wps in the Theme Editor without having a theme cfg loaded
the base path derived from it would be wrong. Make sure to start from
the wps files folder when deriving it. Still assumes the wps file to be
in the standard layout, i.e. in a folder called wps/.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29545 a1c6a512-1295-4272-9138-f99709370657
Restructure deploy.py by moving the platform decisions out of the calling
scripts. This is necessary when cross compiling since this is only decided in
deploy.py. Add support for passing a cross compiler prefix on the command line
and always build targeting Windows if set.
Correct some whitespace errors and long lines while at it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29531 a1c6a512-1295-4272-9138-f99709370657
The attempt to detect if building a fat library is necessary for libskin_parser
makes cross compiling fail on OS X. Allow overriding the target platform for
libskin_parser to fix that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29515 a1c6a512-1295-4272-9138-f99709370657
Try to detect the number of cores in the system and use that value for make -j.
Gives a noticable speedup depending on the system (OS X doesn't seem to benefit
from it).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28859 a1c6a512-1295-4272-9138-f99709370657
- now have a AES128, SHA1 and CRC implementation
- now crc check the boot section chunks as well as the instruction headers
- now sha1 check the sb header and the whole file
- nearly all fields of the sb format are now documented
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28708 a1c6a512-1295-4272-9138-f99709370657
It can compare more than one result file at a time giving additional speedup colums, is more robust
(RaaA results don't have the "MHz needed for realtime" line which is handled with this one) and
has a mode to output the results in a form readable by spreadsheet software for nice graphs.
Needs Ruby 1.9.x
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28305 a1c6a512-1295-4272-9138-f99709370657
Allow DLL filenames to contain the plus sign. Fixes libstdc++-6.dll not
getting recognized as DLL.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28150 a1c6a512-1295-4272-9138-f99709370657
Remove the plain text license file below the rbutilqt folder and move
the HTML variant to the top-level docs folder. It's all GPL, so there's
no need to duplicate those files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27996 a1c6a512-1295-4272-9138-f99709370657
Resolve the DLLs required by the built executable and try to add the required
DLL files that are not recognized as system libraries to the resulting zip /
NSIS installer. This means that it's now possible to easily build both Theme
Editor and Rockbox Utility as dynamically linked binary without the risk of
missing required DLLs in the package. The major advantage of this is that
it's not necessary anymore to have a statically built Qt installation for
building releases. The drawback is that the created binaries will rely on
additional DLL files, so it's no longer a single-run binary.
Binary release of Rockbox Utility should still be statically build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27945 a1c6a512-1295-4272-9138-f99709370657
This requires a few workarounds since NSIS expects files in the source
folder but the build scripts run out-of-tree. Only added for Theme
Editor for now, since Rockbox Utility doesn't have a NSIS script yet
(and an installer for Rockbox Utility might not be that useful).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27759 a1c6a512-1295-4272-9138-f99709370657
Make copying files to the bundle work when building other applications than
Rockbox Utility by replacing a hardcoded workaround.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27606 a1c6a512-1295-4272-9138-f99709370657
The OS X bundle Info.plist needs to hold the filename of the executable for the
application bundle to work correctly. Update it according to the recent name
change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27605 a1c6a512-1295-4272-9138-f99709370657
Also move scripts to utils folder, in preparation of merging rbutil and
utils folders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27600 a1c6a512-1295-4272-9138-f99709370657
The imported qtfindreplacedialog assumes getting compiled as library.
Including the files directly causes problems on Windows because of its
__declspec() handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27559 a1c6a512-1295-4272-9138-f99709370657
Adjust project file with some quirks to make cross-compiling a Windows
binary for the Theme Editor work. Only tested on Fedora 13, so might not
work on other distributions without further modifications.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27512 a1c6a512-1295-4272-9138-f99709370657