Sign up here and you can log into the forum!

unpack / repack a firmware

Have a question about devices internals, memory layout, reverse engineering, etc---This is the place for anything so technical that it would cause a n00b's head to 'splode

Re: unpack / repack a firmware   

Postby nir1978 » Fri Aug 17, 2012 1:47 am

mad_ady wrote:cramfsck that comes with ubuntu doesn't support 16k blocksizes, so it will segfault (most likely it needs a patch or something - you'd need to file a bug report on leafpad). I haven't tried to run the older version, so there might be dependency issues.

The easiest way to unpack the firmware is to do it on the wdtv, via telnet/ssh - that cramfsck supports 16k blocks.

Or, here is an alternative without cramfsck: http://wiki.wdlxtv.com/Booting_Original_FW



I tried doing it as mentioned in the link. but instead of creating a root.bin I tried to repack the firmware along with mediatomb, ffmpeg, devtools and msdl

after running the mkcramfs i get and error i believe the fw size is more (10MB extra) and fails

using 1.05.04

how can I add the extra aps in that fw
nir1978
n00b
 
Posts: 18
Joined: Tue Aug 03, 2010 9:39 pm

Re: unpack / repack a firmware   

Postby mad_ady » Fri Aug 17, 2012 2:44 am

The 1.05 wdlxtv firmware for plus is already too large to fit on the device, so b-rad added a second file (bi2) which is flashed in a special location on the wdtv. The live version still barely fits the ~90M partition and was not extented to bi2.

You have two ways of making a flashable firmware:
1. Fit the constraints of the original firmware size by removing unneeded things (you might be able to remove some images, some programs, though it is hard to remove things since they are mostly interconnected). See/speak to zimki to see what he removed from his custom build.
2. Start using the bi2 file. If you are using plus, you can probably leave the firmware as it is and add content to bi2 instead (read the init scripts to see how/when it is mounted), and flash with your custom bi2 file. If you are using live, you might need to port some startup scripts from the plus firmware to use the bi2 file.
User avatar
mad_ady
Developer
 
Posts: 4549
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: unpack / repack a firmware   

Postby bail » Mon Feb 10, 2014 8:17 pm

In order to start using the bi2 partition for the live firmware, do I just need to add an entry in the init script, similar to the entry for WDLXTV_PLUS? Would I also want to follow the same file layout as the plus and is there anything else I should be aware of, such as additional scripts? Any additional information or guidance would be greatly appreciated.
bail
n00b
 
Posts: 3
Joined: Fri Feb 07, 2014 10:30 am

Re: unpack / repack a firmware   

Postby mad_ady » Fri Feb 14, 2014 2:51 am

The code documents the changes best. Start reading the init code for 1.05-plus and 1.05 live and see where the differences are.
Start from here:
http://svn.wdlxtv.com/filedetails.php?repname=1.05.04-wdlxtv&path=%2Fplus%2Ftrunk%2Finit
User avatar
mad_ady
Developer
 
Posts: 4549
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Previous

Return to WDTV Live

Who is online

Users browsing this forum: No registered users and 1 guest