探寻过去与未来:回顾S805芯片在Sx05RE源码编译与运行

EmuELEC 前身为 Sx05RE。Sx05RE 整合了 Lakka、KODI、EmulationStation,常被人简称为三合一。因 Sx05RE 项目只有墨西哥的 Shantigilbert 一人开发,而 KODI 经常出现各种需要修复的 BUG,浪费了大神的大量时间。出于时间严重不足的考虑,Shantigilbert 决定从 Sx05RE中删除 KODI,并将系统改名成 EmuELEC,使系统专为游戏服务。

这就是大家目前熟悉的EmuELEC。

前段时间,有朋友让我在S805上运行Sx05RE,刚好乘此机会体验了一把。那就从下载源码开始介绍。目前S805的包屈指可数

首先我们找到github上的Sx05RE源码:https://github.com/EmuELEC/Sx05RE

进入github后,我们看下readme,做任何github项目开发,必须先看这些,不要一上来就无脑冲,结果无用功,各种报错。养成看readme的习惯,可以让我们开发编译更加顺畅,否则上传源码的作者就没必要写。

注意以上,作者说用了16.04.3,好吧既然这样,我们也用这个系统,去ubuntu的官网下载,装个虚拟机即可。
然后就是一顿安装,git clone,这里说一下 git clone https://github.com/shantigilbert/LibreELEC.tv.git Sx05RE
仓库的地址已经无法clone仓库了,所以这里注意一下,使用git clone https://github.com/EmuELEC/Sx05RE.git
同时需要把自己ubuntu的sshkey同步到github上,这样才会有权限下载,这里不过多详细,百度即可很多教程。
当把github的源码git clone完成后。即将开始编译,首先那就是命令。github给的是905的编译命令。
make image PROJECT=S905 ARCH=arm DISTRO=Sx05RE
如何编译805呢?这里我们就需要看PROJEC即可,找到projects的文件夹;
/project/Sx05RE/projects$ ls
Generic  imx6  Odroid_C2  RPi  RPi2  S805  S905  S912  Slice  Slice3  WeTek_Core  WeTek_Hub  WeTek_Play  WeTek_Play_2
很明显可以使用:
make image PROJECT=S805 ARCH=arm DISTRO=Sx05RE
那就使用这个命令开始编译。

上来就报错
.1/remote-stub.c
mv -f .deps/strcache.Tpo .deps/strcache.Po
mv -f .deps/remote-stub.Tpo .deps/remote-stub.Po
mv -f .deps/hash.Tpo .deps/hash.Po
mv -f .deps/vpath.Tpo .deps/vpath.Po
mv -f .deps/remake.Tpo .deps/remake.Po
mv -f .deps/main.Tpo .deps/main.Po
mv -f .deps/variable.Tpo .deps/variable.Po
mv -f .deps/read.Tpo .deps/read.Po
/usr/bin/gcc  -O2 -Wall -pipe -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/include -Wno-format-security -Wl,--export-dynamic -Wl,-rpath,/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/lib -L/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/lib -o make ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o getopt.o getopt1.o guile.o implicit.o job.o load.o loadapi.o main.o misc.o posixos.o output.o read.o remake.o rule.o signame.o strcache.o variable.o version.o vpath.o hash.o remote-stub.o glob/libglob.a   -ldl
glob/libglob.a(glob.o): In function `glob_in_dir':
glob.c:(.text+0x2c1): undefined reference to `__alloca'
glob.c:(.text+0x43e): undefined reference to `__alloca'
glob.c:(.text+0x5f8): undefined reference to `__alloca'
glob.c:(.text+0x658): undefined reference to `__alloca'
glob/libglob.a(glob.o): In function `glob':
glob.c:(.text+0x95b): undefined reference to `__alloca'
glob/libglob.a(glob.o):glob.c:(.text+0x101a): more undefined references to `__alloca' follow
collect2: error: ld returned 1 exit status
Makefile:655: recipe for target 'make' failed
make[3]: *** [make] Error 1
make[3]: Leaving directory '/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/make-4.2.1/.x86_64-linux-gnu'
Makefile:798: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/make-4.2.1/.x86_64-linux-gnu'
Makefile:534: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/make-4.2.1/.x86_64-linux-gnu'
Makefile:12: recipe for target 'image' failed
make: *** [image] Error 2

看到报错不要慌,有些初入门开发的同学,一看到failed就不知所措,不知道怎么下手。
这里举个例子,其实这些报错都比较简单。自己认真看下报错原因,很简单,只不过是glob.c有个未定义。
直接找到glob.c定义就好,直接find ./ -name glob.c,然后到这个文件路径下定义
#define  __alloca alloca
这个错误是glibc2.7引起的,只要定义一下就可以编译过去。
继续编译...

libtool: compile:  /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/bin/host-gcc -DHAVE_CONFIG_H -I. -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib -I.. -I.. -I../glib -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -pthread -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -O2 -Wall -pipe -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/include -Wno-format-security -MT libglib_2_0_la-ghash.lo -MD -MP -MF .deps/libglib_2_0_la-ghash.Tpo -c /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib/ghash.c -o libglib_2_0_la-ghash.o
libtool: compile:  /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/bin/host-gcc -DHAVE_CONFIG_H -I. -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib -I.. -I.. -I../glib -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DGLIB_COMPILATION -DPCRE_STATIC -pthread -Wall -Wstrict-prototypes -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -O2 -Wall -pipe -I/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/include -Wno-format-security -MT libglib_2_0_la-ggettext.lo -MD -MP -MF .deps/libglib_2_0_la-ggettext.Tpo -c /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib/ggettext.c -o libglib_2_0_la-ggettext.o
/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib/gdate.c: In function 'g_date_strftime':
/home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/pkg-config-0.29.1/glib/glib/gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
       ^~~~~~
cc1: some warnings being treated as errors
make[7]: *** [Makefile:1387: libglib_2_0_la-gdate.lo] Error 1
make[7]: *** Waiting for unfinished jobs....

停了下来,莫慌,继续看报错。先找到该文件#find ./ -name "gdate.c"
修改该文件找到g_date_strftime函数实现的地方,将添加上去

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
g_date_strftime()

{

}
#pragma GCC diagnostic pop

报错解决,继续编译...
checking for gcj... no
checking for x86_64-linux-gnu-windres... no
checking for windres... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: linking /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/libtool-2.4.6/GNUmakefile to GNUmakefile
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
Executing (host): make
 cd /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/libtool-2.4.6 && /bin/sh /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/libtool-2.4.6/build-aux/missing automake-1.15 --gnu Makefile
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/toolchain/bin/automake-1.15 line 3936.
make: *** [Makefile:1002: /home/leo/project/Sx05RE/build.Sx05RE-S805.arm-1.8.6/libtool-2.4.6/Makefile.in] Error 255


找到substitute_ac_subst_variables_worker,替换
#$text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
$text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;


期间还有源失效,重新替换源即可,还有各种报错一一解决。
终于到了最后编译完成。烧录进去发现直接进kodi了。

下次有空再写,如何去掉kodi,只保留EmulationStation,然后进行EmulationStation和模拟器的定制修改。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
晶晨S805芯片纯净版刷机固件是将晶晨S805芯片上的原有操作系统替换为其他版本或定制的系统软件的过程。刷机固件可以带来许多好处,比如系统性能的优化、功能的扩展、安全性的增强等。 首先,选择适合晶晨S805芯片的纯净版刷机固件。纯净版固件通常以消除厂商预装软件、删除无用文件为目的,使系统更加纯净、稳定、流畅,提供更好的用户体验。 其次,确保晶晨S805芯片刷机过程的安全性。刷机前需要备份重要数据,以免数据丢失。同时,确认刷机固件的来源可靠,避免下载到病毒植入的恶意固件。刷机过程需要对操作指引进行仔细阅读,确保按照正确的步骤进行刷机。 刷机固件的具体步骤可能因固件版本而有所不同,但一般包括以下几个主要步骤:连接晶晨S805芯片设备到电脑并启动刷机模式,通过刷机工具选择和导入刷机固件,点击开始按钮,等待刷机过程完成,最后断开设备连接,重启设备。 需要注意的是,刷机操作可能对设备产生一定的风险。如果操作不当或出现意外情况,可能导致设备无法正常开机,甚至损坏设备。因此,在刷机前建议仔细阅读固件刷机说明文档,确保对操作流程和注意事项有充分的了解。 总而言之,通过选择适合晶晨S805芯片的纯净版刷机固件,并遵循正确的刷机操作流程,可以提升设备性能和使用体验。但在操作过程中需要注意风险,并做好备份重要数据的准备,以免造成不必要的损失。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

EmuELEC源码分析

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值