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.

#1 2008-06-13 12:08:04

lt_gustavsen
Member
Registered: 2008-03-04
Posts: 8

Upgrading etch

I have the etch installed and I have also added  http://security.debian.org/ to my apt source.list. Just to be updated on security fixes. So I wonder what package should I definitely not upgrade in the fear of breaking the boot process or other specific dns-313 customization.  My plan was to add those packages to the /etc/apt/preferences file.

I also wonder about the uptime on this device. w now reports 14043 days after a few days up. Have anybody a fix for this?

Thanks

Offline

 

#2 2008-06-13 18:51:53

CharminBaer
Member
From: Leipzig, Germany
Registered: 2008-04-25
Posts: 76

Re: Upgrading etch

Good idea! I tried this, no problems encountered. Thanks for this hint.

"w" on mine reported 14043 after a few minutes, lets google about this bug...


DNS-313 / native running etch4.0r3...
and by now running lenny with all the features and no probs.

Offline

 

#3 2008-06-17 19:13:32

lt_gustavsen
Member
Registered: 2008-03-04
Posts: 8

Re: Upgrading etch

Do you mean I can upgrade the kernel without breaking anything?

About the uptime. I looks like the file /proc/uptime is not to the spec. My current /proc/uptime is
1213718781.85 2064.33
I restarted it an half hour ago.
1213718781.85 = 6-17-2008 16:06:21
$date gives
Tue Jun 17 16:06:19 UTC 2008

So the first entry looks like current date. The second entry is current uptime, about 34 minutes.

Anyway this is not what it looks like on other system. I found this description on the web:
"The first number is the total number of seconds the system has been up. The second number is how much of that time the machine has spent idle, in seconds."
So something strange is going on.

Offline

 

#4 2008-07-19 18:15:49

smudo
Member
From: Budapest/Hungary
Registered: 2008-07-06
Posts: 10

Re: Upgrading etch

lt_gustavsen wrote:

Do you mean I can upgrade the kernel without breaking anything?

About the uptime. I looks like the file /proc/uptime is not to the spec. My current /proc/uptime is
1213718781.85 2064.33
I restarted it an half hour ago.
1213718781.85 = 6-17-2008 16:06:21
$date gives
Tue Jun 17 16:06:19 UTC 2008

So the first entry looks like current date. The second entry is current uptime, about 34 minutes.

Anyway this is not what it looks like on other system. I found this description on the web:
"The first number is the total number of seconds the system has been up. The second number is how much of that time the machine has spent idle, in seconds."
So something strange is going on.

Maybe I found something interesting:

extacted the dlink gpl source and at the end of the dlink/Image/src/linux/arch/arm/kernel/time.c:

void __init time_init(void)
{
#ifdef CONFIG_SL2312_RTC
        xtime.tv_sec  = rtc_get_time_second() ;
#endif
        if (system_timer->offset == NULL)
                system_timer->offset = dummy_gettimeoffset;
        system_timer->init();
}

What is this ifdef is doing here?

the 2.6.16 official kernel doesn't contains such ifdef.

Maybe I'm wrong...

Offline

 

#5 2008-07-20 21:16:09

CharminBaer
Member
From: Leipzig, Germany
Registered: 2008-04-25
Posts: 76

Re: Upgrading etch

Hi, smudo!
Yeah, exactly this was the cause!
I commented out the line with "xtime.tv_sec..." and cat /proc/uptime works right...

The Bear.


DNS-313 / native running etch4.0r3...
and by now running lenny with all the features and no probs.

Offline

 

#6 2008-07-20 21:57:27

CharminBaer
Member
From: Leipzig, Germany
Registered: 2008-04-25
Posts: 76

Re: Upgrading etch

and if there some guys intersted in this kernel I even made, you can downloat it at:

http://www.msbd.de/dns313/kernel_2.6.15_20.07.2008.tgz

(has ext2, ext3, nfs, nfsserver, ntfs, ntfs-write and crypto-support switched on, USB-support switched off...)

