ShanQincheng / jmuSupplicant

适用于集美大学的第三方锐捷认证客户端
Apache License 2.0
41 stars 21 forks source link

最近买了一个J1900的小pc当路由,用openwrt #4

Closed ottilis closed 4 years ago

ottilis commented 5 years ago

要用校园网,不会编译mentohust,大侠能否帮忙编译一个通用的? 我之前刷的大水牛的现在还用,估计锐捷低版本就可以。 就是想把ipv6传到内网。

nature2608 commented 5 years ago

找x86版本的就可以了,恩山挺多的,以前编译过,没用软路由了,删掉了。

ottilis commented 5 years ago

我是直接用u盘运行的,四口。找过,没找见。我也试图编译,但不得要领。我几乎把所有的mentohust的源都试过,包括minieap都编译不成功,要是成了,放进路由说是找不见。 你这个源我也试着编译过,说是, environment variable "staging_dir" not defined. as.bin。外行的,走不下去了。

nature2608 commented 5 years ago

你是交叉编译的话提示找不到是架构不对 ,也就是交叉编译环境没弄好。你可以直接找lean的源码,加ptpt52里面的mentohust makefile 那样就可以保证编译出你想要功能的整个固件或者单个ipk。

ottilis commented 5 years ago

谢谢楼上,我不是学计算机的,你说的我都不懂,这些知识多半是临时学来。这个jmu的使用DCMAKE,环境设置也搞不懂。

还一个问题,我刚才在这里http://www.openwrt.org.cn/bbs/thread-8860-1-1.html下了一个mentohust_0.3.1-1_x86.ipk安装,结果安装报错:

root@OpenWrt:~# opkg install /tmp/mentohust.ipk Unknown package 'mentohust'. Collected errors:

我现在怀疑,Intel(R) Celeron(R) CPU J1900 @ 1.99GHz究竟是什么构架,有人说是atom,但我们都当成x86_64来用,openwrt用的也是x64的,运行得好好的。这里就有个问题了,在交叉编译时,host参数究竟怎么设置,我是设置成:

PATH=$PATH:/home/wist/openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/bin export PATH STAGING_DIR=/home/wist/openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/staging_dir/toolchain-x86_64_gcc-7.3.0_musl export STAGING_DIR

然后,./autogen.sh 再

./configure --build=x86_64-pc-linux-gnu -host=x86_64-openwrt-linux-uclibc --disable-nls --disable-arp --disable-notify --with-pcap=/home/wist/libpcap-1.9.0/libpcap.a

之后make

大侠看看是否有问题。toolchain用的就是电脑运行的openwrt的,host也是用了x86_64。 刚刚安装的ipk说是x86的,但构架却又不符,令人纳闷。j1900不知怎么弄。

下面是j1900运行openwrt的系统信息:

系统 主机名 OpenWrt 主机型号 To be filled by O.E.M. To be filled by O.E.M. 架构 Intel(R) Celeron(R) CPU J1900 @ 1.99GHz 固件版本 OpenWrt 18.06.1 r7258-5eb055306f / LuCI openwrt-18.06 branch (git-18.228.31946-f64b152) 内核版本 4.14.63 本地时间 Sat Jan 12 02:57:32 2019

ottilis commented 5 years ago

这里是内核日志的一些片段 内核日志 [ 0.000000] Linux version 4.14.63 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7102-3f3a2c9)) #0 SMP Wed Aug 15 20:42:39 2018 [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz root=PARTUUID=cbad8a62-02 rootfstype=ext4 rootwait console=tty0 console=ttyS0,115200n8 noinitrd [ 0.000000] x86/fpu: x87 FPU will use FXSAVE [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000008d7ff] usable [ 0.000000] BIOS-e820: [mem 0x000000000008d800-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001effffff] usable [ 0.000000] BIOS-e820: [mem 0x000000001f000000-0x000000001f0fffff] reserved [ 0.000000] BIOS-e820: [mem 0x000000001f100000-0x000000001fffffff] usable [ 0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000200fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000020100000-0x00000000b9360fff] usable [ 0.000000] BIOS-e820: [mem 0x00000000b9361000-0x00000000b9390fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000b9391000-0x00000000b93a0fff] ACPI data [ 0.000000] BIOS-e820: [mem 0x00000000b93a1000-0x00000000b98b5fff] ACPI NVS

[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] SMBIOS 2.8 present. [ 0.000000] DMI: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 08/31/2018 [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0x140000 max_arch_pfn = 0x400000000 [ 0.000000] MTRR default type: uncachable [ 0.000000] MTRR fixed ranges enabled: [ 0.000000] 00000-9FFFF write-back [ 0.000000] A0000-BFFFF uncachable

[ 0.000000] 5 base 100000000 mask FC0000000 write-back [ 0.000000] 6 disabled [ 0.000000] 7 disabled [ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000000] e820: update [mem 0xba800000-0xffffffff] usable ==> reserved [ 0.000000] e820: last_pfn = 0xba000 max_arch_pfn = 0x400000000 [ 0.000000] found SMP MP-table at [mem 0x000fd850-0x000fd85f] mapped at [ffffffffff400850] [ 0.000000] Base memory trampoline at [ffff880000087000] 87000 size 24576 [ 0.000000] BRK [0x01e07000, 0x01e07fff] PGTABLE [ 0.000000] BRK [0x01e08000, 0x01e08fff] PGTABLE [ 0.000000] BRK [0x01e09000, 0x01e09fff] PGTABLE [ 0.000000] BRK [0x01e0a000, 0x01e0afff] PGTABLE [ 0.000000] BRK [0x01e0b000, 0x01e0bfff] PGTABLE [ 0.000000] BRK [0x01e0c000, 0x01e0cfff] PGTABLE [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F0540 000024 (v02 ALASKA) [ 0.000000] ACPI: XSDT 0x00000000B9395078 000074 (v01 ALASKA A M I 01072009 AMI 00010013) [ 0.000000] ACPI: FACP 0x00000000B939FEE8 00010C (v05 ALASKA A M I 01072009 AMI 00010013) [ 0.000000] ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 128/32 (20170728/tbfadt-603) [ 0.000000] ACPI: DSDT 0x00000000B9395180 00AD64 (v02 ALASKA A M I 01072009 INTL 20120913) [ 0.000000] ACPI: FACS 0x00000000B98B5F80 000040

[ 0.031767] Spectre V2 : Enabling Restricted Speculation for firmware calls [ 0.032322] Freeing SMP alternatives memory: 28K [ 0.040113] smpboot: Max logical packages: 1 [ 0.041179] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0 [ 0.144303] TSC deadline timer enabled [ 0.144306] smpboot: CPU0: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz (family: 0x6, model: 0x37, stepping: 0x9) [ 0.145123] Performance Events: PEBS fmt2+, 8-deep LBR, Silvermont events, 8-deep LBR, full-width counters, Intel PMU driver. [ 0.145880] ... version: 3 [ 0.146195] ... bit width: 40 [ 0.146513] ... generic registers: 2 [ 0.146828] ... value mask: 000000ffffffffff

nature2608 commented 5 years ago

你应该按照教程的环境变量来设置,不过说实话用这种方法我也没有编译出来。无法安装可能是你固件用的musl而ipk用的是uclibc。如果你在win上验证过普通的mentohust可以进行认证那么建议用源码进行编译,用makefile会方便得多。有问题也可以加我qq260821425 一起探讨。主要是固件删掉了没法发给你测试。koolshare固件带minieap。

ottilis commented 5 years ago

我们是教工组,锐捷验证古老的版本都能通过。现在用的路由很老的buffalo whr-g300n v2,刷的google code下的固件,mentohust应该是原版的(十几年前的),还很好用。电脑上windows,用google code下载的MentoHUST W2_4也很好用,也就是原版的都能用。

在openwrt上,最早用win hyper-v虚拟的koolshare lede,我就安装了minieap,能启动,但隔着虚拟机,没验证成功。

现在我直接下载了原版的x64的 openwrt 18.6刻u盘启动运行,也就是前面的数据。我把koolshare那里的minieap拷过来了,可以启动,但没验证成功过。有些诡异。按理koolshare编译的minieap应该可靠的。

我加您qq

ottilis commented 5 years ago

多谢大侠的帮忙,现在ipv6也好了,只是也受限,最后在万能的github找到了ipv6的hosts,至此一切很OK了。