Trying to compile for s905w2 Amlogic-ne

I’m trying to compile a version of emuelec for the S905w2 but after creating image I got it to boot but Emulationstation isn’t running due to "emulationstation: error while loading shared libraries: wrong ELF class: ELFCLASS32 ".
I know this has to do with it using 32 bit version of library but don’t know how to fix this while compiling.
It took a long time to compile this but obviously did something wrong, can anyone help, or has anyone successfully compiled a version that worked??
Used Ubuntu to compile and used Amlogic-ne as device
PROJECT=Amlogic-ce DEVICE=Amlogic-ne ARCH=aarch64 DISTRO=EmuELEC make image



I have a s905w2 device(x96mini), but failed, lol…

So the “device” codes need further fixes. I only submitted the changes needed to ensure the “Amlogic-ne” can be buily successfully but did not verify it on actual device. You are using the latest codes right?

latest codes please explain,
so I used ubuntu
opened terminal
built prereqs
$ apt install gcc make git unzip wget xz-utils libsdl2-dev libsdl2-mixer-dev libfreeimage-dev libfreetype6-dev libcurl4-openssl-dev rapidjson-dev libasound2-dev libgl1-mesa-dev build-essential libboost-all-dev cmake fonts-droid-fallback libvlc-dev libvlccore-dev vlc-bin texinfo premake4 golang libssl-dev curl patchelf xmlstarlet default-jre xsltproc

$ git clone
$ cd EmuELEC
$ git checkout dev
$ PROJECT=Amlogic-ce DEVICE=Amlogic-ne ARCH=aarch64 DISTRO=EmuELEC make image
burnt image to sdcard
changed dtb file
first time it booted it fell over as it couldnt mount (coreelec partition)
changed the AML_autoscript and cfgload from a prebuilt Amlogic-ng image. (as I think it was using ones from coreelec build)
and it booted to a black screen shh’d into it and tried running emulation station and got elf class error.


I’m totally layman on the subject. I have two TV Boxes with Amlogic SoC from the S4 platform, the Tanix W2 (S905W2) and Hako Mini (S905Y4). I tried to make EmuELEC v4.6 work on them and it didn’t work.

So I would like to know how to compile an EmuELEC image, 7Ji told me that this was possible. I looked into this however I still don’t know how to do it and I’m still hoping to learn how it’s done!

I see you’re trying, I hope you succeed! Could you share the image if successful? I would love to test it out on my devices.

I’m using google translator!

I am still trying, but haven’t got any further I’m afraid, I was hoping for a little direction or help here, but so far nothing, I would imagine it is very close, as I said the OS is actually running, I can shh in, I can ftp in, it creates the partitions, but unfortunately neither emulationstation or RetroArch run.
I will keep you posted, I have also tried to get Ubuntu running on it using an image for a vim1s, but failed there too, if that was running we could then build RetroPie onto it.

Take a look at the source repo instead of here, I don’t have a lot of time to jump around all different places to annouce the minor updates. The following two PRs I submitted yesterday should fix your build and run problems:

Of which two, the bootscript one is already merged.

My network is deadly slow for global access (I’m in China) so it’s prettry slow to download sources for all the packages to build test images to actually verify if they’re working on an actual -ne device, but I believe they should solve all your problems

Thank you for your information and help! If I had the necessary knowledge I would try to help you. I’ll be following this thread and if your image works I’ll be ready to test it if you’ll let me!

ok, tried this as you say only one has merged so far so the other I manually edited the script to match your changes, unfortunately it sill doesnt load emulationstation, just black screen,
I can still ssh in when I change it to boot to retroarch it displays a flashing rectangle, looks like the rectangle which would be around the text on main retroarch screen but its streched and no text,
there doesnt seem to be any logs I can post.
let me know if there is anything I can post to help diagnose

Anyone else got any other ideas to help get this built for the 905w2 or 905y4?

1 Like

ok after a bit more probing I think it might be a video issue and that it might be running in backgound
Its populated some configs from emulationstation
its created eeroms partition
I can ssh in
here is a log I created based on previous diagnostic back and forth I found here
s905w2 output -

try doing the command in SSH:

chmod 664 /sys/class/graphics/fb0/free*scale*
EMUELEC:~ # chmod 664 /sys/class/graphics/fb0/free*scale*
chmod: /sys/class/graphics/fb0/free*scale*: No such file or directory

That is really strange, perhaps @7Ji can figure it out.