running linux arm executables on Pandora


levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
15,852
Location
Somewhere off the coast of the EU
I did try the armhf support and it goes a bit further. I get lots of info when using ldd.
Now I get "segmentation fault" if I try to run it.
Try creating a swap file. In my experience seg fault errors mainly happen when a system runs out of RAM. But what ptitseb suggests might be a better way to get something you can package up for normal pandora running a softfp os.
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
So you didn't tried x86 build with box86? I know hollywood works on box86, and it's easy to package as PND.
Actually, I was not aware of box86 at all. I though you was refering to the DosBox package at first.

Now, after searching I did find a box86 thread here on the forum. That thread have 25 pages of posts, so I havent been able to read through that just yet.
I have located the github page an read the installation part of the readme.
I will involve me setting up a developing environment, the proper toolchains and so on, and then compile it myself?
Then, given that I manage to get that compiled, I should be able to test it. I did read the Usage part of the github readme, but I must admit it left me not any less confused.

If there was a box86 precompiled release it would be easier to test, along with some how-to-use examples.

Anyway, I have compiled the game for both arm an x86 linux now, and attached the executables below in case anyone has access to test this easily.
I did include a "local" variant of the game, since the network version will require libssl1.0.0.
 

Attachments

  • DonkeyKong_Linux_ARM_local.zip
    2.9 MB · Views: 96
  • DonkeyKong_Linux_ARM.zip
    3.2 MB · Views: 97
  • DonkeyKong_Linux_x86.zip
    3.2 MB · Views: 99
  • DonkeyKong_Linux_x86_local.zip
    2.9 MB · Views: 92

ingoreis

Hardcore Member
Staff member
Joined
Jan 18, 2010
Messages
8,265
Age
41
Location
49.491276,8.423518
I'm really doing a crapy job at promoting box86 :'(
Maybe a Box86 PND help many Users with just select a X86 File for Running?

Another Idea is to implement additional a Library downloader/installer from a Repo based on your magical copy_libs.sh to identify and download missed Libs automatic to the Pandora Appdata.

A Box86 PND would be great for us all.
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
Actually, I was not aware of box86 at all. I though you was refering to the DosBox package at first.

Now, after searching I did find a box86 thread here on the forum. That thread have 25 pages of posts, so I havent been able to read through that just yet.
I have located the github page an read the installation part of the readme.
I will involve me setting up a developing environment, the proper toolchains and so on, and then compile it myself?
Then, given that I manage to get that compiled, I should be able to test it. I did read the Usage part of the github readme, but I must admit it left me not any less confused.

If there was a box86 precompiled release it would be easier to test, along with some how-to-use examples.

Anyway, I have compiled the game for both arm an x86 linux now, and attached the executables below in case anyone has access to test this easily.
I did include a "local" variant of the game, since the network version will require libssl1.0.0.
1623766476147.png

So, I had a few fixes to do in box86... but it works now :D

I'll package the box86 binary soon, so people can play with latest version (it needs a swapfile to build on the Pandora)
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
Maybe a Box86 PND help many Users with just select a X86 File for Running?

Another Idea is to implement additional a Library downloader/installer from a Repo based on your magical copy_libs.sh to identify and download missed Libs automatic to the Pandora Appdata.

A Box86 PND would be great for us all.
I don't know. Maybe I can try something like that later. Not sure it's worth it.

In the mean time, here is the latest box86 build for (and on) the Pandora: http://ptitseb.openpandora.org/box86.zip

It's a build with Trace enabled (but it wont work without libZydis.so) and have debug symbol in case of crash. There is no specific dependancy to box86, but the x86 program may have some, and box86 will translate those needs...
Happy playing with x86 emulation!

(and yeah, the speed was correct on my gigahertz model)
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
I'm really doing a crapy job at promoting box86 :'(
I havent been using my pandora for ages, and havent been updated on the development. If anyone is to blame for my lack of knowledge here, it must me myself.

And I see you already have made the game running.
Was there any particular dependencies or arguments to launch it?

I tried with: "box86t DonkeyKong_Linux_x86"
Then it returns: "Error: Reading elf header of /usr/games/DonkeyKong_Linux_x86, try to launch natively instead"
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
box86t ./DonkeyKong_Linux_x86

Is better. But yeah, just that (from Codeblocks command line, but it should work without it too).
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
box86t ./DonkeyKong_Linux_x86

Is better. But yeah, just that (from Codeblocks command line, but it should work without it too).

I only tried from the terminal, but then it only returns that elf header message.
I will try to get that codeblocks.pnd, but that is a huge download.
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
it should just print the box86 banner:
Code:
Box86 with trace with Dynarec v0.2.3 1e3eba1b built on Jun 15 2021 15:35:56

I get this md5sum:
Code:
/media/SEBEXT/sources$ md5sum DonkeyKong_Linux_x86
1f6c18984125210e331491f6380855a7  DonkeyKong_Linux_x86
Also, you need to gaive read and execute right to file (like if you wanted to run it natively).

Error Reding Elf means it cannot acces the file or the file is not an x86 elf binary.
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
Thanks. Got the local version working now. It was Filezilla that messed up the x86 executables for me. Downloading them as zip files instead and the elf header error was gone.
It plays ok, but some sounds are missing. There are some very short sound samples in there that the sound system misses.

From your screenshot I see that you have got the online version working.
The hurl plugin require libssl1.0.0. My pandora have openssl version 0.9.8.zh-r1.5, so I guess I need to find a way to update it to 1.0.0
Probably need libssl.so.1.0.0.
There is a .deb package for armel at packages.debian.org/jessie/libssl1.0.0 but I am not sure if I can install and use a debian package on the pandora.
I did try just to extract the lbssl.so.1.0.0 file and put it into /usr/lib but that did not work.

I also tried to run it from the codeblocks command line, but in the end it also says segmentation fault.
I notice that when codeclocks starts it says "Must launch ldconfig, sudo password needed". The strange thing is that it will not ask for sudo password before I quit the codeblocks terminal window.
Also it lists a few libraries at startup and complains that they are not elf native.
If I launch the main Code::Blocks first and leave it running, it will not show these messages when the in the codeblocks command line interface starts..
I have attached the output from the codeblocks terminal window in case you have time to analyze it.
 

Attachments

  • codeblocks-log.txt
    23.1 KB · Views: 102
Last edited:

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
the codeblocks command line also have an older version of box86, so maybe it's that old one that is called (and segfault before of some missing symbols in libcrypto wrapping in box86.
Also, libssl.so.1 and libcrypto.so.1 are in codeblocks pnd (inside /mnt/utmp/codeblocks/usr/lib/) and can be used to get online version working yes.

The complains at start about a few libs is OK. Some are just ld script and not binary. No problem here.

The exit of the command line should be trigger if "/mnt/utmp/codeblocks/init/unclean_pnd" file is absent.
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
the codeblocks command line also have an older version of box86, so maybe it's that old one that is called (and segfault before of some missing symbols in libcrypto wrapping in box86.
Also, libssl.so.1 and libcrypto.so.1 are in codeblocks pnd (inside /mnt/utmp/codeblocks/usr/lib/) and can be used to get online version working yes.

The complains at start about a few libs is OK. Some are just ld script and not binary. No problem here.

The exit of the command line should be trigger if "/mnt/utmp/codeblocks/init/unclean_pnd" file is absent.
Yes, it was probably running the old box86t executable. I renamed the one in codeblocks/usr/bin to box86t_ and now the online version starts.
It runs and you can play the game. But as soon as it tries to go online, it will fail. It will try go go online as soon as you either click in the area "Click here to display highscores", or after finishing a game (will go online to check your score against the online highscore list).

Not sure what you mean with that last line. There is no file named unclean_pnd here when the command line is running.

Here is the output in the terminal when the game aborts:
Error: PltReolver: Symbol SSL_CTX_sess_set_new_cb(ver 5: SSL_CTX_sess_set_new_cb@OPENSSL_1.0.0) not found, cannot apply R_386_JMP_SLOT 0x42e763bc (0x42db76a6) in /var/volatile/tmp/hollywood.9wMlFd/hurl.hwp
Aborted
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
Ah, yes, more symbol to wrap are needed. I'll add them and make a new build. I'll to play a bit to see if the upload of score works.
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
Ok @amyren I have updated box86 (at the same link) with a version were the upload of Hiscore works.
hm. the list was updated 3 days ago, so I see no update today.
You know you need to beat the scores to get to upload that list?;)

Anyway, excellent work. I just tested it and it does work, both downloading the list and uploading.
Managed to get on the Game B list, and entered playername Pand_box86 in tribute to the box86

But I wonder, is there a way for box86 to use the x86 libs without going through codeblocks?
Then perhaps it could be possible to make this a pnd out of it.
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
hm. the list was updated 3 days ago, so I see no update today.
You know you need to beat the scores to get to upload that list?;)

