找回密码
 注册

QQ登录

只需一步,快速开始

楼主: songee

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

  [复制链接]
发表于 2022-2-5 19:21:34 | 显示全部楼层
songee 发表于 2022-2-4 23:48, q& k+ U* d4 C, u- m7 o
这篇帖子只是为了分享DIY的思路,我个人并不推荐使用非可信来源的固件,主贴附件也只是个参考。 ...

/ M5 D- l( o. ^5 P华为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:213 g0 a8 g! h5 o) b! a; ]2 z4 ?
华为B650好像也挂载了这个东西。但是256的内存有点不够用了。

4 M: A. o4 ]) U+ t8 R$ \2 QB650是企业级,CPU性能足够用,看拆机说的是ARM A9架构,那应该跟bcm53xx是一样的。256M的DDR确实不大宽裕,想运行OpenWrt可能需要把电信定制的那个saf停掉,是否会影响原系统功能就得试一下了。
 楼主| 发表于 2022-4-27 23:10:13 | 显示全部楼层
因光猫原系统的busybox功能不完整,也没有nano和dropbear,调试lxc可能会不方便,现分享出来。
# O' w( r' D& T6 o! Q6 j  q
: t! d& i" h# S$ b5 O1 V5 k
  1. root@F650A:~ # /usr/bin/busybox
    * P. {6 S  H) b0 f; ^6 G# m
  2. BusyBox v1.23.2 (2020-06-16 16:53:26 CST) multi-call binary.4 x# s& o- e/ U# i) I% j! M
  3. BusyBox is copyrighted by many authors between 1998-2012.  Y' X2 G# X! Y# `" k4 }
  4. Licensed under GPLv2. See source distribution for detailed# e: ]* `/ D1 u
  5. copyright notices.
    / L  L5 e& @9 @
  6. ) d; p+ E4 z, N+ S1 B) m
  7. Usage: busybox [function [arguments]...]; F$ g) ^' L  B8 a5 V9 h* u
  8.    or: busybox --list[-full]4 q. ]. K' F6 z
  9.    or: busybox --install [-s] [DIR]
    . B2 l; B; J3 d2 j- y
  10.    or: function [arguments]...
    ; N1 f% B% I3 Z8 `! u

  11. - R* @/ R) _6 Z6 J- B  i/ S, I7 P# ]
  12.         BusyBox is a multi-call binary that combines many common Unix3 B. i) {% r% e- H+ L
  13.         utilities into a single executable.  Most people will create a! u. _  T3 ^0 ^8 `# @0 T
  14.         link to busybox for each function they wish to use and BusyBox& o& o. Y3 c8 W2 x2 w' G$ T$ H# n+ y
  15.         will act like whatever it was invoked as./ p9 v, ^. ]: b. X
  16. 0 B8 R+ v3 v" E$ G0 G+ S( J8 x1 {! o8 n) c
  17. Currently defined functions:& `: F* g& h) @3 t
  18.         [, [[, addgroup, adduser, ar, arp, arping, ash, awk, basename, blkid, brctl, bunzip2,2 g2 n* I+ ?+ {) s. }; W* l- y; r
  19.         bzcat, cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, cp,
    . o  H, |3 D4 A5 Z; g; p, t
  20.         cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,
    " {& h8 m. }( c' i
  21.         diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env,
    " z5 w$ A- e, a1 x% P5 I
  22.         ether-wake, expr, false, fbset, fdflush, fdformat, fdisk, fgrep, find, flock, fold, free,
    1 \( a% @* B9 {  Y/ N
  23.         freeramdisk, fsck, fstrim, fuser, getopt, getty, grep, gunzip, gzip, halt, hdparm, head,8 `$ q0 f9 W0 K( T
  24.         hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
    5 `! W; \+ D6 T
  25.         install, ip, ipaddr, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kill, killall,; B% Z6 ~. _' |/ x
  26.         killall5, klogd, last, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger,
    9 S2 c9 k% S9 s
  27.         login, logname, losetup, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat, lzma, makedevs,
    $ X. L6 j- {3 i# p
  28.         md5sum, mdev, mesg, microcom, mkdir, mke2fs, mkfifo, mkfs.ext2, mknod, mkswap, mktemp,
    ' r$ f" G: k4 V  h- ?+ V  ]
  29.         modinfo, modprobe, more, mount, mountpoint, mt, mv, nameif, nanddump, nandwrite, netstat,7 E$ L* W+ \# m$ l, p" ~
  30.         nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, pipe_progress, pivot_root,- [0 m( b7 e) h6 g$ }7 |* j! V
  31.         poweroff, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot,' e/ z9 s4 r. T3 I; X8 b* q
  32.         renice, reset, resize, rm, rmdir, rmmod, route, run-parts, runlevel, sed, seq, setarch,
    ; l5 u& k, b. x3 ]7 ?) @' J
  33.         setconsole, setkeycodes, setlogcons, setserial, setsid, sh, sha1sum, sha256sum, sha3sum,
    " c% t2 G+ `8 M
  34.         sha512sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon,
    % |8 X' H! {. ~5 R, m
  35.         switch_root, sync, sysctl, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, time, top,
    0 f  N! e/ p7 H# l7 [
  36.         touch, tr, traceroute, traceroute6, true, tty, ubiattach, ubidetach, ubimkvol, ubirmvol,
      U$ h1 i; e: G3 M: P; v( D
  37.         ubirsvol, ubiupdatevol, udhcpc, umount, uname, uniq, unix2dos, unlink, unlzma, unxz, unzip,5 K! H- h0 ~* F, J
  38.         uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which,1 p! T* q: K% ?; p$ a- \
  39.         who, whoami, xargs, xz, xzcat, yes, zcat, L4 K! S, o; S' s7 m( u
  40. 7 s& X" {! G; N" w- E
复制代码
  1. root@F650A:~ # nano -h: {) O0 S  v4 p  Q1 U
  2. Usage: nano [OPTIONS] [[+LINE,COLUMN] FILE]...
    * S7 u& ^) h" q+ @$ s  T

  3. ' \7 Y# t& g) U- p& |5 P
  4. Option          GNU long option         Meaning
    2 S  H$ D( b" x& }
  5. +LINE,COLUMN                           Start at line LINE, column COLUMN' }( }( H3 O3 I9 E3 p
  6. -D             --boldtext              Use bold instead of reverse video text
    ) N; Y/ }6 L" u9 h6 [. g- `% S6 L
  7. -K             --rebindkeypad          Fix numeric keypad key confusion problem
    ! s2 u# ?( ]! `' q7 J, g# M
  8. -L             --nonewlines            Don't add newlines to the ends of files
    , Z6 K& C2 i" T( B
  9. -O             --morespace             Use one more line for editing
    ) n' ?# [1 b- @, d8 s; O: m
  10. -R             --restricted            Restricted mode( ~% a6 {  k7 u- _5 I
  11. -T <#cols>     --tabsize=<#cols>       Set width of a tab to #cols columns4 @' k& |# C8 _; ^  P$ K. `
  12. -V             --version               Print version information and exit) P. q4 h3 m6 F0 v5 L
  13. -c             --const                 Constantly show cursor position
    4 Z" U$ H& n( y
  14. -d             --rebinddelete          Fix Backspace/Delete confusion problem/ d# [' V0 ]. K' g; A
  15. -h             --help                  Show this help text
    3 M% b5 J. n1 X7 G0 j
  16. -l             --nofollow              Don't follow symbolic links, overwrite, n2 n  C8 W) W
  17. -n             --noread                Do not read the file (only write it)6 S) }1 D& }0 a& q5 T
  18. -p             --preserve              Preserve XON (^Q) and XOFF (^S) keys
    0 D7 V8 c" w" q
  19. -t             --tempfile              Auto save on exit, don't prompt7 O& ^$ A9 G2 A
  20. -v             --view                  View mode (read-only)# u) a" o: r: {! W) {
  21. -x             --nohelp                Don't show the two help lines
    5 i) E8 ^+ D( X  B  h( r' F! k! _9 q
  22. -z             --suspend               Enable suspension
    $ i7 Q, J% X" d% b; p% _6 Z
  23. root@F650A:~ # nano -V
    * r6 @- `- ?2 }+ v' D% F) V* y
  24. GNU nano, version 2.4.2
    / n2 t2 E% n& h4 ^
  25. (C) 1999..2015 Free Software Foundation, Inc.* y: Y# M4 K' l" X- ?
  26. Email: nano@nano-editor.org    Web: http://www.nano-editor.org/
    3 F  E6 q9 g. S8 ^9 \; I8 ~
  27. Compiled options: --enable-tiny --disable-utf8
    7 B9 C7 {; ~) R. ~4 `$ u
复制代码
  1. root@F650A:~ # dropbear -h) e: D8 v# i& |8 R1 y* A: k1 M' I
  2. Dropbear server v2015.67 https://matt.ucc.asn.au/dropbear/dropbear.html
    ) l- X) B$ f! \
  3. Usage: dropbear [options]
    - t# Y5 ?+ x) g: [
  4. -b bannerfile   Display the contents of bannerfile before user login$ U# M6 O0 S- G6 L
  5.                 (default: none)1 Q6 L) Q  s! F
  6. -r keyfile  Specify hostkeys (repeatable)
    ( }2 x( @$ n; e
  7.                 defaults:) |) o! j7 C! }$ S8 D6 R
  8.                 dss /etc/dropbear/dropbear_dss_host_key) x  S0 F) `- B0 L" h" j4 l
  9.                 rsa /etc/dropbear/dropbear_rsa_host_key! E, a2 C" Z; T  w5 g+ x
  10.                 ecdsa /etc/dropbear/dropbear_ecdsa_host_key
    : j( v8 e# [9 F- F3 X# o
  11. -R              Create hostkeys as required
    0 u' e, ]: y" R# Q: Q; h; n
  12. -F              Don't fork into background
    ( S/ i# S8 l- F, w2 ?4 T% \% W
  13. -E              Log to stderr rather than syslog
    * I7 L; E2 d; I0 v, e! A8 O) S
  14. -m              Don't display the motd on login: v+ B5 X- S" ?: T% @! B5 C
  15. -w              Disallow root logins
    6 t! l9 V! F7 o( R3 A! c1 _
  16. -s              Disable password logins
    # `" l0 w1 k7 [# z
  17. -g              Disable password logins for root
      {9 p* b7 E; [" S0 `- A
  18. -B              Allow blank password logins
    2 M/ O0 k" S. z- X
  19. -j              Disable local port forwarding
    # P9 ^+ b7 I( @7 _+ J
  20. -k              Disable remote port forwarding
    ( T/ |" Y: }  y. ~! d+ R, f
  21. -a              Allow connections to forwarded ports from any host
    , r- v+ n7 X# Y  ?: w8 X# d
  22. -p [address:]port
    ( |5 [! Y8 {2 i5 H% h. L
  23.                 Listen on specified tcp port (and optionally address),
    / z7 i& Z! K$ O' O7 ]$ }8 y& u
  24.                 up to 10 can be specified( w7 f) _2 H9 ^/ O' o, n: q
  25.                 (default port is 22 if none specified)
    7 [( Y( \4 O9 B
  26. -P PidFile      Create pid file PidFile% Y* |& E  z& f( p3 c+ f
  27.                 (default /var/run/dropbear.pid)
    # i" @) s% T% L
  28. -i              Start for inetd" B. n) M& L* c# L; s! U$ u
  29. -W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
    1 q1 P: s. v& j! s+ s
  30. -K <keepalive>  (0 is never, default 0, in seconds)
    $ R9 {0 J% b( b$ E" s* g+ R( M5 T
  31. -I <idle_timeout>  (0 is never, default 0, in seconds)
    , {- j/ H$ q3 I6 h% N% _  ]
  32. -V    Version! C% I$ e+ p- U2 `3 C5 L
复制代码
- |6 R8 I# O8 h. R' q# ~5 z1 T5 Z3 t
6 N+ K, A; J+ w; q7 ~" n

本帖子中包含更多资源

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

×
发表于 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-28 15:54 , Processed in 0.027100 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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