DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-10-05 20:26:31

marsupilamies
Member
Registered: 2008-09-15
Posts: 5

using ffp-reloaded doesn't work on my dns-323 rev B1

I've tried to use the ffp-reloaded package to boot on 2.6.25.1 kernel. I've used the wiki but no way.
I've 1.04 firmware (not a hacked one) (I've tried with the 1.05, but same issue).
the 2 drives are in separate mode (no raid)
I can ping the dns-323 but no way to telnet...
Is anyone know how to resolv this ?
thanx

Last edited by marsupilamies (2008-10-05 20:30:51)

Offline

 

#2 2008-10-05 21:16:05

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Afaict, vanilla kernels don't support B1 hardware, yet. So reloaded is DNS-323 rev A1 only, for now.

Offline

 

#3 2008-10-05 21:39:30

marsupilamies
Member
Registered: 2008-09-15
Posts: 5

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Thanks, now I know why it doesn't work...

Offline

 

#4 2008-10-07 08:41:17

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Fonz, can you give a little more detail on why it doesn't work with B1 hardware.
Also, do you expect that we will soon be able to get ffp-reloaded working with B1 hardware?

Thanks

Offline

 

#5 2008-10-07 08:59:14

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Couple of other questions on ffp-reloaded that weren't clear from the wiki:
1. Does it need to be reloaded each time or does it happen automatically after the first boot?
2. Does the native d-link web interface still work? If not, can it be made to work by copying over files from /sys/crfs (and other relevant places)?
3. Is there any danger of "bricking" the dns-323 or requiring a serial interface intervention?
4. Is the full functionality of the 2.6.25 kernel accessible?
5. Will the 2.6.26 kernels work too?

Offline

 

#6 2008-10-07 10:37:20

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

Couple of other questions on ffp-reloaded that weren't clear from the wiki:
1. Does it need to be reloaded each time or does it happen automatically after the first boot?
2. Does the native d-link web interface still work? If not, can it be made to work by copying over files from /sys/crfs (and other relevant places)?
3. Is there any danger of "bricking" the dns-323 or requiring a serial interface intervention?
4. Is the full functionality of the 2.6.25 kernel accessible?
5. Will the 2.6.26 kernels work too?

1. It boots once. When you reboot, you're back to normal.
2. No. No part of the firmware will be loaded or used in any way.
3. I'm not aware of any significant risks, but I also won't promise anything. The disclaimer at http://www.inreto.de/dns323/fun-plug/0.5/ applies as usual.
4. Yes.
5. 2.6.25.1 works best at the moment. There's small problems with 2.6.26.

Offline

 

#7 2008-10-07 10:38:18

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

Fonz, can you give a little more detail on why it doesn't work with B1 hardware.

SATA doesn't work. Because I'm not working on it myself, I have no idea when it will be fixed.

Offline

 

#8 2008-10-07 15:29:24

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

I'm willing to try to help out here to get it to work with rev B1 however I can.
- Can you point me to anybody who is working on it so I can offer assistance?
- If nobody is working on it, are there any pointers and background that you can give me to get me started on trying to figure this out? (or is it too complicated and kernel-hacky)

Offline

 

#9 2008-10-07 15:38:41

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

I'm willing to try to help out here to get it to work with rev B1 however I can.
- Can you point me to anybody who is working on it so I can offer assistance?
- If nobody is working on it, are there any pointers and background that you can give me to get me started on trying to figure this out? (or is it too complicated and kernel-hacky)

It most likely involves kernel hacking. The fix might be trivial, but I don't know. I don't know if anyone is actively working on it. But if someone is, you'll most likely find him here:

http://marc.info/?l=linux-arm-kernel&r=1&w=2
http://git.kernel.org/?p=linux/kernel/g … ;a=summary

Offline

 

#10 2008-10-08 01:58:45

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

I would be happy to start digging.
But I would probably need to know as much as I could about the problem so I could start searching intelligently and asking the right questions.
Other than "SATA doesn't work" can you be a little more specific about what goes wrong in rev B1 vs. what goes right in rev A1?
Also, are you just using a vanilla 2.6.25 kernel compiled for arm cpu's or did you have to make some changes to make it work on rev A1?

I am concerned though that without a serial port, I may not be able to see the boot messages about what is going right & wrong early in the boot. Do you see that as a big problem?

Finally, does the original d-link kernel differ between versions A1 vs B1 or do they use the same kernel? Because that could help narrow down the source of the problem.

Offline

 

#11 2008-10-08 02:42:47

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

I downloaded the source and I found this interesting tidbit in the Readme....
22). Building u-boot-1_1_1 for 5181 chip
                 tar zxvf u-boot-1_1_1.tgz
                 chmod -R a+w u-boot-1_1_1
                 cd u-boot-1_1_1
                 make clean; make

        23). Building u-boot-1_7_3 for 5182 chip
                 tar zxvf u-boot-1_7_3.tgz
                 chmod -R a+w u-boot-1_7_3
                 cd u-boot-1_7_3
                 make mrproper; make rd88f5182_config

Given that I read somewhere that 5181 vs. 5182 is the major difference between versions A1 and B1 could this be the source of the difference?

Offline

 

#12 2008-10-12 02:28:08

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Fonz - any thoughts on whether the above may be the source of the A1 vs. B1 differences?

Offline

 

#13 2008-10-12 02:44:14

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Is there a way to make a version of ffp-reloaded that will work with the "stock" d-link firmware kernel?

That way I could start testing (and learning) from a situation that I know works and then move on from there step-by-step until I figure out how to make the latest kernels work with the B1 rev hardware.

I really want to try to get this to work and I am willing to invest time and energy in figuring it out as long as I can get some help (and hand holding) at the start so I am not flying blind...

Offline

 

#14 2008-10-12 02:46:31

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Also, is it fair to assume that ffp-reloaded could easily be modified to make a USB stick to be root, rather than /mnt/HD_a2?

Offline

 

#15 2008-10-12 12:22:03

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

U-Boot is not involved in ffp-reloaded.

There's a 2.6.12.6 kernel at http://www.inreto.de/dns323/fsck/ . I think someone has already confirmed that the fsck image works fine with the 2.6.12.6 kernel. Since fsck is ffp-reloaded in an initramfs, the kernel should work for 'normal' ffp-reloaded, too.

Offline

 

#16 2008-10-13 06:59:30

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

OK. I tried it but the machine hangs.

nohup.out shows the following:
+ cd /ffp/boot
+ ./reload.sh -I root=/dev/sda2
kernel=/mnt/HD_a2/ffp/boot/zImage-2.6.12.6
initrd=
machtype=1542
cmdline=console=ttyS0,115200 root=/dev/sda2 ip=192.168.1.138::192.168.1.1:255.25
5.255.0:raider:egiga0:none

Booting in 3 seconds. Please Ctrl-C to abort...
+ /ffp/etc/rc stop
Stopping sshd
Stopping telnetd
Stopping unfsd
Stopping rpc.portmap
+ killall5 -15
+ sleep 5
+ killall5 -9
+ sync
+ swapoff -a
+ umount -a -r
umount: can't remount /dev/md0 read-only
umount: can't remount /dev/root read-only
umount: can't remount rootfs read-only
+ sync


I wonder about a couple of things.
1. Given that I am using RAID1, should I have root=/dev/md0 rather than root=/dev/sda2
2. There is no inittrd. Do I need to make one to load some modules needed for RAID or to run something like mdadm -A to start the array (I know that in x386 linux I need to have an mdadm.conf file in my inittrd)
3. The 2.6.12.6 kernel (that I took from fsck) doesn't seem to come with any modules. Is that a problem?

Offline

 

#17 2008-10-13 07:35:50

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

If RAID is the problem, would it be easier to make root be my USB stick on /dev/sdc2
Or would I have similar issues with needing an initrd to load the usb drivers this time?

I don't know much about embedded systems, but I have played around with initrd on linux systems so if you were to give me a basic initrd (assuming that is the problem), I could probably hack around to add in the code to launch the RAID disks.

Offline

 

#18 2008-10-13 10:30:45

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

Or would I have similar issues with needing an initrd to load the usb drivers this time?