Anyway, excellent work. I just tested it and it does work, both downloading the list and uploading.
Managed to get on the Game B list, and entered playername Pand_box86 in tribute to the box86

But I wonder, is there a way for box86 to use the x86 libs without going through codeblocks?
Then perhaps it could be possible to make this a pnd out of it.
You don't need to whole codeblock PND to use box86. Just copy the libcrypto.so.1.0.0 and libssl.so.1.0.0 and it should be good enough. Look at the how I did the PND I pointer earlier (you can mount a pnd without executing on the pandora with a script (forgot the name), or mount it on some linux box with "mount", or use 7z on windows to peek inside the PND): you'll see how I package the thing and even redifine some key to make the game more pandora-friendly.
 

amyren

Member
Joined
Jan 19, 2007
Messages
139
You don't need to whole codeblock PND to use box86. Just copy the libcrypto.so.1.0.0 and libssl.so.1.0.0 and it should be good enough. Look at the how I did the PND I pointer earlier (you can mount a pnd without executing on the pandora with a script (forgot the name), or mount it on some linux box with "mount", or use 7z on windows to peek inside the PND): you'll see how I package the thing and even redifine some key to make the game more pandora-friendly.
Thanks for the info, I will take a look with 7z then. I have been looking for how to create pnd files, and found the Pandora Wiki, but I seemes all the links to the pnd tools are broken.
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,276
Age
50
Location
France, near Lyon
To create the PND: create your icon and your PXML files, put them in the folder and use command line tool on the Pandora itself:
Code:
/usr/pandora/scripts/pnd_make.sh -d PATH/TO/GAMEFOLDER -p /PATH/TO/PND.pnd -i /PATH/TO/GAME/icon.png -c

*EDIT* fixed the typo in the command line...
 
Last edited:
Top