Jump to content
  • 0

Raspberry RO


Cherryblue

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

Hi guys!

That's quite a troll topic name, but the idea is here:

Wanted to create my server, and didn't have anything to host it; then i thought I had a raspberry pi available, so I started wondering if it could work.

So I installed Raspbian (Debian customised for raspberry pi's ARM); which comes with gcc, make pre-installed..

Downloaded rathena's last sources from svn with subversion.

Configure doesn't work, it doesn't recognize my libgzip-dev. So i tried with cmake that I installed.

makefile works.

make install gave me these errors:

1 - incompatible va_list in nullpo.c

I searched on the web to understand that depending on the architecture and the implementation of C compilers, va_list can be either an array or a pointer. Here, that couldn't work so I just had to correct it in nullpo.c.

2 - After that, i relaunch make install

[ 1%] Building C object src/common/CMakeFiles/common_base.dir/mempool.c.o
In file included from /home/pi/trunk/src/common/mempool.c:27:0:
/home/pi/trunk/src/common/../common/atomic.h:86:2: error: #error Your Target Pla tfrom is not supported
make[2]: *** [src/common/CMakeFiles/common_base.dir/mempool.c.o] Error 1
make[1]: *** [src/common/CMakeFiles/common_base.dir/all] Error 2
make: *** [all] Error 2

So this time, no idea how to resolve this, but guys how awesome it could be to host it from a raspberry; Have to try! Help please ^^

btw, it's not an old gcc, it's 4.6.3.

See ya /no1

Edited by Cherryblue
  • Upvote 1
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

I think a raspberry pi won't strong enough to become a server

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

it should be capable of running athena, for testing etc, but i would not run a public server on this hardware :)

i have a RasPi too, but i didnt think about running athena on it

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Ahh.. so Raspbian can support rAthena too?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

After all, Ro wasn't designed to run on a dual core =)...

Meaning a 1ghz 512mo host running only on terminal (no graphic gui) and focusing only on rathena should do the trick. I'm not pretending it would be enough to run a full server (don't know how much it could stand); but could be fun to try!

Any help is welcome ^^ i'm sure there is something to do

PS: Rasp is 700mhz but can be overclocked to 1ghz without nullifying the warranty.

EDIT:

OK, from what i understand (have a little knowledge in C,C++) sources of Athena support linux on X86_64, but not on ARM.

So there is simply no "code" for the mempool part (which after research is similar in use to malloc or new, but more used for real time programming)

I do believe the code we should write to make it work is short since the other files shouldn't be too much architecture's dependant. But i have to admit it's a lil' complicated for me. Help is welcome since i don't know much about this deep programming. I've only programmed some gui and games 'til now.

So Goal: fill the gap for ARM in /src/common/atomic.h

2nd EDIT:

I tried to bypass the #define blocking compiling it on a none x86-64 architecture and.. I got errors xD.

I believe this can help:

http://tomoyo.source...de/asm/atomic.h

...working on it!

3rd EDIT:

Difficulty is to reproduce the same effect done by built-in functions of GCC on ARM, where we have to use ASM.

==> Documentation on these build-in functions:

http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html

I'll try to reproduce the behavior helping myself with the link written in 2nd edit.

There's no Rathena devs who would help? Oo..

Edited by Cherryblue
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

I finally succeeded.

==>

First step was to update GCC to 4.8 from 4.7.

it seemed to give the built-in functions 32bits for ARM which were missing for atomic.h needed in mmo.h.

But I still had problems for 64bits functions. After one day, I thought "anyway Raspberry isn't 64bits" and simply "swiched off" the functions by returning a random floating value.

Compiler had problems, but exe wouldn't use them on raspberry. And that's it, it's working.

So 3 things can prevent you from compiling rathena on raspberry:

1 - ./configure doesn't work, got some errors with zlib even if it's installed. Rather go for CMake

2 - Make install doesn't work, nullpo.c gets errors on stupid variables, because depending on implementations of C, the variable is either a pointer, or a structure. Try casting it as a pointer. It worked for me (multiple modifications in file)

3 - mempool.h got some problems in atomic.h where you need to "switch off" 64bits functions (and gcc >=4.8 absolutely needed) by deleting call to built-in functions for int64 which doesn't work for raspberry.

That's all folks, hope it helps anyone trying the same thing.

Currently I was running on raspbian. Server's working but memory available is low. That's bad since i'm only using terminal, i mean on 512mo I only have 1xx free after loading system. Too much things on this system.

==> there's a fork by Darkbasic which only uses 7mo of ram after start. It doesn't come with X, Xorg, LXDE. No GUI. But fairenough. And less shared memory for graphics. I'll try this this week. I'm sure there's a good potential on that; it'd be good enough for my RO server =).

Bye !

Edited by Cherryblue
  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  06/05/13
  • Last Seen:  

Cherryblue, that's awesome! I'm also trying to set up a small server for testing, and I was wondering if you would mind sharing your modified nullpo.c and atomic.h? Would be immensely helpful :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...