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

#126 2008-04-16 00:24:14

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

HaydnH wrote:

Hi Bzhou,

I was just working on something that requires ffmpeg but I erased my custom compiled version a while ago so thought I'd use the optware version - however, one of the libraries required by it wasn't compiled with -fPIC so it won't work... oh well think I still have my log of the compilation somewhere...

Hi Haydn,

http://trac.nslu2-linux.org/optware/changeset/8201 should force -fPIC into CFLAGS on dns-323 now. Please test ffmpeg_0.svn20080409-2_arm.ipk when it gets in the feed.

Please edit http://www.nslu2-linux.org/wiki/Optware/Dns323 if -fPIC problem is resolved.

Last edited by bzhou (2008-04-16 00:25:11)

Offline

 

#127 2008-04-16 02:58:20

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

The mysql problem isn't (just?) because of -O3 optimization, it still raises SIGILL when built with -O2. I'll look again later.

Offline

 

#128 2008-04-16 10:23:05

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

The DNS323 with the two most recent firmwares provides a kernel numbered 2.6.12.6-arm1

Code:

/ # uname -a
Linux nas1 2.6.12.6-arm1 #29 Thu Dec 27 09:59:48 CST 2007 armv5tejl unknown

The readme for the DLink tool chain states

Code:

vi kernel-headers.mk
        change ==> LINUX_SOURCE:=kernel-headers-2.4.21.tar.bz2 --> LINUX_SOURCE:=kernel-headers-2.6.9.1.tar.bz2

It looks like that's what I have set up in my optware setup (I'm sure I've seen "kernel-headers 2.6.9" scroll past at some point, but I can't remember where!)

Should we "fix" this to match the actual kernel version, or is the minor version irrelevant?

To try this, I assume I need to change sources/toolchain-dns323/kernel-headers.mk.patch:

Code:

