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-02-25 13:44:48

petter
Member
Registered: 2008-02-11
Posts: 9

MySQL on DNS-323

Hi,

I have been in need of an MySQL on my DNS-323 and have now been able to cross-compile this for the box.

I have used the GPL tool-chain and is tested on fun-plug/0.4-test/

1. Download the toolchain (there is info on the Wiki)
2. Compile the uclibc by running ./build_uclibc
3. Download http://www.lysator.liu.se/~petterl/dns323/build_ncurses
4. Run build_ncurses to have the ncurses library built
5. Download http://www.lysator.liu.se/~petterl/dns323/build_mysql
6. Run build_mysql this creates an tar.gz file in the mysql-dir
7. Copy the mysql*tar.gz to the DNS-323 and unpack it in fun_plug.d

Create good fun_plug.d/etc/mysqld.conf and start scripts and well us about them in the forum smile

Hope someone has any help from this.

The build_mysql scripts does several things serveral times, this si becouse we need some settings in files that gets overwritten by the bad make process of mysql. So I set them again and run it again smile

Offline

 

#2 2008-02-26 09:32:09

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

Hi,

Thanks for this !

Have you got any issues with performance ? or is it working well ?

Offline

 

#3 2008-02-26 09:42:15

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

I havent noticed any problems with performace, but then I havent really stress-tested it.

Offline

 

#4 2008-02-26 10:14:20

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

And what if disks have spinned down ?

Offline

 

#5 2008-02-26 10:30:44

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

I don't have that problem smile

But then I guess that you will have to wait for discs to spin upp or store the database on USB.
Not much to do about that.

Offline

 

#6 2008-02-26 10:38:52

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

Hummm ! Yesss ! I didn't even think about this !!
Great idea ! (shame on me !)

I'll put an USB flash drive, an that will be far enough for the MySQL DB !
Thanks a lot you solved 2 of my problems in one day !

Offline

 

#7 2008-02-26 11:14:27

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

Please report back how it went, and any updated on the walk-though or scripts.

Offline

 

#8 2008-02-26 11:20:49

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

I will need a few days to put this all up ...

Offline

 

#9 2008-02-27 22:35:39

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: MySQL on DNS-323

All,

I would like to have Mysql as well on my dns, however, I don't even know what compiling is let alone how to execute it. Is there a simple cut and past method I can execute in order to have mysql working on my dns?

thanks for your help

Patrick

Offline

 

#10 2008-02-28 14:01:38

HaydnH
Member
Registered: 2007-09-28
Posts: 187

Re: MySQL on DNS-323

pwvandeursen: When you write a computer program you write it in a human readable language like C/C++, Java etc. A compiler compiles this code so that the machine can understand it. This is done so that we don't have to program in binary or hex or something equally as nasty...

Has anyone got around at looking at this? I've been really busy recently and haven't managed to work on the ipkg thing for a couple of weeks so I probably won't be able to look at it for a while. Anyway, what features of MySQL are you after that msqlite doesn't provide that will be useful on a low-spec box?

Haydn.

Offline

 

#11 2008-02-28 19:59:38

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

I've got some issues with ./build_uclibc ... I had to install "bzip2" and "patch".
now it say illegal instruction ...

I had to change 2 line in build_ncurses :

tar zxf $NCURSES.tar.gz

cd $NCURSES

... and I had to run the make file manually ... and I had errors .... sad

I tried build_mysql : still getting a lot of errors :

./build_mysql: line 42: autoconf: command not found
...
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
./build_mysql: line 59: include/config.h: No such file or directory
cp: cannot stat `include/config.h.temp': No such file or directory
mv: cannot stat `include/config.h.temp': No such file or directory
make: *** No targets specified and no makefile found.  Stop.
./build_mysql: line 63: include/config.h: No such file or directory
cp: cannot stat `include/config.h.temp': No such file or directory
mv: cannot stat `include/config.h.temp': No such file or directory
make: *** No targets specified and no makefile found.  Stop.

Last edited by Nod (2008-02-28 20:18:06)

Offline

 

#12 2008-02-28 20:25:51

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

Yes you nead a full build environment on you linux to do this.
You also have to install autoconf, which packet it is in depends on you distribution.
The error in building mysql is becouse of that it failed to reconstruct the ./configure with autoconf.

Install it and try again.

Offline

 

#13 2008-02-28 21:24:34

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

ok thanks

any idea for ulibc errors ?

Last edited by Nod (2008-02-28 21:27:52)

Offline

 

#14 2008-02-28 21:35:57

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

I did not get that error, please write more context.

Offline

 

#15 2008-02-28 22:38:06

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

I'm using a chrotted etch distribution.
I'm following the instructions in here : http://dns323.kood.org/howto:crosscompile

I run ./build_ulibc ... and I get some question (yes/no type) ... I assume default is OK and I hit enter for each (maybe this is wrong).
then I get :

/GPL/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm/binutils-2.14.90.0.7/gas/write.c:431: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccWRBGSP.out file, please attach this to your bugreport.
make[4]: *** [write.o] Error 1
make[4]: Leaving directory `/GPL/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm/binutils-build/gas'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/GPL/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm/binutils-build/gas'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/GPL/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm/binutils-build/gas'
make[1]: *** [all-gas] Error 2
make[1]: Leaving directory `/GPL/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm/binutils-build'
make: *** [/GPL/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm/binutils-build/binutils/objdump] Error 2

Ok ... seems I forgot tu use the right gcc version ...
shame on me !

I'll try again with the good one

Last edited by Nod (2008-02-29 00:14:17)

Offline

 

#16 2008-03-01 08:25:50

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

ok now, uclibc is OK, ncurses is OK.

I try build_mysql and I get :

checking for ps... /bin/ps
checking "how to check if pid exists"... configure: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.
./build_mysql: line 59: include/config.h: No such file or directory
cp: cannot stat `include/config.h.temp': No such file or directory
mv: cannot stat `include/config.h.temp': No such file or directory
make: *** No targets specified and no makefile found.  Stop.
./build_mysql: line 63: include/config.h: No such file or directory
cp: cannot stat `include/config.h.temp': No such file or directory
mv: cannot stat `include/config.h.temp': No such file or directory
make: *** No targets specified and no makefile found.  Stop.
./build_mysql: line 76: scripts/make_binary_distribution: No such file or directory

any idea ?

seems the sed command in the script is wrong ... it's looking for a config.h file, that insn't there
or maybe it's beacause something was wrong before

Last edited by Nod (2008-03-01 10:34:23)

Offline

 

#17 2008-03-01 12:43:46

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

Ok
I had to comment out the lines with "Could not find the right ps switches. Which OS is this ?"
see : http://guymage.net/index.php/2006/04/25 … nt-for-arm

Then I had to put links to gcc 3 (instead of gcc 4) again (as for ulibc).
It's compiling at the moment (quite long).

I hope it will be ok

PS:
I see 2 occurences of :

sed -e "s/#define STACK_DIRECTION $/#define STACK_DIRECTION 1/" < include/config.h > include/config.h.temp
cp -f include/config.h.temp include/my_config.h
mv -f include/config.h.temp include/config.h

with a "make" between ... what is it for ?

Offline

 

#18 2008-03-01 17:37:34

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

still getting errors sad

maybe you can provide a binary ?

Offline

 

#19 2008-03-01 17:49:32

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

I am working on a funpgk för fun_plug 0.5 at least, but it takes a while to compile as you know.

The reason for the dubble make and seds are that the make process will overwrite the STACK_DIRECTION and then fail but if you retry it will continue.

What are the errors you get now?

Offline

 

#20 2008-03-03 09:30:00

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

Indeed , it's VERY long to compile ...

I'm still getting errors "Could not find the right ps switches. Which OS is this ?" , and I can't fix it beacause the "configure" file is written over each time.

Offline

 

#21 2008-03-05 10:46:57

petter
Member
Registered: 2008-02-11
Posts: 9

Re: MySQL on DNS-323

I did not get that error and have no clue on how to solve it.

I have however compiled mysql natively now on the DNS-323 using the 0.5-experimental fun_plug published by fonz.

He has also helped me a lot during the package build. You could try it out. It will however require 0.5 fun_plug to work.

The package is availible at http://www.lysator.liu.se/~petterl/dns3 … c-2.tar.gz
and can be installed with
funpkg <packagename>

If you find any errors in the package please tell me, and I will try to create new updates as time goes.
There is an start/mysqld.sh and an example etc/my.cnf which should make the package just install-n-go.

EDIT: Url updated

Last edited by petter (2008-03-07 07:48:30)

Offline

 

#22 2008-03-07 07:39:42

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

seems the package is mysql-5.1.23-rc-2.tgz in fact wink (url was wrong)

I'll try that

Offline

 

#23 2008-03-08 15:31:30

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: MySQL on DNS-323

I'm really interessted in the progress, but as I don't have enough knowledge, I would really appreciate if someone would put up a install help, once you guys have figured out how to get it working.

Thanks
Patrick

Offline

 

#24 2008-03-10 10:56:30

Nod
Member
Registered: 2008-01-14
Posts: 29

Re: MySQL on DNS-323

OK
The package installed correctly.

The mysqld is running (I didn't try further).

One small thing, the startup script doesn't handle "restart" option.

I need to check now if my PHP install handles MySQL connection.

Thanks a lot

Offline

 

#25 2008-03-19 00:42:57

frannic
New member
Registered: 2008-03-19
Posts: 4

Re: MySQL on DNS-323

This mysql package is great, but the only problem i have now is that i don't have a php install with mysql support.
Could your make an php installer with mysql support?
I am new with thi so i haven't got a clue how to do this myself.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB