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: libEGL.so: 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

Help!!

2 Likes

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

then
$ git clone https://github.com/EmuELEC/EmuELEC.git
$ 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.

Hello,

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 - Pastebin.com

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.

Can you all compile successfully?

I followed this compilation process, but every time I encountered an error midway.

To ensure a clean compilation environment, I started with the complete Ubuntu latest.

The current error is like this.

/home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/build/cmake-3.27.5/Source/cmCMakePresetsGraph.h:91:60: internal compiler error: Segmentation fault
   91 |     virtual bool VisitPresetBeforeInherit() { return true; }
      |                                                            ^
0xe34ddb internal_error(char const*, ...)
        ???:0
0x13ac413 ggc_set_mark(void const*)
        ???:0
0x13a969d gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aacd3 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13b438d gt_ggc_mx_vec_tree_va_gc_(void*)
        ???:0
0x13b4872 gt_ggc_mx_lang_type(void*)
        ???:0
0x13aac54 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aa494 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aabb2 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aa494 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13b438d gt_ggc_mx_vec_tree_va_gc_(void*)
        ???:0
0x13b4872 gt_ggc_mx_lang_type(void*)
        ???:0
0x13aac54 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aa4bd gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aa014 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13a9fda gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13aa494 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x13b438d gt_ggc_mx_vec_tree_va_gc_(void*)
        ???:0
0x13b4872 gt_ggc_mx_lang_type(void*)
        ???:0
0x13aac54 gt_ggc_mx_lang_tree_node(void*)
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
make[3]: *** [Source/CMakeFiles/CMakeLib.dir/build.make:2064: Source/CMakeFiles/CMakeLib.dir/cmMakefileTargetGenerator.cxx.o] Error 1
make[3]: *** Waiting for unfinished jobs....
during RTL pass: ce1
/home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/build/cmake-3.27.5/Source/cmMakefileExecutableTargetGenerator.cxx: In member function 'virtual void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool)':
/home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/build/cmake-3.27.5/Source/cmMakefileExecutableTargetGenerator.cxx:674:1: internal compiler error: Segmentation fault
  674 | }
      | ^
0xe34ddb internal_error(char const*, ...)
        ???:0
0x1020beb free_dominance_info(function*, cdi_direction)
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
make[3]: *** [Source/CMakeFiles/CMakeLib.dir/build.make:2078: Source/CMakeFiles/CMakeLib.dir/cmMakefileExecutableTargetGenerator.cxx.o] Error 1
make[3]: Leaving directory '/home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/build/cmake-3.27.5/.x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:2099: Source/CMakeFiles/CMakeLib.dir/all] Error 2
make[2]: Leaving directory '/home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/build/cmake-3.27.5/.x86_64-linux-gnu'
make[1]: *** [Makefile:166: all] Error 2
make[1]: Leaving directory '/home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/build/cmake-3.27.5/.x86_64-linux-gnu'
FAILURE: scripts/build cmake:host during make_host (default)
*********** FAILED COMMAND ***********
make ${PKG_MAKE_OPTS_HOST}
**************************************
FAILURE: scripts/build cmake:host has failed!

The following log for this failure is available:
  /home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/.threads/logs/14.log

>>> cmake:host seq 14 >>>
[014/610] [FAIL] build   cmake:host

The following log for this failure is available:
  /home/kero/EmuELEC/build.EmuELEC-Amlogic-ne.aarch64-4/.threads/logs/14.log

Parallel build failure - see log for details. Time of failure: Thu Dec 14 00:10:19 HKT 2023
make: *** [Makefile:10: image] Error 1

The error is actually a segment error. Although I don’t know programming, I am very good at compiling projects and have compiled them in various languages. Segment errors are very rare during the compilation process.

hello, anyone fix this ? :frowning: