NEW: Firmware Modification Kit (beta testing)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4 ... 12, 13, 14  Next
Author Message




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 0:31    Post subject: Firmware Modification Kit v0.20 beta Reply with quote
Release v0.20 beta:


  • scripts: added check for Linux and OS X and appropriate compatibility messages
  • extfirmware: added GNU license header
  • extfirmware: removed some unnecessary header includes
  • extfirmware: switched to u_int32_t for wider compatibility
  • extfirmware: other minor improvements
  • trx: increased maximum firmware size to 0x5A0000 (OpenWrt) from 0x3A0000 (DD-WRT).
  • trx: switched to u_int32_t for wider compatibility
  • makefile: uses gcc instead of cc now
  • docs: several updates
Sponsor




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 0:33    Post subject: Reply with quote
BrainSlayer wrote:
no it will be useable. take a look on it (when its done, i'm still working in background)


Oh, ok, I misunderstood. I like it still being functional Wink. I'll check out the test image in a minute..
solarflare
DD-WRT Novice


Joined: 26 Jun 2006
Posts: 14
Location: Helsinki, Finland

PostPosted: Thu Aug 10, 2006 1:54    Post subject: Looks promising Reply with quote
db90h wrote:
If you can give me a shell on a MAC OS X box, I'm happy to with with it. On MAC OS X, uname==Darwin then ? So this is a reliable way to detect if the platform is MAC OS X?

Yes, it is. Though, with Darwin you have nowadays both big endian (old powerpc) and little endian (intel dual core) machines, which might be a further problem.

powerbook% uname -a
Darwin powerbook 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc

The big endian systems have the powerpc keywork on the uname string.

Code:
make[1]: Nothing to be done for `all'.
g++ -O3 unsquashfs.o -L./lzma/C/7zip/Compress/LZMA_Lib -llzma -o unsquashfs-lzma
gcc unsquashfs.o -lz -o unsquashfs
gcc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2   -c -o extfirmware.o extfirmware.c
extfirmware.c:34:3: warning: #warning "u_int32_t may be undefined. please define as 32-bit type."
gcc extfirmware.o -lz -o extfirmware
gcc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2   -c -o trx.o trx.c
trx.c:51:20: error: endian.h: No such file or directory
trx.c:52:22: error: byteswap.h: No such file or directory
make: *** [trx.o] Error 1

The latest source halts in a different file, so this really looks promising.

I'll PM/email you a Mac OS X shell account user identification credentials in a minute. All my machines are the big endian variant though, but they do have the developer tools (read: gcc et al) installed.




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 1:59    Post subject: Re: Looks promising Reply with quote
solarflare wrote:

I'll PM/email you a Mac OS X shell account user identification credentials in a minute. All my machines are the big endian variant though, but they do have the developer tools (read: gcc et al) installed.


Yes, I'll have to make some more code endian neutral to support big-endian operation. Ironically, the endian neutrality of trx is what is hanging the build up ;p. Thanks for the shell account. I'll work on it when I can.




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 2:16    Post subject: cygwin Reply with quote
I just checked out cygwin (very polished stuff, btw). The Firmware Mod Kit builds ok under it as long as you've install the GNU C, GNU C++, and GNU Make packages. The scripts need some modifications so they invoke the .exe versions of the tools, but I'll add cygwin compatibility soon if there's a demand for it. Of course, cygwin is less and less useful with virtualization that works so well anymore, but cygwin sure does run fast Wink.
ronnieo
DD-WRT Novice


Joined: 25 Jul 2006
Posts: 6
Location: GZ,PRC

PostPosted: Thu Aug 10, 2006 3:04    Post subject: Re: cygwin Reply with quote
db90h wrote:
I just checked out cygwin (very polished stuff, btw). The Firmware Mod Kit builds ok under it as long as you've install the GNU C, GNU C++, and GNU Make packages. The scripts need some modifications so they invoke the .exe versions of the tools, but I'll add cygwin compatibility soon if there's a demand for it. Of course, cygwin is less and less useful with virtualization that works so well anymore, but cygwin sure does run fast Wink.


Its good to hear that Twisted Evil

Thanks for your hard work Embarassed

_________________
WRT54G v2.2 / DD-WRT v23 SP1 Final

Ronnie Rocks!




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 3:49    Post subject: OS X and CYGWIN status Reply with quote
Compatibility updates as of unreleased v0.22 beta:

OS X:
+ Builds ok.
+ Runtime testing I'll do shortly.

cygwin:
+ Builds ok.
+ Seems to run ok. More testing remains.

I'm going to do a rare thing and chill out for a minute or two and then do final testing under all 3 platforms (linux, OS X, and cygwin), then release v0.22 as soon as I am sure its ready.
josh22_22
DD-WRT Novice


Joined: 15 Jul 2006
Posts: 24

PostPosted: Thu Aug 10, 2006 4:24    Post subject: Reply with quote
db90h wrote:

.....As far as executing PL files, you need to install minIPerl (or whatever) if it's not already installed...


Do you think there is engough room to install miniPerl or a program like it on the router?




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 4:51    Post subject: OS X and CYGWIN ports Reply with quote
Ok, bad news. As I went to these CYGWIN I discovered that firmwares built under it don't work once flashed (the actual extraction/build process works great). Upon closer examination it seems the CYGWIN file system is case insensitive ;(. I checked with OS X and it is also case insensitive.

This is particularly troubling since I just spent over 2 hours getting support for both perfected.

I don't know that there is any easy way to work around this. I must have a case sensitive file system to extract the firmware's filesystem to. If anyone has any ideas, please let me know.

UPDATE: The only thing I can think of is forcing extraction to a network share that does have a case sensitive file system... or maybe there are alternate file systems for these that are case sensitive.

UPDATE 3: It's also possible it's some issue with DD-WRT and maybe most of the time a case insensitive file system is ok to extract to, or maybe the troubles I saw were related to something else entirely (but its filesystem related). Still, the cse insensitivity will always be an issue. I'll look into it more.

The Linux build is still working just fine, and I guess I'll release a new build of it shortly with what would have been OS X and CYGWIN support (I'll have to disble both now..).

UPDATE 2: I went ahead and release v0.22, with the disabled CYGWIN and OS X support. If anybody wants to experiment with them, just disable the 'exit' lines in the platform identification part of the script, and make sure you extract to a case sensitive file system.




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 5:38    Post subject: Reply with quote
josh22_22 wrote:
db90h wrote:

.....As far as executing PL files, you need to install minIPerl (or whatever) if it's not already installed...


Do you think there is engough room to install miniPerl or a program like it on the router?


I don't know.. depends on how much extra space you have I guess and how big miniperl is.
Eko
DD-WRT Developer/Maintainer


Joined: 07 Jun 2006
Posts: 5771

PostPosted: Thu Aug 10, 2006 6:12    Post subject: Reply with quote
As for "case sensitive" file system AND Windows: make one partition or put old HD to your PC, install "Ext2 Installable File System For Windows": http://www.fs-driver.org/ and voila....




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 6:37    Post subject: Reply with quote
Eko wrote:
As for "case sensitive" file system AND Windows: make one partition or put old HD to your PC, install "Ext2 Installable File System For Windows": http://www.fs-driver.org/ and voila....


Cool, thanks for the tip! That should do it for CYGWIN.

What I'll do is add a function that tests the filesystem to make sure it's compatible and then allow proper operation under CYGWIN and OS X if so. Let's hope there are no other issues to contend with. I could have had a Ubuntu virtual machine to redistribute ready to rock-n-roll and been done long ago ;p.

Then, onward to adding IPKG install support to the kit...
solarflare
DD-WRT Novice


Joined: 26 Jun 2006
Posts: 14
Location: Helsinki, Finland

PostPosted: Thu Aug 10, 2006 7:16    Post subject: Mac OS X uname strings Reply with quote
Just checked it. The Intel version of Mac OS X reports:

$ uname -p
i386

where the PowerPC version responds:

# uname -p
powerpc

While they both report the system name as:

$ uname
Darwin

As of Mac OS X 10.3 there has been a version from the HFS Plus filesystem around called the HFSX, which fully supports the case sensitivity. Turning the HFSX on isn't that easy though. The default HFS+ is a case-preserving filesystem after all, so it would be great if it became evident that the mere feature was sufficient by itself.

If it wasn't, there are always other solutions. One could easily create a mountable case sensitive filesystem image, but that wouldn't be too elegant unless it was hidden inside a real application and a proper GUI. Wink




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 8:13    Post subject: v0.23 beta released Reply with quote
Recent revision history:

0.23 beta

package: removed linux executables, download now half size. Surely everyone can install basic build tools..
scripts: added working directory file system test for case insensitivity and write access
scripts: added option to continue on after warning when OS X or CYGWIN present
scripts: removed pre-fixed script name, much cleaner looking output now
scripts: added variable to choose whether or not to abort if file system found incompatible
scripts: added cleanup.sh script to clean tools and logs.
untrx: renamed extfirmware to untrx, much more intuitive name

0.22 beta

scripts: added support for OS X
scripts: added support for CYGWIN
scripts: minor cosmetic work
extfirmware: added endian neutrality
trx: fixed OS X support
asustrx: fixed OS X support

Product page: http://www.bitsum.com/firmware_mod_kit.htm




Joined: 01 Jan 1970
Posts:

PostPosted: Thu Aug 10, 2006 8:19    Post subject: Re: Mac OS X uname strings Reply with quote
solarflare wrote:

As of Mac OS X 10.3 there has been a version from the HFS Plus filesystem around called the HFSX, which fully supports the case sensitivity. Turning the HFSX on isn't that easy though. The default HFS+ is a case-preserving filesystem after all, so it would be great if it became evident that the mere feature was sufficient by itself.

If it wasn't, there are always other solutions. One could easily create a mountable case sensitive filesystem image, but that wouldn't be too elegant unless it was hidden inside a real application and a proper GUI. Wink


Thanks for this info, it's appreciated. For those who want to play around, I just posted v0.23 beta (see previous post). To continue on despite any file system test fails, change this in both the extract and build script:

EXIT_ON_FS_PROBLEM="1"
to
EXIT_ON_FS_PROBLEM="0"

Feel free to experiment. I didn't run this one through as many tests on cygwin and os x, so hopefully everything is still kosher as far as extracting and building the firmware. If anyone creates a firmware under these platforms that boots successfully, please let me know. These 'messed up' firmwares should never totally brick your router as they won't over-write the CFE or anything, allowing you to TFTP a new firmware during boot_wait. However, I do not guarantee this.. crazy things do sometimes happen, so be careful and don't even try unless you are brave or have JTAG.

Oh, and I still haven't actually tested firmware creation under os x, so for all I know it works ok ;p. I kinda assumed it didn't when I came across the case problem.


Last edited by on Thu Aug 10, 2006 8:20; edited 1 time in total
Goto page Previous  1, 2, 3, 4 ... 12, 13, 14  Next Display posts from previous:    Page 3 of 14
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum