« on: February 13, 2011, 03:59:00 pm »
Here's a copy of the ReadMe
, which will explain all:deupk v0.02
Tool for extracting the contents of Neuros OSD update (UPK) files.
deupk [-i] [-v] <upk file>
-i Info only - just report on the UPK, don't extract anything.
-v Verbose output.
There are four possible behaviours:
Extract files, saying only what has been extracted, in the form:
deupk -i <upkfile>
List the contents of the file, in the form:
[etc] But be aware that larger installs may require cramfs to be
split in two, so if you machine-parse, you will need to cope with
deupk -v <upkfile>
Extract files with a lengthy running commentary.
deupk -i -v <upkfile>
Give the lengthy running commentary, but don't extract anything.
While the files tested seem to match the input, WinZip reports there
is garbage at the end of the tar.gz files in the OSDng distribution
(I have not tested Arizona, same?). Is this a factor of the way the
files were written, or a fault in deupk? I won't know without having
some originals to test.
There is no CRC checking of the file integrity. It's complicated.
(refer to source comments for more info)
I would like to be kind to Neuros, as their little OSD is a lovely
bit of kit, and as for domestic video equipment, they seem to pretty
much stand alone in making all of the stuff required to build the
firmware available. My older PVR (based around the same chipset) had
so many bugs it wasn't funny, plus a Chinese manufacturer who exercised
more effort in giving me the brush-off than in fixing up their code.
However... the UPK file format... is... and here I have a number of
words in my head, none of them polite. ;-)
deupk.c Source code, generic C
deupk.exe Executable for Windows (XP or later, not 95/98/ME)
deupk.ico Icon file for Windows build
deupk.rc Resource description for Windows build
deupk.wpj OpenWatcom project file
eupl_v1-1_en.pdf The licence
readme.txt This file :-)
linux_i386/deupk Executable for 32 bit x86 versions of Ubuntu
neuros_osd/deupk Executable that runs directly on the OSD
riscos/deupk.abs Executable for RISC OS (26/32 bit neutral)
Just extract deupk.exe and use from the command line.
Just extract linux_i386/deupk, chmod it to be executable, and
run it with the "./" prefix.
...under other Unixes:
If it can run a shared-library ELF, it might work. Otherwise,
chuck the file at gcc and it'll build an executable for you.
...on the OSD:
Yeah, you can poke UPK files directly on the OSD! Just extract
the neuros_osd/deupk executable, chmod it, and then run it as
./deupk [options] <file>
...under RISC OS:
Put riscos.deupk/abs somewhere. If you see the "/abs" suffix
(i.e. your software didn't map it to a filetype), remove it
and SetType the file to Absolute (&FF8). Then run it from the
command line as previously described.
This program is 26/32 neutral, so will work on older 26 bit
(PC+PSR) RISC OS (3.7, 4.../RiscPC) as well as newer 32 bit
(PC, sep. PSR) versions (5,ROOpen/RiscPC,Iyonix,Beagleboard).
Support for ancient versions (RISC OS 3.1x on ARM2/ARM3 CPUs)
depends upon SharedCLib support. But then you have the source
to roll your own should this be necessary for older setups.
Please refer to the EUPL document supplied with the source bundle
(the PDF). Or to http://ec.europa.eu/idabc/en/document/7774.html
Copyright (c) 2011 Rick Murray.
Released under the EUPL v1.1 (only).
Please note that in the case of GPLisation of your modifications to
this code, you *MUST* specify GPL v2 *ONLY* (not the usual
boilerplate of "...and later versions"), because GPL v3 is NOT a
compatible licence and, indeed, part of the reason for the EUPL is
to make a licence that was properly "free" and not tied up in all of
the GPL it-isn't-as-free-as-people-think-it-is restrictions.
You will note in the code that in some cases I have gone to lengths
to avoid using anything GPL. Because then my project would need to
follow in the GPL spirit. If you think that is bad form, then please
take a moment to consider if YOU merge GPL code into this project,
it will require either a licence nightmare, or the GPLisation of
your version of this project [not EVERY version]. Well, provided
that you avoid GPL v3, the EUPL actually permits this.
[so, who's the free licence now, huh?]
Original version. Slow.
Reworkings to the output, cosmetic mostly.
Chunk copier. Does it in 64K chunks. And it flies compared
Tweaks to the file size (refer to source for details). Now
should save the expected file exactly as written with no
junk bytes at the end.
Revisions to the file write system so it can cope with
files (root.cramfs, mostly) written in two parts.
Email : heyrick1973 -at- yahoo -dot- co -dot- uk
« Reply #1 on: February 13, 2011, 04:18:35 pm »
This transcript speaks for itself neuros login: root
BusyBox v1.6.1 (2009-05-21 23:20:05 PDT) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ $ cd /boot/external
/boot/external $ ./deupk -v r3.upk
deupk 0.02 (2010/02/13).
Please note: CRC verification and TORFU UPKs are not supported, yet.
UPK package header:
package header size = 404
flashrom flags = 6 : requires 16MiB Flash for Arizona firmware
package header crc = A1C1F394
upk data size = 6,403,328
upk data crc = 6BE333F7
upk filename = r3.upk
dependency: u-boot = 2.09-00.871
dependency: kernel = 2.09-00.871
dependency: rootfs = 2.06-14.85l
contents count = 4
package description = Neuros Official UPK on 110213
device id = neuros-osd
Package category = this is an unofficial/developer release
MSP430 uC revision = not specified in development builds
Main boare revision = not specified in development builds
Operating system ver= 2.09-00.871
OSD firmware version= 2.06-14.85l
entry type = U-Boot script
entry size = 3,764
offset (in file) = 556
flash start address = &00000000
flash end address = &00000000
name = env.img
entry type = U-Boot boot loader
entry size = 232,708
offset (in file) = 4321
flash start address = &00100000
flash end address = &0013FFFF
name = u-boot.bin
version = 2.09-00.871
entry type = kernel image
entry size = 1,268,036
offset (in file) = 237030
flash start address = &00160000
flash end address = &002DFFFF
name = uImage
version = 2.09-00.871
entry type = cramfs image file
entry size = 4,898,816
offset (in file) = 1505067
flash start address = &002E0000
flash end address = &009DFFFF
name = root.cramfs
version = 2.06-14.85l
/boot/external $ exit
Connection to host lost.
BTW, two things to add. Firstly, I used /boot/external as dump space as there wasn't enough free space in the home directory to mess around with the large UPK files. And secondly, I built this UPK with ./build_helper upk
- I hope you caught that the description was "Neuros Official UPK on 110213
" in a UPK flagged as a developer one. Mmmm...