--- make/kernel-headers.mk.orig    2006-05-17 02:10:48.000000000 +0000
+++ make/kernel-headers.mk    2007-01-10 20:21:09.000000000 +0000
@@ -43,8 +43,8 @@
         (cd $(LINUX_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \
     fi
     touch $(LINUX_DIR)/include/linux/autoconf.h;
-    echo "#define UTS_RELEASE \"2.4.21\"" > $(LINUX_DIR)/include/linux/version.h;
-    echo "#define LINUX_VERSION_CODE 132117" >> $(LINUX_DIR)/include/linux/version.h;
+    echo "#define UTS_RELEASE \"2.6.6\"" > $(LINUX_DIR)/include/linux/version.h;
+    echo "#define LINUX_VERSION_CODE 132617" >> $(LINUX_DIR)/include/linux/version.h;
     echo "#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))" >> \
         $(LINUX_DIR)/include/linux/version.h;
     touch $(LINUX_DIR)/.configured

Something that I've noticed about that patch is that the new UTS_RELEASE does not match the KERNEL_VERSION
(in the above case 2^16 * 2 + 2^8 * 4 + 2^0 * 21 =  132117, but  2^16 * 2 + 2^8 * 6 + 2^0 * 6 = 132614, not 132617 as coded).

I think I should have  UTS_RELEASE 2.6.12 and LINUX_VERSION_CODE 132620. Do I need to make those changes anywhere else?

Or a waste of time?

Edit:  KERNEL_VERSION => LINUX_VERSION_CODE

Last edited by sjmac (2008-04-16 13:07:35)

Offline

 

#129 2008-04-16 23:23:13

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

OK, answering some of my own questions:

the toolchain gets built using linux-libc-headers-2.9.6.1 which is bunled in the uclibc tarball available from the DLink FTP site at ftp://ftp.dlink.com/GPL/DNS-323/

linux-libc-headers was a short lived but useful project to just distribute the public parts of the linux kernel headers for userspace libraries to link against, and the project died in 2006:
http://lists.pld-linux.org/mailman/pipe … hread.html

There should be 2.9.12 headers to match the DNS323 kernel available, but the main distribution website is gone now:
http://ep09.pld-linux.org/~mmazur/linux-libc-headers/

I can't find a current repository, so it's probably best to stick with the 2.9.6.1 versions distributed by DLink.

There should not be any problem linking against headers from an older kernel (eg 2.9.6.1) and then running the binary against a newer kernel (eg 2.6.12.6) as back compatibility is expected, and it is even expected that people will do the opposite sometimes.
http://linuxfromscratch.org/pipermail/f … 00159.html

I'm still not sure about the patch listed above though; surely UTS_RELEASE (what is that?) should match the LINUX_VERSION_CODE? I think now that it's probably  best for them to match the available headers , so 2.6.9 and 132617 ... maybe the 2.6.6 in the patch above is just a typo?

Last edited by sjmac (2008-04-16 23:31:45)

Offline

 

#130 2008-04-16 23:58:20

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac, you can also take a look at http://trac.nslu2-linux.org/optware/bro … yno-x07.mk
In this case the toolchain was missing kernel header in the first place, and I hacked on a matching one.
But this issue probably is not very urgent in the short term. With older kernel header, there might be some feature missing (things like inotify), but mostly it will be ok.

Offline

 

#131 2008-04-17 00:21:11

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

OK Thanks - but do you think there's a typo in that patch?

echo "#define UTS_RELEASE \"2.6.6\"" > $(LINUX_DIR)/include/linux/version.h;
should be
echo "#define UTS_RELEASE \"2.6.9\"" > $(LINUX_DIR)/include/linux/version.h;
?

I'm just making debug  builds of mysql and dependancies. Might get some extra sleep tonight instead of testing it though ... Zz.

Offline

 

#132 2008-04-17 00:34:46

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac, I got that patch from http://dns323.kood.org/howto:crosscompile build_dns323.tgz patches/kernel-headers.mk.
Could it be that at one time kernel version of older firmware was 2.6.6 or 2.6.9?
But I agree, if the UTS_RELEASE and LINUX_VERSION_CODE is inconsistent, that's certainly a bug.

Offline

 

#133 2008-04-17 02:15:18

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac wrote:

The mysql problem isn't (just?) because of -O3 optimization, it still raises SIGILL when built with -O2. I'll look again later.

Can you try configure ... --disable-assembler ?

Offline

 

#134 2008-04-17 11:23:26

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

No difference (I don't think disable-assembler is an option, but I changed the enable-assembler to disable-assembler, which will work as we expect I think)

Actually, looking at the build output from the svn build it looks like the build process spots that assembly isn't an option  anyway ...

Code:

...
nm: init-posix.o: no symbols
nm: lseek64.o: no symbols
nm: oldgetrlimit64.o: no symbols
nm: getutmpx.o: no symbols
checking if we should use assembler functions... no
checking if we should use RAID... no
checking If we should should enable LOAD DATA LOCAL by default... no
checking for arm-linux-getconf... no
checking for getconf... getconf
...

I also used -O0 -g, but forgot to turn off stripping. I'll try again this evening.

Edit/notes:
I'll take a look at the options used in this script too ...

http://216.239.59.104/search?q=cache:S8 … =firefox-a

linked from
http://dns323.kood.org/forum/t1737-MySQL-DNS-323.html (mysql builds and runs for fonz' fun_plug 0.4 and 0.5.)

Last edited by sjmac (2008-04-17 13:22:38)

Offline

 

#135 2008-04-17 17:00:21

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

hmm, STACK_DIRECTION , try sed and change it to 1 in config.h after configure. Currently it's not detected correctly in cross compilation.

Last edited by bzhou (2008-04-17 17:01:01)

Offline

 

#136 2008-04-18 01:46:23

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

STACK_DIRECTION , try sed and change it to 1 in config.h after configure

Not so simple :-(

I'm taking parts of Petter Larsson's build script in to mysql.mk one at a time, but at almost 13 minutes a go to compile mysql it's a bit tedious. I noticed that he used -static, and also seemed to edit configure.h in a place that it doesn't exist in the optware downloaded source.

BTW, I just typed 'make dirclean' instead of 'make mysql-dirclean' by mistake. What's the difference?

Edit: Patches to build this so there is no SIGILL on startup. (Some of the makefile changes will need isolating from the rest of the targets).

I used -Os (optimize for small size and performance) instead of -O2. Seems sensible for DNS323?

Last edited by sjmac (2008-04-18 13:26:52)


Attachments:
Attachment Icon mysql-mk.patch, Size: 1,473 bytes, Downloads: 560

Offline

 

#137 2008-04-18 11:06:35

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

The other file attachement


Attachments:
Attachment Icon configure_dns323_optimization.patch, Size: 828 bytes, Downloads: 513

Offline

 

#138 2008-04-18 18:02:14

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac, glad you got it working!
In the mean time, I've updated mysql.mk to 4.1.22, and mysql5.mk to 5.0.45 (still needs some finishing touch, but basically working).
Can you re-base your patch to these?
We should give you svn write access when rwhitby is back, before that I can commit changes for you.

Offline

 

#139 2008-04-19 00:10:05

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

OK - seems like you had a good tidy up!

Why does it need to build for the host target before it builds for arm? eg if I type
make mysql-ipk

New patch for mysql.mk attached; the configure patch required is unchanged, build is tested working for me.

(An alternative to patching configure would be to pass the CFLAGS and CXXFLAGS to configure).


Attachments:
Attachment Icon mysql-mk.patch.txt, Size: 773 bytes, Downloads: 543

Offline

 

#140 2008-04-19 00:34:46

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

bzhou wrote:

Could it be that at one time kernel version of older firmware was 2.6.6 or 2.6.9?
But I agree, if the UTS_RELEASE and LINUX_VERSION_CODE is inconsistent, that's certainly a bug.

Yes, earlier firmwares used a 2.6.6 kernel according to the front page of the wiki http://dns323.kood.org/

I don't think its making much difference, but I've fixed the UTS_RELEASE to 2.6.9 in my tree, so that it matches the LINUX_VERSION_CODE

132617 decimal is 0x00020609 (hex, for version 2.6.9), which doesn't match 2.6.6.

Offline

 

#141 2008-04-24 01:41:58

aarnet
Member
Registered: 2008-04-22
Posts: 6

Re: [announce] optware/dns323 to build 1000+ ipk's

help me pls (i not a Linux user sad )

in  DNS-323 (1.04) enabling Telnet only

when i try instal ipkg-opt_0.99.163-9_arm.ipk I see:

Code:

# cd /mnt/HD_a2/

# #  mkdir ipkg

# #  cd ipkg

# #  wget http://ipkg.nslu2-linux.org/feeds/optware/dns323/cross/unstable/ipkg-opt_0.99.163-9_arm.ipk

# #  tar -xzf ipkg-opt_0.99.163-9_arm.ipk

tar: Unrecognised file type

Last edited by aarnet (2008-04-24 01:51:23)

Offline

 

#142 2008-04-24 01:52:10

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

See if zcat is compiled in busybox by

Code:

# /bin/busybox --help

If zcat is available in the PATH, try

Code:

# cd /mnt/HD_a2/ipkg/
# zcat ipkg-opt_0.99.163-9.arm.ipk | tar -xf - ./data.tar.gz
# zcat ./data.tar.gz | tar -xf -

instead of the two "tar -xzf" commands.

Last edited by bzhou (2008-04-24 02:02:06)

Offline

 

#143 2008-04-24 03:13:34

aarnet
Member
Registered: 2008-04-22
Posts: 6

Re: [announce] optware/dns323 to build 1000+ ipk's

bzhou wrote:

See if zcat is compiled in busybox by

Code:

# /bin/busybox --help

If zcat is available in the PATH, try

Code:

# cd /mnt/HD_a2/ipkg/
# zcat ipkg-opt_0.99.163-9.arm.ipk | tar -xf - ./data.tar.gz
# zcat ./data.tar.gz | tar -xf -

instead of the two "tar -xzf" commands.

thnx but i did not use this...
when i install fun_plug ( http://dns323.kood.org/howto:ffp ), no problems with tar ( i dont understanding why... )

Offline

 

#144 2008-04-24 03:18:45

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

This is probably because fun_plug has gnu tar, while busybox tar is missing some feature. Once bootstrapped, you can also install optware tar, which is a very recent full version gnu tar.

Offline

 

#145 2008-05-14 00:57:35

mr_dooo
New member
Registered: 2008-03-17
Posts: 1

Re: [announce] optware/dns323 to build 1000+ ipk's

Hello
First I want to thank you guys for taking the time to build and maintain all those packages.
I'm just tryed to get the make package (I would like to compile Unison for the dns-323) but when I launch the command,
it tells me that it can't load library 'libintl.so.3'.I'm a linux beginer so the error could be from me, butif someone can help!
Thanks
Regrards
A.

Offline

 

#146 2008-05-14 02:29:51

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

For the make error, it is missing gettext as a dependent ipk. You can manually install that as a workaround. I will fix this when I have time.

The ocaml package in the feed has the known problem of hardcoding gcc path as the cross compiler. I don't know if it will work by  symlinking a native compiler to the expected place. The pure ocaml code will be compiled fine.

Offline

 

#147 2008-05-17 16:58:52

pulz
New member
Registered: 2008-05-17
Posts: 2

Re: [announce] optware/dns323 to build 1000+ ipk's

Since there´s not a lot of optware users here, i might try asking in this thread, so sorry for beeing offtopic

Anyone that would happend to have old xmlrpc package laying around? xmlrpc-c v1.11.00-2

Offline

 

#148 2008-05-17 18:49:08

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

bzhou wrote:

The ocaml package in the feed has the known problem of hardcoding gcc path as the cross compiler. I don't know if it will work by  symlinking a native compiler to the expected place. The pure ocaml code will be compiled fine.

ocaml 3.10.2-2 should have this problem fixed.

Offline

 

#149 2008-05-17 18:57:05

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

pulz wrote:

Anyone that would happend to have old xmlrpc package laying around? xmlrpc-c v1.11.00-2

I looked at the change between 1.11.00-2 and 1.11.00-3, it adapts the code to the libcurl 7.18.0 -> 7.18.1 change.
So you might want both xmlrpc-c 1.11.00-2 and libcurl 7.18.0. Unless someone saves backup of the feed, this needs subversion r8100 and rebuild.

Offline

 

#150 2008-05-17 21:35:31

pulz
New member
Registered: 2008-05-17
Posts: 2

Re: [announce] optware/dns323 to build 1000+ ipk's

bzhou wrote:

pulz wrote:

Anyone that would happend to have old xmlrpc package laying around? xmlrpc-c v1.11.00-2

I looked at the change between 1.11.00-2 and 1.11.00-3, it adapts the code to the libcurl 7.18.0 -> 7.18.1 change.
So you might want both xmlrpc-c 1.11.00-2 and libcurl 7.18.0. Unless someone saves backup of the feed, this needs subversion r8100 and rebuild.

Im trying to use it xmlrpc package with rtorrent and it isnt working.
I been reading over at the synologi forums and they say it crashed with the latest build -3 and some smart souls saved the -2 package, but sadly isn´t  working with the dns-323.
To bad, it would have been fun getting this to work.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB