Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
beattie wrote:
Yeah, I sort of agree about getting rid of goahead (webs) I'd probably used the httpd in busybox, but my first priority after getting pivot_root working, is figureing out how to read the switches and blink the lights. I've tried strings on the executables that seem to do that, and looked at the kernel diffs, with no clues, I suppose the next step is to compile strace and see what system calls it's making.
Sounds like you're on the right track. Are you planning on having some sort of repository of changes you make as you progress?
Offline
qn1234 wrote:
Are you planning on having some sort of repository of changes you make as you progress?
I am working on SVN right now, so when we have something (build scripts & patches) to upload then it will be ready
Offline
I have produced a set of patches and makefiles to build a firmware image with two changes:
Enable shell on serial console
Check for override on USB key
Using this can brick your unit, the only way to fix that is with a serial console.
tarfile http://www.beattie-home.net/beattie/DSM … SM-0.1.tgz
check the webpage: http://www.beattie-home.net/beattie/DSM-G600/
Last edited by beattie (2007-01-01 09:58:21)
Offline
Great work
This firmware also enables a shell for telnet/ssh (but not telnet- nor ssh server), so you do not need to change shell parameter for users anymore.
Before you start make sure you have u-boot tools and genext2fs.
Also you are going to run into gdb compiling errors, to get around delete uclibc-toolchain-src-20040609/gcc-3.3.x/make/gdb-uclibc.mk and then run make again.
If you think you need gdb then apply this patch and use gcc-3.4.x for compiling.
diff -urN gdb-6.0/sim/ppc/ppc-instructions gdb-6.0-uclibc/sim/ppc/ppc-instructions --- gdb-6.0/sim/ppc/ppc-instructions 2003-06-22 19:48:12.000000000 +0300 +++ gdb-6.0-uclibc/sim/ppc/ppc-instructions 2006-08-19 16:38:48.000000000 +0300 @@ -1282,7 +1282,7 @@ } /**/ LABEL(Done): - + (void)0; # extract out raw fields of a FP number int::function::sign:unsigned64 FRS
Happy New Year!
Last edited by sala (2007-01-01 16:16:58)
Offline
fixed not making mkimage, http://www.beattie-home.net/beattie/DSM … SM-0.2.tgz
Some makefile clean up and added build of mkimage.
Last edited by beattie (2007-01-02 06:27:08)
Offline
I see you have also built in a telnetd. Here is a patch to enable login for telnetd.
Offline
And here is patch for Busybox 1.00 final
.config part although may need some tweaks.
PS: this patch is not fully tested yet, so do not try this if you do not have serial port installed!!!
PS2: Also with this version of busybox I think it is a good idea to drop tinylogin and start using a login provided by busybox.
Last edited by sala (2007-01-02 12:52:10)
Offline
I'm not sure were I want to go next, I have a JTAG interface that I want to try out so I might play a little with u-boot, but in the firmware front I will probably work on getting pivot_root root to work to hijack the startup.
Then I can see about completely replacing the firmware. I might also look at porting the 2.6 kernel. If anybody has any suggestions I'd be interested in hearing them.
Offline
My image fails to flash, I think ramdisk takes little too much space or something else is messed
Is kind of strange that at the start I have 92 bytes instead of 64.
fwbuild-0.3/fwbuild -k ramdisk-0.1/kernel -r ramdisk-0.1/ramdisk.ext2.gz.uboot fwimage fwbuild-0.3/fwbuild Version 0.3 Section 1 92, 853759 Section 2 853914, 3018011 Section 3 3871952, 0 Magic 0x55 0xaa 0x53 0x61 0x6d 0x62 0x61 0x2d 0x33 0x58 0x55 0xaa Product ID: 0x04, Custom ID: 0x02, Model ID: 0x01
Offline
sala wrote:
My image fails to flash, I think ramdisk takes little too much space or something else is messed
Is kind of strange that at the start I have 92 bytes instead of 64.
I'm trying to rebuild the firmware right now, but I won't be able to test it till tonight. Is this a clean build from my tarfile or have you made some changes? Also which source distribution from D-Link did you use?
I'm doing a complete rebuild so it will take a while, when done I can tell you if that 92 is what I get or not.
Offline
It's all default from Build_DSM-0.2.tgz and dsmg600_B_GPL.tgz.
Offline
I've looked at the build, I get the 92 as well, the ramdisk looks ok, it's real tight, but should fit. I can't test it right now but will test it tonight.
You might try 0.1, I'll build that one now and compare the two.
Offline
Did you strip default settings section? maybe this is cousin problems.
Offline
sala wrote:
Did you strip default settings section? maybe this is cousin problems.
I'm not sure what default settings section you mean.
I'm going to have to look at fwbuild tonight, 92 does not seem right.
Looking at it, I messed up the header definition, in fwbuild-0.3/fw.h
u_int32_t reserved_1[1+8]; /* fill to 64 bytes */
should be
u_char reserved_1[1+8]; /* fill to 64 bytes */
I'll test that tonight
Last edited by beattie (2007-01-03 22:25:02)
Offline
Section 3 3871952, 0
D-Link has there a tar gzip compressed file containing default settings - the ones that get restored if you press reset button.
Offline
I saw no evidendence that any thing was done with that section, so I clear it. Adding that section should be easy, but I'm pretty sure that it is not needed.
If you make the fix I posted above to fwbuld and it still does not work, you can use fwdump to get the defaluts section and add the -e <filename> flag to the fwbuild line in ramdisk-0.1/mkimg (or run the fwbuld command by hand) to add a defaults section to the firmware image.
Last edited by beattie (2007-01-03 22:51:10)
Offline
There is a new tarfile, version 0.3 in the same place as the previous 2. I have done a build from scratch and load and it loads and runs. I am doing one final test, but it's getting late so I'll try the load in the morning, but I believe that this one works.
I have now verified that the file http://www.beattie-home.net/beattie/DSM … SM-0.3.tgz does build and load.
Last edited by beattie (2007-01-04 17:58:33)
Offline
I test it out after work
I noticed lately that ramdisk has some files that we do not really need, for example /web/path/Thumbs.db (56Kb), which is Microsoft's way of caching thumbnail images in folders, and if we replace all web interface .jpg and .gif files with css or just regular html buttons we gain about 200Kb additional free space.
Offline
sala wrote:
I test it out after work
I noticed lately that ramdisk has some files that we do not really need, for example /web/path/Thumbs.db (56Kb), which is Microsoft's way of caching thumbnail images in folders, and if we replace all web interface .jpg and .gif files with css or just regular html buttons we gain about 200Kb additional free space.
Just to be sure, are you saying you have successfully built and loaded the firmware image using Build_DSM-0.3.tgz?
/web/path/Thumbs.db from what you say is a leftover file from windows, since you can't browse it from windows on the DSM, is that the way you see it?
as for replaceing the .jpg and .gif files, if you have a solution for that, send or post a patch and I'll see if I can add it to version 0.4, I still have some makefile clean up (Ramdisk.mk is not quite right).
Offline
I bricked mine. First I tried to flash and it did fail, so I did leave it and I select shut down from web interface. That was it, next time I did get Bad Data CRC error.
I cant recover right now because I do not have a proper serial port installed (I use only hex inverter chip 74HC14N and thats it)
U-Boot 0.2.0 (May 11 2005 - 18:56:16) CPU: MPC8245 V1.2 at 170.503 MHz: Board: Sandpoint 8245 DRAM: 32 MB FLASH: FUJI_DL323BE In: serial Out: serial Err: serial Hit any key to stop autoboot: 0 ## Booting image at fff10000 ... Image Name: Linux-2.4.21-pre4 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 853695 Bytes = 833.7 kB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Loading RAMDisk Image at ffc20000 ... Image Name: default Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 3072965 Bytes = 2.9 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... Bad Data CRC *
Offline
sala wrote:
I bricked mine. First I tried to flash and it did fail, so I did leave it and I select shut down from web interface. That was it, next time I did get Bad Data CRC error.
I cant recover right now because I do not have a proper serial port installed (I use only hex inverter chip 74HC14N and thats it)
Big Bummer, do you have a plan to get a real serial port? send me email if you need help. The lack of a built-in failsafe recovery is a major failing of this unit. If I get my JTAG working I might take on u-boot to fix this.
The bad fw image, how did you build it?
Offline
beattie wrote:
sala wrote:
I bricked mine. First I tried to flash and it did fail, so I did leave it and I select shut down from web interface. That was it, next time I did get Bad Data CRC error.
I cant recover right now because I do not have a proper serial port installed (I use only hex inverter chip 74HC14N and thats it)Big Bummer, do you have a plan to get a real serial port? send me email if you need help. The lack of a built-in failsafe recovery is a major failing of this unit. If I get my JTAG working I might take on u-boot to fix this.
The bad fw image, how did you build it?
With Build_DSM-0.3.tgz, all non-modified, this means no default settings section.
Now I guess it is highly recommended that everyone who get failed to flash error in web interface should flash non-modified original D-Link firmware right after getting this error, to avoid bricking your device!
Meanwhile I go shopping and get a serial port working, couple of days and then I should be back in business
Offline
sala wrote:
Meanwhile I go shopping and get a serial port working, couple of days and then I should be back in business
Don't know if it would be worth the effort, but with some resistors and a couple of diodes, you could probably rig the 74c14 as an input.
Offline
beattie wrote:
sala wrote:
Meanwhile I go shopping and get a serial port working, couple of days and then I should be back in business
Don't know if it would be worth the effort, but with some resistors and a couple of diodes, you could probably rig the 74c14 as an input.
I don't know it I am right but 74c14 should also be enough if I use serial to USB converter.
Offline
sala wrote:
beattie wrote:
sala wrote:
Meanwhile I go shopping and get a serial port working, couple of days and then I should be back in business
Don't know if it would be worth the effort, but with some resistors and a couple of diodes, you could probably rig the 74c14 as an input.
I don't know it I am right but 74c14 should also be enough if I use serial to USB converter.
Actually if the USB-Serial device has external RS232 level converters, you can bypass them and drop the 74c14.
RS232 signals are -6V to +6V, most hardware uses a logic level (0V to 3.3V or 5V) to RS232 level (-6V to +6V) converter
an RS232 logical 1 is -6v a logical 0 is +6v, RS232 is very forgiving which is why a 74c14 with a 0-VDD level works. but on input I think you need to constrain the input to 0-VDD which is where the diodes and resistors come in.
If the serial port uses a seperate level converter (such as a MAX232), you could remove that device and connect directly to the the DSM serial port.
Last edited by beattie (2007-01-05 01:35:21)
Offline