Meanwhile I'm running Debian lenny very fine, changed the /etc/apt/sources.lst from "etch" to "lenny" and made "apt-get update" and "apt-get dist-upgrade".


DNS-313 / native running etch4.0r3...
and by now running lenny with all the features and no probs.

Offline

 

#7 2008-07-20 23:36:31

smudo
Member
From: Budapest/Hungary
Registered: 2008-07-06
Posts: 10

Re: Upgrading etch

CharminBaer wrote:

Hi, smudo!
Yeah, exactly this was the cause!
I commented out the line with "xtime.tv_sec..." and cat /proc/uptime works right...

The Bear.

Glad to hear that...
I'll try your kernel as soon as I have time to to play with it.

Last edited by smudo (2008-07-20 23:36:56)

Offline

 

#8 2008-07-20 23:46:20

CharminBaer
Member
From: Leipzig, Germany
Registered: 2008-04-25
Posts: 76

Re: Upgrading etch

Hint: It's very simple to change a kernel under a running system: Put the new zImage into the /.boot -directory and say "reboot"...

And if you need the crypt-support, you should store the both files "crc32c.ko" and "sl2312_ipsec.ko" into /lib/modules and edit the /lib/modules/2.6.15/modules.dep, add the following lines:

Code:

/lib/modules/crc32c.ko:
/lib/modules/sl2312_ipsec.ko:

"modprobe crc32c" and "modprobe sl2312_ipsec" should work.

When you want to automatically load these modules at every boot, should also put the corresponding entries into the /etc/modules.

Last edited by CharminBaer (2008-07-20 23:57:33)


DNS-313 / native running etch4.0r3...
and by now running lenny with all the features and no probs.

Offline

 

#9 2008-07-21 11:26:18

smudo
Member
From: Budapest/Hungary
Registered: 2008-07-06
Posts: 10

Re: Upgrading etch

CharminBaer wrote:

Hint: It's very simple to change a kernel under a running system: Put the new zImage into the /.boot -directory and say "reboot"...

And if you need the crypt-support, you should store the both files "crc32c.ko" and "sl2312_ipsec.ko" into /lib/modules and edit the /lib/modules/2.6.15/modules.dep, add the following lines:

Code:

/lib/modules/crc32c.ko:
/lib/modules/sl2312_ipsec.ko:

"modprobe crc32c" and "modprobe sl2312_ipsec" should work.

When you want to automatically load these modules at every boot, should also put the corresponding entries into the /etc/modules.

One question:
What is the state of power management? It's working?
I cannot spun down my disk....however with the old (2.14 dlink version) the disk (after the timeout) spun down correctly...but with the debian no.

