找回密码
 注册

QQ登录

只需一步,快速开始

楼主: songee

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

  [复制链接]
 楼主| 发表于 2020-6-15 18:36:18 | 显示全部楼层
ktav 发表于 2020-6-1 15:08
- c, W  Z& e- q: Y这个就牛了。。。8145V5可以这样改吗
! x( @! G* ~% I# _1 L
8145的cpu架构是满足要求的,如果V5固件有lxc-start等lxc程序,那就完全可以按帖子的思路改了;一般来说,系统有saf或saf-huawei等程序,固件就会有lxc。
发表于 2020-9-3 23:02:59 | 显示全部楼层
本帖最后由 大茶几 于 2020-9-5 18:19 编辑 % l6 M- w8 R, |* O5 F  P1 |
  1.       lxc-start 1599145069.560 INFO     lxc_start_ui - lxc_start.c:main:265 - using rcfile /usr/var/lib/lxc/openwrt/config1 j' |1 N3 ^! p" d) m8 O3 [8 {
  2.       lxc-start 1599145069.561 WARN     lxc_confile - confile.c:config_personality:989 - unsupported personality 'arm'' f9 s% J9 N  S3 Q7 Z
  3.       lxc-start 1599145069.561 WARN     lxc_log - log.c:lxc_log_init:316 - lxc_log_init called with log already initialized
    8 M2 h# j; L0 Y" F( H! [
  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 openwrt0 O. \& C4 w: q: \
  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
    # R; V1 l/ Z% k' l4 @$ B' l
  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/ F7 F4 q' `. o0 W
  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 openwrt
    # J# Q, p$ g/ k& \$ w
  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& z' R+ B9 U$ W% k% o' ^
  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
    6 v, h& _* Z- ~! ~* ~0 e
  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
    $ `: C2 g' K1 P/ L" R* T# n
  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 openwrt
    ; a$ M0 w1 \$ |5 d
  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$ v* e- L6 Z, h$ H) F7 `9 z
  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 openwrt9 `' i3 P6 y/ b" v- Z
  14.       lxc-start 1599145069.565 INFO     lxc_start - start.c:lxc_check_inherited:209 - closed inherited fd 4% G( K" `1 L1 k8 K
  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'
    7 W; ~; D5 O5 \, R
  16.       lxc-start 1599145069.596 INFO     lxc_start - start.c:lxc_check_inherited:209 - closed inherited fd 4; |9 H' o2 S7 D' k5 E
  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/ @" F& G4 K. @2 r/ H& x5 e3 @
  18.       lxc-start 1599145069.635 DEBUG    lxc_conf - conf.c:lxc_create_tty:3666 - allocated pty '/dev/pts/0' (5/6)
    ; P* x+ y# G6 N, x" n' p  K" i
  19.       lxc-start 1599145069.635 INFO     lxc_conf - conf.c:lxc_create_tty:3677 - tty's configured
    * O6 s: z+ f# U3 s7 z( @
  20.       lxc-start 1599145069.635 DEBUG    lxc_start - start.c:setup_signal_fd:247 - sigchild handler set' q* u: g  z1 h9 x/ e) B/ g
  21.       lxc-start 1599145069.635 DEBUG    lxc_console - console.c:lxc_console_peer_default:536 - no console peer
    9 M3 y$ z, s9 _; i# M, v
  22.       lxc-start 1599145069.635 INFO     lxc_start - start.c:lxc_init:443 - 'openwrt' is initialized
    6 u8 ~( `& A; U5 |1 U
  23.       lxc-start 1599145069.636 DEBUG    lxc_start - start.c:__lxc_start:1059 - Not dropping cap_sys_boot or watching utmp6 L3 W! K  h' g( h3 U' ?5 P( F
  24.       lxc-start 1599145069.637 INFO     lxc_cgroup - cgroup.c:cgroup_init:62 - cgroup driver cgroupfs initing for openwrt+ X* u- r+ }; J9 j7 _$ m# N
  25.       lxc-start 1599145069.639 INFO     lxc_start - start.c:lxc_spawn:891 - clone_flags:0x2c020000
    ' I9 [4 @- m; Z1 c
  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 error
      ]: L9 s! F0 L1 F7 I  L
  27.       lxc-start 1599145069.643 ERROR    lxc_start - start.c:__lxc_start:1081 - failed to spawn 'openwrt'
    4 K) u2 u# E: b  d2 P! k7 W
  28.       lxc-start 1599145069.648 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - command get_cgroup failed to receive response8 J& \, M! @$ g9 C0 |6 m' F
  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
    ' o' Z7 x5 e+ ^5 z3 d# P
  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 openwrt
    " B0 C8 ]% Q0 F6 g5 C
  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; P$ ^' u. S( b
  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
    ( o& ?& W& E: f
  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( l2 A' h- {9 r$ p, f; V6 \
  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$ s( o8 k2 U7 u) g$ T4 \
  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: o+ X7 X% u3 J! n, m
  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. l" h; A7 G7 r7 ~6 C+ ~
  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 openwrt1 _8 y1 k9 Z0 l  M# m& c4 Z
  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 openwrt
    % H* P5 x% G' p
  39.       lxc-start 1599145074.660 ERROR    lxc_start_ui - lxc_start.c:main:342 - The container failed to start.
    , C* L! N' @& S
  40.       lxc-start 1599145074.660 ERROR    lxc_start_ui - lxc_start.c:main:344 - To get more details, run the container in foreground mode.! k8 r# S2 \5 p' t/ h) X4 I
  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., L3 Z) u/ _. F3 M/ w
复制代码
" s, H- R& H+ {$ H+ ^0 l
F450 V2报错了  k) ?, W$ s4 `) j! l
https://github.com/mikma/lxd-openwrt/ _: l* I, v% x: ]; d' S, ^
似乎添加了aarch32架构
% ^& O9 T2 J/ `) J3 `% N但是我编译报错了
& [% s: L# b8 f1 X8 m0 \6 C% t  Q9 }7 U6 J, ?5 ]
所以启动容器的引导是放在initrd里的?
; i- U& R# k  v0 @# R$ g

点评

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 | 显示全部楼层
成功与原定制luci共存,感谢分享

点评

怎么搞定的?不能自建容器的话,好像不好搞,很多执行文件在系统文件夹里面。  详情 回复 发表于 2022-1-29 22:27
发表于 2021-2-24 20:56:44 | 显示全部楼层
另外F650没有A似乎不需要移动saf-zte,移动后openwrt容器是根本起不来的

点评

我也是F650(ZX279127 单核 256M内存),里面是守护启动的是叫saf,不管起不起动原来的容器,openwrt容器就是起不来。我又去弄来个F450A,这个就和帖子作者一样的CPU了,不过守护启动的叫saf-zte,同样openwrt容器起不来  详情 回复 发表于 2021-2-25 08:54
发表于 2021-2-25 08:50:14 | 显示全部楼层
最好能搞个hs8145v5或8145x6的教程,这么有深度的帖子很难见到了,能添加功能到光猫可玩性就高多了。
发表于 2021-2-25 08:54:31 | 显示全部楼层
本帖最后由 xiaowang325 于 2021-2-25 09:06 编辑 ! x- }1 t- T) D9 s8 E& G4 H
山东吴彦祖 发表于 2021-2-24 20:564 M) j# ^+ d. F3 L3 ^& A0 |4 T& K
另外F650没有A似乎不需要移动saf-zte,移动后openwrt容器是根本起不来的

7 j8 w$ P! w" |) p  M我也是F650(ZX279127 单核 256M内存),里面是守护启动的是叫saf,不管起不起动原来的容器,openwrt容器就是起不来。我又去弄来个F450A,这个就和帖子作者一样的CPU了,不过守护启动的叫saf-zte,同样openwrt容器起不来,报错都一样,只提示了启动失败。看不出为啥。朋友有什么好的建议吗?0 P$ L/ @4 `1 y+ \3 w+ m/ @
附报错日志/usr/var/lib/lxc/openwrt # lxc-start -dn openwrt8 S2 f, A. q7 L, e! C$ t
lxc-start: lxc_start.c: main: 342 The container failed to start.
5 n" A3 L5 }3 ]( g) tlxc-start: lxc_start.c: main: 344 To get more details, run the container in foreground mode.$ `/ J0 C' h/ V" C6 o2 B
lxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.
/ U5 J0 [- d3 M( u6 Q& d' s/usr/var/lib/lxc/openwrt # lxc-start -dn openwrt -F  s4 M2 t) O: D7 n" Y( u
lxc-start: cgfs.c: lxc_cgroupfs_enter: 1163 Invalid argument - Could not add pid 29182 to cgroup /lxc/openwrt: internal error
+ Q& `* I: N7 p' {+ Mlxc-start: start.c: __lxc_start: 1081 failed to spawn 'openwrt'
4 S- x/ f/ X2 b! B$ \1 |lxc-start: lxc_start.c: main: 342 The container failed to start.
( c5 i8 m/ j: A- [lxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.
4 o7 m. G. |0 J  ?3 ]$ r- s* ]; e) M/ k! s
发表于 2021-2-25 14:08:54 | 显示全部楼层
xiaowang325 发表于 2021-2-25 08:54- M8 W+ J" T! Z9 k4 k9 U7 F$ G$ X! i
我也是F650(ZX279127 单核 256M内存),里面是守护启动的是叫saf,不管起不起动原来的容器,openwrt容器就是 ...
7 f" E6 J6 T' y. I, Z
我是用楼主配好的镜像启动的,如果是自己编译的话我就不清楚了,我还没整活到那一步,除了不用移动saf-zte以外完全按照楼主说的做就可以成功启动
6 Y1 R/ t; [5 C+ E$ l6 k9 h( m2 d# @6 C. T0 g* U
另外看了你的第二个报错应该是你移动了saf-zte,我一开始完全按照楼主说的做就是报这个internal error,不能移动saf-zte,应该是有东西开机调用这saf-zte初始化的
发表于 2021-2-26 14:25:49 | 显示全部楼层
谢谢楼主无私分享
发表于 2021-4-11 21:22:31 | 显示全部楼层
F650A 启动报错
$ C7 w: W3 p& `: y5 Xlxc-start: lxc_start.c: main: 342 The container failed to start.1 J3 F* {, D* K4 g/ N) q
lxc-start: lxc_start.c: main: 344 To get more details, run the container in foreground mode.  j& |# D+ l/ r6 }
lxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.

点评

如果LXC启动失败,请检查config文件及LXC文件夹路径是否有误。  详情 回复 发表于 2021-5-4 23:40
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

粤公网安备 44152102000001号

GMT+8, 2024-2-22 21:40 , Processed in 0.027872 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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