宽带技术网

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: songee

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

[复制链接]
 楼主| 发表于 2020-6-15 18:36:18 | 显示全部楼层
ktav 发表于 2020-6-1 15:08( S' u1 w! k& q/ j" L
这个就牛了。。。8145V5可以这样改吗

4 `+ K& x5 W, x8145的cpu架构是满足要求的,如果V5固件有lxc-start等lxc程序,那就完全可以按帖子的思路改了;一般来说,系统有saf或saf-huawei等程序,固件就会有lxc。
发表于 2020-9-3 23:02:59 | 显示全部楼层
本帖最后由 大茶几 于 2020-9-5 18:19 编辑 % q! `0 [, _: Y! w# ^% u7 ?1 y$ h
  1.       lxc-start 1599145069.560 INFO     lxc_start_ui - lxc_start.c:main:265 - using rcfile /usr/var/lib/lxc/openwrt/config
    ) C" R5 n7 t  {; H. T: ^
  2.       lxc-start 1599145069.561 WARN     lxc_confile - confile.c:config_personality:989 - unsupported personality 'arm'# b( U" P+ t4 U$ E/ U
  3.       lxc-start 1599145069.561 WARN     lxc_log - log.c:lxc_log_init:316 - lxc_log_init called with log already initialized, C! x& r) |6 I' ?
  4.       lxc-start 1599145069.562 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup blkio unknown to /usr/var/lib/lxc openwrt
    + E/ D& ?4 M) y# s% |
  5.       lxc-start 1599145069.562 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpu unknown to /usr/var/lib/lxc openwrt
    ! I8 a' P6 i3 c/ j- d
  6.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuacct unknown to /usr/var/lib/lxc openwrt+ ~9 J6 A: N( S% i  f
  7.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuset unknown to /usr/var/lib/lxc openwrt1 T# i  _) ]( C; {: D8 B/ }1 q, c) d
  8.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup devices unknown to /usr/var/lib/lxc openwrt. s4 D2 \8 Z5 X$ s% J6 `) T) k$ `7 {
  9.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup freezer unknown to /usr/var/lib/lxc openwrt( R" y3 W6 ~) T' G. r, ~& v3 ~
  10.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup memory unknown to /usr/var/lib/lxc openwrt
      q$ u7 _+ _  u; o: r0 X5 D. y) O
  11.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup net_cls unknown to /usr/var/lib/lxc openwrt7 A: N( [0 y* c2 }" t3 C
  12.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup net_prio unknown to /usr/var/lib/lxc openwrt
    # K' K8 }3 ?. \7 T& a/ R
  13.       lxc-start 1599145069.563 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup perf_event unknown to /usr/var/lib/lxc openwrt: K4 J$ u5 V' A! b9 c* `* @4 G
  14.       lxc-start 1599145069.565 INFO     lxc_start - start.c:lxc_check_inherited:209 - closed inherited fd 4; l0 H: M% D8 V
  15.       lxc-start 1599145069.575 INFO     lxc_conf - conf.c:run_script_argv:350 - Executing script '/usr/var/lib/lxc/openwrt/pre-start.sh' for container 'openwrt', config section 'lxc'
    ) U' @7 k& z1 C8 Q6 U, `9 N
  16.       lxc-start 1599145069.596 INFO     lxc_start - start.c:lxc_check_inherited:209 - closed inherited fd 4( y# @: N* g& b0 {
  17.       lxc-start 1599145069.613 INFO     lxc_monitor - monitor.c:lxc_monitor_sock_name:177 - using monitor sock name lxc/8518417411765f46//usr/var/lib/lxc. P4 \( R1 C, V* l: V
  18.       lxc-start 1599145069.635 DEBUG    lxc_conf - conf.c:lxc_create_tty:3666 - allocated pty '/dev/pts/0' (5/6)1 J  w  B- d2 x1 d
  19.       lxc-start 1599145069.635 INFO     lxc_conf - conf.c:lxc_create_tty:3677 - tty's configured1 |+ L( ^5 g9 @$ L8 u: v; z, J
  20.       lxc-start 1599145069.635 DEBUG    lxc_start - start.c:setup_signal_fd:247 - sigchild handler set& ]6 v" P# Q% p) T2 y
  21.       lxc-start 1599145069.635 DEBUG    lxc_console - console.c:lxc_console_peer_default:536 - no console peer0 Y* y0 J. d1 [6 D9 u# u
  22.       lxc-start 1599145069.635 INFO     lxc_start - start.c:lxc_init:443 - 'openwrt' is initialized
    6 m7 y+ M* C" d! h% }! w! u# \
  23.       lxc-start 1599145069.636 DEBUG    lxc_start - start.c:__lxc_start:1059 - Not dropping cap_sys_boot or watching utmp
    $ }4 ^  p+ T6 }. o& G$ o
  24.       lxc-start 1599145069.637 INFO     lxc_cgroup - cgroup.c:cgroup_init:62 - cgroup driver cgroupfs initing for openwrt
    4 k# b- }  z7 K5 u
  25.       lxc-start 1599145069.639 INFO     lxc_start - start.c:lxc_spawn:891 - clone_flags:0x2c0200004 t# T3 o, u# ^- F: s# d
  26.       lxc-start 1599145069.642 ERROR    lxc_cgfs - cgfs.c:lxc_cgroupfs_enter:1163 - Invalid argument - Could not add pid 1775 to cgroup /lxc/openwrt: internal error2 e$ A: S( W" \0 S
  27.       lxc-start 1599145069.643 ERROR    lxc_start - start.c:__lxc_start:1081 - failed to spawn 'openwrt'
    8 P) Z: s5 T6 {2 t" {! p: f
  28.       lxc-start 1599145069.648 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response
    # |, O) k, G6 v7 [9 M6 h
  29.       lxc-start 1599145069.648 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup blkio unknown to /usr/var/lib/lxc openwrt; e; Q* Q' t; z7 l1 S1 c( j
  30.       lxc-start 1599145069.648 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpu unknown to /usr/var/lib/lxc openwrt5 D( S( i& o! p& X3 m9 `# I3 l8 B
  31.       lxc-start 1599145069.648 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuacct unknown to /usr/var/lib/lxc openwrt
    + x8 q6 K9 C, p4 U8 }. h
  32.       lxc-start 1599145069.648 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuset unknown to /usr/var/lib/lxc openwrt
    6 ~& U# b- T* _- b1 j# \- j1 R- E6 k
  33.       lxc-start 1599145069.648 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup devices unknown to /usr/var/lib/lxc openwrt
    + D. h& n, b6 @: W& x: D9 p
  34.       lxc-start 1599145069.648 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup freezer unknown to /usr/var/lib/lxc openwrt/ i. [; F3 o5 u' g! b$ {& E
  35.       lxc-start 1599145069.649 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup memory unknown to /usr/var/lib/lxc openwrt
    8 \% t3 }1 p  x6 l- p8 I. t9 X
  36.       lxc-start 1599145069.649 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup net_cls unknown to /usr/var/lib/lxc openwrt+ p7 p9 k4 U2 c- Y/ q
  37.       lxc-start 1599145069.649 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup net_prio unknown to /usr/var/lib/lxc openwrt, w9 T* g' Y( T- r/ r
  38.       lxc-start 1599145069.649 WARN     lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup perf_event unknown to /usr/var/lib/lxc openwrt3 b2 f0 H6 E" ?% C/ z& d
  39.       lxc-start 1599145074.660 ERROR    lxc_start_ui - lxc_start.c:main:342 - The container failed to start.
    5 X0 J/ I# H. T0 a8 S* K1 x1 D
  40.       lxc-start 1599145074.660 ERROR    lxc_start_ui - lxc_start.c:main:344 - To get more details, run the container in foreground mode.
    $ C9 z: I# F* y2 E6 \
  41.       lxc-start 1599145074.660 ERROR    lxc_start_ui - lxc_start.c:main:346 - Additional information can be obtained by setting the --logfile and --logpriority options.; p% }' S: `. m2 P  ~
复制代码

( a2 }" g# U0 t6 H1 v6 _F450 V2报错了
& S3 C1 C0 @/ K& k- [) i6 Xhttps://github.com/mikma/lxd-openwrt1 U! b( ?6 c' T3 n3 v
似乎添加了aarch32架构
) o6 x  U' C+ I' F) A但是我编译报错了7 ~/ y& ]% f4 o& e7 z" \
  J7 g4 q- m+ j" x
所以启动容器的引导是放在initrd里的?" G5 I8 E& k& p

点评

OpenWrt官方aarch32架构编译的程序在F650A上是无法正常运行的,实测只有bcm53xx的可以。 LXC容器启动,我借用了saf。saf在主系统启动完成后会被关联运行(唤醒方式未知,但不是init.d),因而我将LXC的启动脚本命名  详情 回复 发表于 2021-5-5 00:49
__nmsl__ 该用户已被删除
发表于 2021-1-22 16:47:16 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
山东吴彦祖 该用户已被删除
发表于 2021-2-24 20:51:02 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
山东吴彦祖 该用户已被删除
发表于 2021-2-24 20:56:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2021-2-25 08:50:14 | 显示全部楼层
最好能搞个hs8145v5或8145x6的教程,这么有深度的帖子很难见到了,能添加功能到光猫可玩性就高多了。
发表于 2021-2-25 08:54:31 | 显示全部楼层
本帖最后由 xiaowang325 于 2021-2-25 09:06 编辑
- y  b% F: Q5 h. G* V5 T
山东吴彦祖 发表于 2021-2-24 20:564 _: G- g5 u9 y
另外F650没有A似乎不需要移动saf-zte,移动后openwrt容器是根本起不来的
. S7 z3 X( c- _2 K0 W% C  _6 u
我也是F650(ZX279127 单核 256M内存),里面是守护启动的是叫saf,不管起不起动原来的容器,openwrt容器就是起不来。我又去弄来个F450A,这个就和帖子作者一样的CPU了,不过守护启动的叫saf-zte,同样openwrt容器起不来,报错都一样,只提示了启动失败。看不出为啥。朋友有什么好的建议吗?
& H5 m: O$ q- D) u附报错日志/usr/var/lib/lxc/openwrt # lxc-start -dn openwrt+ @8 _' B' b# [8 z
lxc-start: lxc_start.c: main: 342 The container failed to start.
( g# E) L1 Q! F8 G8 V; hlxc-start: lxc_start.c: main: 344 To get more details, run the container in foreground mode.
4 Z' r* M/ d  s/ d1 v6 G* z( Hlxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.! \, m( x4 I& f& v: e6 X) o- @* ~
/usr/var/lib/lxc/openwrt # lxc-start -dn openwrt -F
- o. _7 l4 B1 zlxc-start: cgfs.c: lxc_cgroupfs_enter: 1163 Invalid argument - Could not add pid 29182 to cgroup /lxc/openwrt: internal error
7 [+ c3 n. u8 M* t. d8 [lxc-start: start.c: __lxc_start: 1081 failed to spawn 'openwrt': @; t5 V( L) i1 |) y  ?
lxc-start: lxc_start.c: main: 342 The container failed to start.
# @8 {: S6 ~0 O8 Y$ S. q6 Ilxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.
' q+ ]% n- I' u6 o8 {
) n# i' |7 ~; t! E5 W' L
山东吴彦祖 该用户已被删除
发表于 2021-2-25 14:08:54 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2021-2-26 14:25:49 | 显示全部楼层
谢谢楼主无私分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

粤公网安备 44152102000001号

GMT+8, 2023-1-28 07:45 , Processed in 0.102582 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2023 Tencent Cloud.

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