Do you have any idea what should I do?! (the hdparm isn't working)

Offline

 

#10 2008-07-21 12:55:58

pcp
Member
From: Moravistan
Registered: 2008-04-23
Posts: 75

Re: Upgrading etch

smudo wrote:

Do you have any idea what should I do?! (the hdparm isn't working)

Hey guise, what about /dev directory on the Debian install? Is it managed by udev, or are there the same static device nodes as on the 313?

I did some experiments with the hdd spindown (with the original d-link system), and it's really difficult to cut off all the disk access. You need to mount /var on the ramdisk filesystem (it takes about 200kB of RAM). But the /dev is a nut, because files there are accessed frequently, and it causes hdd wakeup.

Offline

 

#11 2008-07-21 18:37:42

smudo
Member
From: Budapest/Hungary
Registered: 2008-07-06
Posts: 10

Re: Upgrading etch

CharminBaer wrote:

Hint: It's very simple to change a kernel under a running system: Put the new zImage into the /.boot -directory and say "reboot"...

And if you need the crypt-support, you should store the both files "crc32c.ko" and "sl2312_ipsec.ko" into /lib/modules and edit the /lib/modules/2.6.15/modules.dep, add the following lines:

Code:

/lib/modules/crc32c.ko:
/lib/modules/sl2312_ipsec.ko:

"modprobe crc32c" and "modprobe sl2312_ipsec" should work.

When you want to automatically load these modules at every boot, should also put the corresponding entries into the /etc/modules.

The kernel works ...however now my date has been resetted, so I had to set it manually.
I think thats behind the kernel "ifdef"...we have to find a correct way to init the timer (both update and system time)
I'll look into the kernel source.

What about the things that pcp mentioned?
var into ramdisk?

Offline

 

#12 2008-07-22 13:45:40

smudo
Member
From: Budapest/Hungary
Registered: 2008-07-06
Posts: 10

Re: Upgrading etch

smudo wrote:

The kernel works ...however now my date has been resetted, so I had to set it manually.
I think thats behind the kernel "ifdef"...we have to find a correct way to init the timer (both update and system time)
I'll look into the kernel source.

I found another ifdef which is related to this problem:
Image\src\linux\kernel\time.c line:91:

#ifdef CONFIG_SL2312_RTC   
    rtc_set_time_second(tv.tv_sec);
#endif   

I'm a bit confused now... in the other time.c the xtime.tv_sec initialized by rtc_get_time_second() (which is a SL2312 chip specific method and returns a seconds from 1970.jan.1 ) a now this method writes back time date???

Offline

 

#13 2008-07-23 00:04:56

radir
Member
Registered: 2008-01-03
Posts: 68

Re: Upgrading etch

CharminBaer wrote:

and if there some guys intersted in this kernel I even made, you can downloat it at:

http://www.msbd.de/dns313/kernel_2.6.15_20.07.2008.tgz

(has ext2, ext3, nfs, nfsserver, ntfs, ntfs-write and crypto-support switched on, USB-support switched off...)

Meanwhile I'm running Debian lenny very fine, changed the /etc/apt/sources.lst from "etch" to "lenny" and made "apt-get update" and "apt-get dist-upgrade".

Hi CharminBaer,

Thanks for this kernel, I think actually there is one problem with it: temperature sensor is not enabled and/or working incorrectly. For me g751temp always shows 0 temp. My box was really hot when I recognized.

Could you please take a look?

By the way why NTFS included? If someone using etch why should use NTFS instead of the better ext2/3? Just curious.
And what would use the crypto modules?

Thanks.

Offline

 

#14 2008-07-23 10:34:14

pcp
Member
From: Moravistan
Registered: 2008-04-23
Posts: 75

Re: Upgrading etch

radir wrote:

Hi CharminBaer,

Thanks for this kernel, I think actually there is one problem with it: temperature sensor is not enabled and/or working incorrectly. For me g751temp always shows 0 temp. My box was really hot when I recognized.

Could you please take a look?
Thanks.

maybe Charmin should check if the following values are enabled in his .config
CONFIG_GEMINI_GPIO=y
CONFIG_G751=y

(they are located in the drivers>char devices section)

If the fan at your box is not running, use Charmin's script to regulate the fan speed, or my fand binary.

Offline

 

#15 2008-07-23 11:43:04

smudo
Member
From: Budapest/Hungary
Registered: 2008-07-06
Posts: 10

Re: Upgrading etch

radir wrote:

And what would use the crypto modules?

I guess partition encrypting. Maybe somebody can write a short howto/wiki about it...  smile

Offline

 

#16 2008-07-23 17:20:21

radir
Member
Registered: 2008-01-03
Posts: 68

Re: Upgrading etch

pcp wrote:

radir wrote:

Hi CharminBaer,

Thanks for this kernel, I think actually there is one problem with it: temperature sensor is not enabled and/or working incorrectly. For me g751temp always shows 0 temp. My box was really hot when I recognized.

Could you please take a look?
Thanks.

maybe Charmin should check if the following values are enabled in his .config
CONFIG_GEMINI_GPIO=y
CONFIG_G751=y

(they are located in the drivers>char devices section)

If the fan at your box is not running, use Charmin's script to regulate the fan speed, or my fand binary.

Pcp,

Your daemon is cool (haha) but the problem is that it is depending on the actual temperature to switch on/off fan. But if temp's always 0 then fan will not switch on :-). I use your g751ctl app to set fan speed low. That's works perfectly.

Smudo,
I guess the crypto modules used for IPSec but maybe you are rigth it can be used partition encrypting. The question is how?

Thanks.

Offline

 

#17 2008-07-23 20:05:28

radir
Member
Registered: 2008-01-03
Posts: 68

Re: Upgrading etch

And one more thing: using the new kernel file copy is much slower 2-2,5MB/s comparing to the original version ~4MB/s over the same net same samba link. And the whole system feels less responsive.

Thanks.

Offline

 

#18 2008-07-23 22:22:58

CharminBaer
Member
From: Leipzig, Germany
Registered: 2008-04-25
Posts: 76

Re: Upgrading etch

O.K., many questions...

1. The last kernel really had a bug, g751ctl didn t work. A new kernel wit nearly the same features you can find here:
http://www.msbd.de/dns313/zImage
but crypt-support not as module but built-in. so we don't need the modules crc32c.ko and sl2312_ipsec.ko further more.
2. Yes, the crypt-support was planned for partition encryption, especially made for one guy, who want to realize this project. But seems, he is in vacation, isn't he? ;o)
3. Yes, pcp's daemon is cool like mine, but when g751ctl isn't working, both are useless...
4. Yes, yes, yes, we still worried about the hdd spindown isn't working, but the day has only 48 hrs....
5. The last kernel was slower? Let's test this new and, plz. report me your cognitions. 

The Bear.


DNS-313 / native running etch4.0r3...
and by now running lenny with all the features and no probs.

Offline

 

#19 2008-07-24 22:15:29

pcp
Member
From: Moravistan
Registered: 2008-04-23
Posts: 75

Re: Upgrading etch

@charminbaer

where did you get the sources from you've built the kernel? I can compare the appropriate source files to point-out that temperature bug...
I am still using kernel built from d-link's sources, and it works for me.

Offline

 

#20 2008-07-24 23:00:30

CharminBaer
Member
From: Leipzig, Germany
Registered: 2008-04-25
Posts: 76

Re: Upgrading etch

Hi, pcp,
meanwhile I had found the bug in g751ctl.c line 106 and 163:

Code:

original from Storlink/DLink was: (produced 2 Warnings)
value = readl(addr) & ~SMBMASK|SMBCLK ; //SMBCLK:output,SMBDATA:input

Tried to minize the warnings and wrote: (was false, this was the bug)
value = readl(addr) & ~(SMBMASK|SMBCLK) ; //SMBCLK:output,SMBDATA:input

And now it's right so:
value = readl(addr) & (~SMBMASK|SMBCLK) ; //SMBCLK:output,SMBDATA:input

Thanks,   CharminBear


DNS-313 / native running etch4.0r3...
and by now running lenny with all the features and no probs.

Offline

 

#21 2008-07-25 21:11:00

radir
Member
Registered: 2008-01-03
Posts: 68

Re: Upgrading etch

CharminBaer wrote:

O.K., many questions...

1. The last kernel really had a bug, g751ctl didn t work. A new kernel wit nearly the same features you can find here:
http://www.msbd.de/dns313/zImage
but crypt-support not as module but built-in. so we don't need the modules crc32c.ko and sl2312_ipsec.ko further more.
2. Yes, the crypt-support was planned for partition encryption, especially made for one guy, who want to realize this project. But seems, he is in vacation, isn't he? ;o)
3. Yes, pcp's daemon is cool like mine, but when g751ctl isn't working, both are useless...
4. Yes, yes, yes, we still worried about the hdd spindown isn't working, but the day has only 48 hrs....
5. The last kernel was slower? Let's test this new and, plz. report me your cognitions. 

The Bear.

Hi,

If you don't mind could you please enable CONFIG_IKCONFIG_PROC?

Thanks.

Offline

 

#22 2009-01-08 22:18:53

mikasa
Member
Registered: 2008-10-02
Posts: 12

Re: Upgrading etch

extacted the dlink gpl source and at the end of the dlink/Image/src/linux/arch/arm/kernel/time.c:

Where to find that folder?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB