找回密码
 注册

QQ登录

只需一步,快速开始

楼主: songee

F650/450、8145、K662等ARM平台,LXC容器内运行OpenWRT子系统

  [复制链接]
发表于 2022-2-5 19:21:34 | 显示全部楼层
songee 发表于 2022-2-4 23:48
$ H2 Z8 X5 _& g. ?  [; Q这篇帖子只是为了分享DIY的思路,我个人并不推荐使用非可信来源的固件,主贴附件也只是个参考。 ...
/ g. \3 O' p, b
华为B650好像也挂载了这个东西。但是256的内存有点不够用了。

点评

B650是企业级,CPU性能足够用,看拆机说的是ARM A9架构,那应该跟bcm53xx是一样的。256M的DDR确实不大宽裕,想运行OpenWrt可能需要把电信定制的那个saf停掉,是否会影响原系统功能就得试一下了。  详情 回复 发表于 2022-4-17 02:51
 楼主| 发表于 2022-4-17 02:51:23 | 显示全部楼层
hj.lee 发表于 2022-2-5 19:21
- z+ p8 M% h# }. ~) D- _华为B650好像也挂载了这个东西。但是256的内存有点不够用了。

$ O; ~7 y  c0 t4 A4 d, JB650是企业级,CPU性能足够用,看拆机说的是ARM A9架构,那应该跟bcm53xx是一样的。256M的DDR确实不大宽裕,想运行OpenWrt可能需要把电信定制的那个saf停掉,是否会影响原系统功能就得试一下了。
 楼主| 发表于 2022-4-27 23:10:13 | 显示全部楼层
因光猫原系统的busybox功能不完整,也没有nano和dropbear,调试lxc可能会不方便,现分享出来。
7 R, F2 w" J( `; D+ s% J2 E( g
' X$ q3 ]' s* O) N# X' i
  1. root@F650A:~ # /usr/bin/busybox5 p4 B% W5 c% C7 J3 D* v5 u
  2. BusyBox v1.23.2 (2020-06-16 16:53:26 CST) multi-call binary.
    - I4 h+ @) U# p1 t  f) o
  3. BusyBox is copyrighted by many authors between 1998-2012.4 c' f# f; H3 U
  4. Licensed under GPLv2. See source distribution for detailed7 |  |" `# Z/ z) {0 R+ d
  5. copyright notices.6 f. G; c9 }7 a- J' ?2 b" E9 ?8 T
  6. . N7 i# c3 m  Y! g
  7. Usage: busybox [function [arguments]...]
    ' T8 S8 V- ^8 i, O, z5 b  h  h
  8.    or: busybox --list[-full]# Y+ x- p. t" I( @/ e
  9.    or: busybox --install [-s] [DIR]
    8 n' q& T0 j: ~5 K' v" s4 [
  10.    or: function [arguments]...6 x7 q- K9 C  e# O  G6 N2 L% L9 @! K5 q
  11. ! F2 _" g! M. \- c/ [/ P; k1 o
  12.         BusyBox is a multi-call binary that combines many common Unix; T7 q0 q5 p8 r# o
  13.         utilities into a single executable.  Most people will create a2 ?2 m4 s+ e3 ]# n* ?4 D8 k0 X4 P6 _
  14.         link to busybox for each function they wish to use and BusyBox
    / W4 x1 x2 K* _+ _( u& {
  15.         will act like whatever it was invoked as.* B1 p% g/ \9 |, B- g' S* S/ }3 j9 Z
  16. ; R% w) P. ?/ i! B
  17. Currently defined functions:# T4 ]% L# W6 v5 P1 R7 G
  18.         [, [[, addgroup, adduser, ar, arp, arping, ash, awk, basename, blkid, brctl, bunzip2,
    - c% y' a# v: A0 J+ p
  19.         bzcat, cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, cp,
    1 ?, Z7 t% L; _) f1 H" }3 F0 a
  20.         cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,
    6 p- Y" R% Q. `) r
  21.         diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env,, U' ?! F* d8 z
  22.         ether-wake, expr, false, fbset, fdflush, fdformat, fdisk, fgrep, find, flock, fold, free,
    . c1 o1 R9 l5 s; z; O
  23.         freeramdisk, fsck, fstrim, fuser, getopt, getty, grep, gunzip, gzip, halt, hdparm, head,
    , C9 O( j# _" x, f
  24.         hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
    % e) y, |7 i* [# R5 \& k
  25.         install, ip, ipaddr, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kill, killall,2 R) d4 [& s. I( L$ u4 e# x
  26.         killall5, klogd, last, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger,
    & X9 d* N6 y. z% L
  27.         login, logname, losetup, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat, lzma, makedevs,( g5 q% K/ e0 L  p. l9 D
  28.         md5sum, mdev, mesg, microcom, mkdir, mke2fs, mkfifo, mkfs.ext2, mknod, mkswap, mktemp,
    ' O+ S* z- L. }% O9 J2 M+ f
  29.         modinfo, modprobe, more, mount, mountpoint, mt, mv, nameif, nanddump, nandwrite, netstat,9 Q& l% n: O8 k* T% k0 m9 ?% p
  30.         nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, pipe_progress, pivot_root,
    , n  W6 K* G6 F0 d' V5 ]( R1 a
  31.         poweroff, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot,
    ) m. r5 o, V  Q. Z& W/ B- @" a
  32.         renice, reset, resize, rm, rmdir, rmmod, route, run-parts, runlevel, sed, seq, setarch,+ ~3 g9 b# q2 K9 j
  33.         setconsole, setkeycodes, setlogcons, setserial, setsid, sh, sha1sum, sha256sum, sha3sum,) {: [6 S0 X8 g
  34.         sha512sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon,. y5 b2 k% d% \; U; D+ H/ q
  35.         switch_root, sync, sysctl, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, time, top,
    2 r: F( U" G/ b2 x; {
  36.         touch, tr, traceroute, traceroute6, true, tty, ubiattach, ubidetach, ubimkvol, ubirmvol,  Y/ ?: |- @  A9 e3 G
  37.         ubirsvol, ubiupdatevol, udhcpc, umount, uname, uniq, unix2dos, unlink, unlzma, unxz, unzip,; s+ a6 `! P& N. c. P9 e
  38.         uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which,
    # _4 k% Y# m& F+ H! f1 p% W
  39.         who, whoami, xargs, xz, xzcat, yes, zcat/ Q! N+ M  |' w: s8 |

  40. $ E$ n* \2 e8 K/ M3 m
复制代码
  1. root@F650A:~ # nano -h
    & I- B) w/ t: \9 y( |2 d! T- z. }
  2. Usage: nano [OPTIONS] [[+LINE,COLUMN] FILE]...: J6 O7 n2 u- O: `. @! S: u
  3. * s7 ]9 G+ d' D; x9 Z( K" Y, x+ n
  4. Option          GNU long option         Meaning* M) p# X) b( N4 b$ X
  5. +LINE,COLUMN                           Start at line LINE, column COLUMN* B; \! K$ _: I2 O$ r! }
  6. -D             --boldtext              Use bold instead of reverse video text
    7 |! |! |# U: _. n9 p
  7. -K             --rebindkeypad          Fix numeric keypad key confusion problem, g* V! V' N. I6 b% C6 j
  8. -L             --nonewlines            Don't add newlines to the ends of files
    $ D6 j8 t; a# y1 r" B/ P: E; `
  9. -O             --morespace             Use one more line for editing; |- h5 [$ \. s5 t  j
  10. -R             --restricted            Restricted mode
    ( P+ k2 n# s- ~0 Z5 ^0 r  B
  11. -T <#cols>     --tabsize=<#cols>       Set width of a tab to #cols columns* H! p% j7 g1 y0 n7 P
  12. -V             --version               Print version information and exit' U% x5 @) K7 X+ H0 m
  13. -c             --const                 Constantly show cursor position
    0 s" }% e/ s* B
  14. -d             --rebinddelete          Fix Backspace/Delete confusion problem
      Q! f2 B4 x+ `
  15. -h             --help                  Show this help text
    1 Z# z: l1 G" M* d
  16. -l             --nofollow              Don't follow symbolic links, overwrite  N% l( Y+ m- o8 z! |
  17. -n             --noread                Do not read the file (only write it)) H# ^( J7 b9 c* \7 R
  18. -p             --preserve              Preserve XON (^Q) and XOFF (^S) keys
    " u9 M" P: `6 O; s
  19. -t             --tempfile              Auto save on exit, don't prompt' B% p1 i% G& ~
  20. -v             --view                  View mode (read-only)
    7 k8 q6 m2 i8 \- \& a  W4 L
  21. -x             --nohelp                Don't show the two help lines
    9 {/ H6 ?7 W; n* C/ J! u
  22. -z             --suspend               Enable suspension
    0 d7 M8 b7 u( [6 e, z9 c- m) S
  23. root@F650A:~ # nano -V6 _6 m$ f7 i) y# L
  24. GNU nano, version 2.4.2
      b; l  ^$ o! R
  25. (C) 1999..2015 Free Software Foundation, Inc.+ d$ l5 M6 a9 G5 ?2 {( y2 J4 h5 p4 J
  26. Email: nano@nano-editor.org    Web: http://www.nano-editor.org/7 c7 R0 E( u) [* x* W3 J
  27. Compiled options: --enable-tiny --disable-utf8
    4 T0 L- Q# ~. K
复制代码
  1. root@F650A:~ # dropbear -h
    & x9 S! w( `) _4 [- x6 j- u) b" U
  2. Dropbear server v2015.67 https://matt.ucc.asn.au/dropbear/dropbear.html
    ( X. z' S4 v' _- J, a2 ]
  3. Usage: dropbear [options]
    * P/ f' Y: m3 c5 Z  o
  4. -b bannerfile   Display the contents of bannerfile before user login; m! u5 @3 U' d& S5 Q' Y# W3 ^
  5.                 (default: none)
    + _9 |5 R/ A8 d! ]
  6. -r keyfile  Specify hostkeys (repeatable)0 X! F5 t' R7 e" v
  7.                 defaults:
    ( K& M6 ?. s# t; ~% m; [# W, {* G
  8.                 dss /etc/dropbear/dropbear_dss_host_key
    9 ?1 z" [8 c) t0 P3 ^# t
  9.                 rsa /etc/dropbear/dropbear_rsa_host_key7 n; Z' Z; d; |8 q0 v% n* v
  10.                 ecdsa /etc/dropbear/dropbear_ecdsa_host_key
    ) J. C8 j, w) e2 m7 A2 {( Y* _- q
  11. -R              Create hostkeys as required
    * u7 r* O, F2 h# l
  12. -F              Don't fork into background# x* G# s# T+ Z! [  r  ?3 V
  13. -E              Log to stderr rather than syslog' x) a) R% F5 s9 K: V6 ~  |
  14. -m              Don't display the motd on login: }) G+ n) C6 [- k; D6 ?6 V
  15. -w              Disallow root logins: z7 n# q* |. E  s9 ?
  16. -s              Disable password logins: j0 E* g$ A/ y( t
  17. -g              Disable password logins for root
    5 ?+ _% ]& H' C4 A7 y7 l. e+ j
  18. -B              Allow blank password logins+ L1 c6 T6 Z' a8 w, M
  19. -j              Disable local port forwarding
    , ^: M3 ]" _) C& e6 n$ x) k3 Y
  20. -k              Disable remote port forwarding
    , H$ {. ~' H  |
  21. -a              Allow connections to forwarded ports from any host
    $ e8 {1 t) H0 L  o$ T6 C  B+ q) O
  22. -p [address:]port
    5 _! q+ b- N9 g$ O
  23.                 Listen on specified tcp port (and optionally address),9 b! ^4 `8 H  w( ]  O+ f
  24.                 up to 10 can be specified
    $ }4 r, j0 m" m! K' w' [
  25.                 (default port is 22 if none specified)
    ' }9 r* O( s9 z3 `
  26. -P PidFile      Create pid file PidFile
    * N" L" D7 ]+ e2 O
  27.                 (default /var/run/dropbear.pid)
    ' r$ d* X2 G  `$ v5 T
  28. -i              Start for inetd
    ! U+ C) H. X5 H$ b- w& {3 f, V8 M- A
  29. -W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)0 [" D; a- d7 C& A8 J8 o& S4 v
  30. -K <keepalive>  (0 is never, default 0, in seconds)( S- j5 |/ I) G
  31. -I <idle_timeout>  (0 is never, default 0, in seconds)
    % ]' O" n* F* Y8 J0 k
  32. -V    Version" s( G: F- j- c' B* P
复制代码
  G9 S+ |- U) ~9 }

- y& Y& @4 I' O+ K2 z

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2022-10-3 14:47:39 | 显示全部楼层
HN8145XR也支持吗?这么玩卡不卡啊
发表于 2022-10-21 23:07:47 | 显示全部楼层
帅呆了啊!等最近有空了就来学习操作一波!之前一直卡在要不要加一个wifi路由器的问题上了,现在意思就是直接把原来那个80端口的天翼3.0web的saf系统换成官方的openwrt对吧?

点评

这个帖子是用官方openwrt替换光猫自带的saf子系统,当然也可以共存,修改rootfs路径和openwrt的ssh与luci默认端口,别跟原有监听端口冲突就可以。  详情 回复 发表于 2022-11-29 22:36
发表于 2022-11-27 16:56:58 | 显示全部楼层
从这里学习到了好多知识!到最后终于运行起来了!
发表于 2022-11-27 17:09:41 | 显示全部楼层
我照这个刷了,发现用不了猫的网络,是需要哪里配置吗?

点评

在lxc内可以用 ip a , ip route show table all 等命令查看光猫网络。按照这个帖子操作,openwrt的luci界面是无法查看或配置网络的,感兴趣的话可以研究一下lxc的网络配置。  详情 回复 发表于 2022-11-29 22:32
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|宽带技术网 |网站地图

粤公网安备 44152102000001号

GMT+8, 2024-4-25 22:40 , Processed in 0.030217 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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