Sony SNC-M1, round three
[Last time|http://www.artificis.hu/node/156], I stopped at examining the firmware image. A lot happened since that:
- better description of the firmware image
- some imagination
- and sources
-break->
!Firmware
The more or less correct organization of the firmware image looks like this:
;0×0000000:rrload (bootloader by Cadenux, [manual|http://www.cadenux.com/bsp/rrload.html])
;0×0010000:rrload parameters
;0×002d000:uncompressed kernel
;0×00f0000:cromfs root
;0×03fffb0:header (80 bytes long)
Next step for me was looking into the cromfs image. Extracted it with “dd if=SNC-M_v109-CE.bin of=cromfs.img bs=512 skip=1920”. If I would be using [x86|http://en.wikipedia.org/wiki/X86], the job would have already been done. Sadly (no, I am not sad, but happy with my [PowerPC|http://en.wikipedia.org/wiki/PowerPC]) this was not case here:
- cromfs images are only usable on the same [endianess|http://en.wikipedia.org/wiki/Endianess] as they were created on (for speed impact issues)
- the SNC-M1 is using little-endian byteorder
- my PowerPC is big-endian
I had to create a conversion tool (at least I thought it is faster, than hacking the kernel driver, apparently it was taking the same amount of time) for making it usable on my PPC. The tool can be downloaded [here|http://www.artificis.hu/files/other/dumpcramfs.c], licensed under [GPL|http://en.wikipedia.org/wiki/GPL]. Compile it with: gcc -o dumpcramfs dumpcramfs.c. ‘’Note: this is not finished yet, the zlib table is not really converted, thus only the first 512 bytes of every file can be decompressed.’’
!Behind the scenes
I have an image built up, how the device has been created:
- Sony outsourced it
- [Ingenient|http://www.ingenient.com/] got the job
- Ingenient selected the TI stuff, bought the Linux port from Cadenux
- initially [Cadenux|http://www.cadenux.com/] ported Linux to the TI chip
- and Cadenux wrote the XFLAT format (proprietary)
- extra work at Ingenient is the MJPEG streaming
Note: this is only my imagination!
!About XFLAT
[uClinux|http://www.uclinux.org] has introduced a binary executable format called FLAT (the de facto format on Linux is [ELF|http://en.wikipedia.org/wiki/Executable_Linkage_Format]), it aimed to be slick, easy to support, thus suitable for embedded usage. [XFLAT|http://www.cadenux.com/xflat/index.html] is definitely some extension adding support for XIP (eXecution In-Place) – no links this time, as Wikipedia has none!
After some digging and coincidences, I found the site [gpl-devices.org|ftp://gpl-devices.org/] (ftp), especially the [pub/vendors/iRiver/PMP-1xx/|ftp://gpl-devices.org/pub/vendors/iRiver/PMP-1xx/] directory, which holds sources from the Cadenux port to the same TI platform. For some reason, the directory is not available anymore, but it looks like as a general directory reorganization is in progress.
Update: the correct FTP address is: %%%[ftp://ftp.gpl-devices.org/pub/vendors/iRiver/PMP-1xx/|ftp://ftp.gpl-devices.org/pub/vendors/iRiver/PMP-1xx/]
Commenting is closed for this article.