找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: 兔巴哥

折腾OSCAM之一---OSCAM交叉编译详细步骤

  [复制链接]
发表于 2016-8-10 13:52 | 显示全部楼层
谢谢分享谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-9-7 09:05 | 显示全部楼层
很详细,多谢楼主分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-9-7 09:05 | 显示全部楼层
好教程,学习下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-11-1 19:41 | 显示全部楼层
看看自己能不能操作,嘎嘎
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-11-4 12:03 | 显示全部楼层
学习下,嘎嘎
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-12-29 12:55 | 显示全部楼层
楼主好!按你的教程交叉编译oscam,编译openssl/libcrypto和编译2-1、libusb,我都能顺利完成,但是编译2-2、pcsc时,执行./configure CC........后有如下提示,致使往下的make不能进行,echo $?也返回“2”。sudo apt-get install libusb-dev、sudo apt-get install libusb-1.0-0-dev等也做了。请问我这是哪里弄错了?

.........
checking libusb.h presence... yes
checking for libusb.h... yes
checking for libusb_init... configure: error: libusb not found, use ./configure LIBUSB_LIBS=...

点评

错误信息的最后一句貌似指出了解决方法,你可以仔细看一下。 在编译 libusb的过程中,环境设置这些是否正确?所使用的版本是否合适。  详情 回复 发表于 2016-12-29 19:15
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-12-29 14:36 | 显示全部楼层
看oscam官网,既使用了系统目录,又强调非root用户,不知是否与权限有关?

点评

就是和权限有个。linux对权限的要求非常严格。  详情 回复 发表于 2016-12-29 19:16
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-12-29 19:15 | 显示全部楼层
本帖最后由 兔巴哥 于 2016-12-29 19:20 编辑
wbhwbh121 发表于 2016-12-29 12:55
楼主好!按你的教程交叉编译oscam,编译openssl/libcrypto和编译2-1、libusb,我都能顺利完成,但是编译2-2 ...

错误信息的最后一句貌似指出了解决方法,你可以仔细看一下。
在编译 libusb的过程中,环境设置这些是否正确?所使用的版本是否合适,权限的使用是否恰当。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-12-29 19:16 | 显示全部楼层
wbhwbh121 发表于 2016-12-29 14:36
看oscam官网,既使用了系统目录,又强调非root用户,不知是否与权限有关?

就是和权限有关。linux对权限的要求非常严格。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-12-30 11:04 | 显示全部楼层
兔巴哥,首先谢谢你的帮助!
上次不能编译编译2-2、pcsc ...错误已解决。解决方法是在/opt/cross/目录(并给予777权限)下解压openwrt sdk。若将openwrt sdk放在用户目录下并做相应后续操作,编译openssl/libcrypto和编译2-1、libusb
正常,编译2-2、pcsc死活就是“error: libusb not found, use ./configure LIBUSB_LIBS=...”。虽然侥幸解决,但仍不明原因。

现在到了最后一步,即交叉编译。

现在问题是你帖子提到的“没有找到aes.h...”的错误,我也发生。我按帖子的方法解决,通过增加export语句等,却就是解决不了。求教!!!

我的错误代码:
CC        cscrypt/des.c
In file included from cscrypt/../globals.h:109:0,
                 from cscrypt/des.c:136:
cscrypt/../cscrypt/aes.h:2:27: fatal error: openssl/aes.h: No such file or directory
#  include <openssl/aes.h>
                           ^
compilation terminated.
Makefile:413: recipe for target 'build/arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc/cscrypt/des.o' failed
make[1]: *** [build/arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc/cscrypt/des.o] Error 1
Makefile:365: recipe for target 'all' failed
make: *** [all] Error 2



下面是查找aes.h情况:

sudo find / -name aes.h
[sudo] password for wbh:
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/openssl/aes.h
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/cyassl/ctaocrypt/aes.h
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/polarssl/aes.h
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/nettle/aes.h
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/linux-3.18.23/include/crypto/aes.h
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/linux-3.18.23/include/config/crypto/aes.h
/home/wbh/oscam/cscrypt/aes.h
/home/wbh/.local/share/Trash/files/openssl-1.0.2/crypto/aes/aes.h
/home/wbh/.local/share/Trash/files/openssl-1.0.2/include/openssl/aes.h
/home/wbh/tmp/openssl-1.0.2/crypto/aes/aes.h
/home/wbh/tmp/openssl-1.0.2/include/openssl/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/openssl/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/cyassl/ctaocrypt/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/polarssl/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/usr/include/nettle/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include/openssl/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/linux-3.18.23/include/crypto/aes.h
/home/wbh/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_uClibc-0.9.33.2_eabi/linux-mvebu/linux-3.18.23/include/config/crypto/aes.h
/home/wbh/oscam souce/oscam/cscrypt/aes.h
/home/wbh/oscam-svn/cscrypt/aes.h
/usr/include/openssl/aes.h
/usr/src/linux-headers-4.4.0-57/include/crypto/aes.h
/usr/src/linux-headers-4.4.0-57/arch/x86/include/asm/crypto/aes.h
/usr/src/linux-headers-4.4.0-21-generic/include/config/crypto/dev/padlock/aes.h
/usr/src/linux-headers-4.4.0-21-generic/include/config/crypto/aes.h
/usr/src/linux-headers-4.4.0-21/include/crypto/aes.h
/usr/src/linux-headers-4.4.0-21/arch/x86/include/asm/crypto/aes.h
/usr/src/linux-headers-4.4.0-57-generic/include/config/crypto/dev/padlock/aes.h
/usr/src/linux-headers-4.4.0-57-generic/include/config/crypto/aes.h
find: ‘/run/user/1000/gvfs’: Permission denied

点评

你现在这个问题恐怕我帮不上忙的,因为我自己就是这样解决的。建议你从如下方法试一下: 1、直接在路由器上编译,这是最优方法 2、看一下这里的arm版本是否可用https://pan.baidu.com/s/1qXOaw6w?qq-pf-to=pcqq.gr  详情 回复 发表于 2016-12-30 13:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-12-30 13:01 | 显示全部楼层
wbhwbh121 发表于 2016-12-30 11:04
兔巴哥,首先谢谢你的帮助!
上次不能编译编译2-2、pcsc ...错误已解决。解决方法是在/opt/cross/目录(并 ...

你现在这个问题恐怕我帮不上忙的,因为我自己就是这样解决的。建议你从如下方法试一下:
1、直接在路由器上编译,这是最优方法
2、看一下这里的arm版本是否可用https://pan.baidu.com/s/1qXOaw6w ... 4%E9%A1%B9%E7%9B%AE
3、用7620的SDK走一遍看是否能过....
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-12-30 16:13 | 显示全部楼层
兔巴哥,再次谢谢你的指导!!!
我这次似乎交叉编译成功了。在你帖子的基础上我主要调整了两点:1.将你第一个编译openssl/libcrypto时的openwrt sdk目录(home/wf)统一调整到再/opt/cross目录;2.在make后 并且echo $? 返回0时,make install前加上sudo,以确保文件安装成功。

下面是make cross后的结果,似乎只有一个警告了,帮我判断下还有其他问题没?另外,除开我实际安装到路由上试运行外,还有什么办法验证生成的文件正确性?求教!!!

HOSTCC        webif/pages_gen
GEN        webif/pages.c
GEN        Compressed 431568 template bytes into 201948 bytes. 229620 saved bytes (53.21%).
CC        cscrypt/des.c
CC        cscrypt/i_cbc.c
CC        cscrypt/i_ecb.c
CC        cscrypt/i_skey.c
CC        cscrypt/md5.c
CC        cscrypt/rc6.c
CC        csctapi/atr.c
CC        csctapi/icc_async.c
CC        csctapi/io_serial.c
CC        csctapi/protocol_t0.c
CC        csctapi/protocol_t1.c
CC        csctapi/ifd_db2com.c
CC        csctapi/ifd_mp35.c
CC        csctapi/ifd_pcsc.c
CC        csctapi/ifd_phoenix.c
CC        csctapi/ifd_drecas.c
CC        csctapi/ifd_sc8in1.c
CC        csctapi/ifd_sci.c
CC        csctapi/ifd_smargo.c
CC        csctapi/ifd_smartreader.c
CC        csctapi/ifd_stinger.c
CC        minilzo/minilzo.c
CC        module-anticasc.c
CC        module-cacheex.c
CC        module-camd35-cacheex.c
CC        module-camd35.c
CC        module-cccam-cacheex.c
CC        module-cccam.c
CC        module-cccshare.c
CC        module-constcw.c
CC        module-csp.c
CC        module-cw-cycle-check.c
CC        module-dvbapi-chancache.c
CC        module-dvbapi.c
CC        module-gbox-helper.c
CC        module-gbox-sms.c
CC        module-gbox-cards.c
CC        module-gbox.c
CC        module-ird-guess.c
CC        module-monitor.c
CC        module-newcamd.c
CC        module-newcamd-des.c
CC        module-pandora.c
CC        module-ghttp.c
CC        module-radegast.c
CC        module-scam.c
CC        module-serial.c
CC        module-stat.c
CC        module-webif-lib.c
CC        module-webif-tpl.c
CC        module-webif.c
CC        webif/pages.c
CC        reader-common.c
CC        reader-bulcrypt.c
CC        reader-conax.c
CC        reader-cryptoworks.c
CC        reader-dgcrypt.c
CC        reader-dre.c
CC        reader-dre-cas.c
CC        reader-dre-common.c
CC        reader-dre-st20.c
CC        reader-griffin.c
CC        reader-irdeto.c
CC        reader-nagra.c
CC        reader-seca.c
CC        reader-tongfang.c
CC        reader-viaccess.c
CC        reader-videoguard-common.c
CC        reader-videoguard1.c
CC        reader-videoguard12.c
CC        reader-videoguard2.c
CC        oscam-aes.c
CC        oscam-array.c
CC        oscam-hashtable.c
CC        oscam-cache.c
CC        oscam-chk.c
CC        oscam-client.c
CC        oscam-conf.c
CC        oscam-conf-chk.c
CC        oscam-conf-mk.c
CC        oscam-config-account.c
CC        oscam-config-global.c
CC        oscam-config-reader.c
CC        oscam-config.c
CC        oscam-ecm.c
CC        oscam-emm.c
CC        oscam-emm-cache.c
CC        oscam-failban.c
CC        oscam-files.c
CC        oscam-garbage.c
CC        oscam-lock.c
CC        oscam-log.c
CC        oscam-log-reader.c
CC        oscam-net.c
CC        oscam-llist.c
CC        oscam-reader.c
CC        oscam-simples.c
CC        oscam-string.c
CC        oscam-time.c
CC        oscam-work.c
CC        oscam.c
CONF        build/arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc/config.c
LINK        Distribution/oscam-1.20-unstable_svn0-arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc.debug
build/arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc/oscam-net.o: In function `cs_getIPfromHost':
/home/wbh/oscam-svn/oscam-net.c:186: warning: gethostbyname is obsolescent, use getnameinfo() instead.
STRIP        Distribution/oscam-1.20-unstable_svn0-arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc
BUILD        Distribution/list_smargo-1.20-unstable_svn0-arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/arm-openwrt-linux-uclibcgnueabi/bin/../../../toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib/libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-12-30 16:15 | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-12-31 00:25 | 显示全部楼层
我的交叉编译完成后,有如下2个警告。会有问题吗?会影响到oscam主程序在路由器的运行吗?请大侠们指导!!!

CONF        build/arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc/config.c
LINK        Distribution/oscam-1.20-unstable_svn0-arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc.debug
build/arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc/oscam-net.o: In function `cs_getIPfromHost':
/home/wbh/oscam-svn/oscam-net.c:186: warning: gethostbyname is obsolescent, use getnameinfo() instead.
STRIP        Distribution/oscam-1.20-unstable_svn0-arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc
BUILD        Distribution/list_smargo-1.20-unstable_svn0-arm-openwrt-linux-uclibcgnueabi-ssl-libusb-pcsc
/opt/cross/OpenWrt-SDK-15.05.1-mvebu_gcc-4.8-linaro_uClibc-0.9.33.2_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/arm-openwrt-linux-uclibcgnueabi/bin/../../../toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib/libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-12-31 10:49 来自手机 | 显示全部楼层
既然已经有输出文件,那就直接放在路由器上测试撒。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-20 08:59

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表