Depends on the kernel. The kernels I provide all have usb-storage compiled in. I suggest you try the fsck ramdisks first (boots into initramfs, so raid doesn't matter here). It's true that you need to change the command line for RAID, root=/dev/md0 is not sufficient though. Please have a look at the kernel docs for the details at /usr/src/linux/Documentation/md.txt (or online at http://git.kernel.org/?p=linux/kernel/g … xt;hb=HEAD )

Offline

 

#19 2008-10-13 16:16:48

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Yes. I have tried the fsck ramdisk and it works fine -- which is why I suspect RAID is the issue.

I'm pretty sure I could fix it if I had a sample initrd to play but I have no idea what a base initrd would look like for ffp-reloaded and  I don't know what I would need to include as a base before adding in RAID support.

Offline

 

#20 2008-10-13 16:31:46

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

I'm pretty sure I could fix it if I had a sample initrd to play but I have no idea what a base initrd would look like for ffp-reloaded and  I don't know what I would need to include as a base before adding in RAID support.

Assuming SATA works (you can check this in the fsck ramdisk, just try to mount a disk, or run e2fsck), you (most likely) won't need an extra initrd. People confirmed that booting from the raid works if you pass the correct kernel command line options (using 2.6.25.1, however). If I remember correctly, the command line looks sth like:

Code:

... md=0,/dev/sda2,/dev/sdb2 root=/dev/md0 init=/ffp/sbin/init

Offline

 

#21 2008-10-13 17:49:49

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Well, I can get SATA/raid working in fsck by typing:  mdadm -A /dev/md0 /dev/sda2 /dev/sdb2
and then I can mount /dev/md0

I then modified /ffp/boot/boot.sh to include the modified -I command line that you give above:

#!/bin/sh
set -x
cd /ffp/boot
./reload.sh -I md=0,/dev/sda2,/dev/sdb2 root=/dev/md0 init=/ffp/sbin/init

But it still never comes up after reboot (in the sense that I can't even ping it)
Any ideas on what I can do to fix/debug this? (I don't have a serial connection)

Offline

 

#22 2008-10-13 18:25:43

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

Any ideas on what I can do to fix/debug this? (I don't have a serial connection)

reload.sh should print some more info before booting. Can you post output of that script?

Offline

 

#23 2008-10-13 18:58:55

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

Hmmm... the only output I see (other than notification that ssh is disconnecting) is found in nohup.out:

+ /ffp/etc/rc stop
Stopping sshd
Stopping telnetd
Stopping unfsd
Stopping rpc.portmap
+ killall5 -15
+ sleep 5
+ killall5 -9
+ sync
+ swapoff -a
+ umount -a -r
umount: can't remount /dev/md0 read-only
umount: can't remount /dev/root read-only
umount: can't remount rootfs read-only
+ sync
+ cd /ffp/boot
+ ./reload.sh -I md=0,/dev/sda2,/dev/sdb2 root=/dev/md0 init=/ffp/sbin/init
kernel=/mnt/HD_a2/ffp/boot/zImage-2.6.12.6
initrd=
machtype=1542
cmdline=console=ttyS0,115200 md=0,/dev/sda2,/dev/sdb2 root=/dev/md0 init=/ffp/sbin/init ip=192.168.1.138::192.168.1.1:255.255.255.0:raider:egiga0:none

Booting in 3 seconds. Please Ctrl-C to abort...

Is there another output log file that I should be looking at?

Offline

 

#24 2008-10-13 20:11:24

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

puterboy wrote:

+ ./reload.sh -I md=0,/dev/sda2,/dev/sdb2 root=/dev/md0 init=/ffp/sbin/init
kernel=/mnt/HD_a2/ffp/boot/zImage-2.6.12.6
initrd=
machtype=1542
cmdline=console=ttyS0,115200 md=0,/dev/sda2,/dev/sdb2 root=/dev/md0 init=/ffp/sbin/init ip=192.168.1.138::192.168.1.1:255.255.255.0:raider:egiga0:none

This is the part I'm interested in. The ffp-reloaded reload script was made for recent kernels. Seems I forgot some small, but important detail (that is obviously present in the fsck reload script).

machtype must be 526 for 2.6.12.6 kernels. You can change that in the script or try adding "-m 526" to the reload.sh command line.

Offline

 

#25 2008-10-14 00:20:11

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: using ffp-reloaded doesn't work on my dns-323 rev B1

OK. That helped to the extent that I can now ping the machine (I am assuming it rebooted) but I cannot telnet/sshd in.
Any thoughts?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB