forum.gl-inet.cn

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
    查看: 4375|回复: 24

    [固件资源] AXT1800 64 位 带 docker 固件

      [复制链接]

    2

    主题

    11

    帖子

    180

    积分

    注册会员

    Rank: 2

    积分
    180
    发表于 2022-10-19 00:44:21 | 显示全部楼层 |阅读模式
    本帖最后由 zss0hs 于 2023-3-11 21:05 编辑

    AXT1800 64 位 带 docker 固件

    使用的大雕原版仓库:

    1. https://github.com/coolsnowwolf/openwrt-gl-ax1800.git
    复制代码
         使用原版仓库选择 docker-ce 包,到编译 runc 包时会报错,导致编译失败:
    1. make[4]: Entering directory '/home/jht/openwrt-gl-ax1800/build_dir/target-aarch64_cortex-a53_musl/runc-1.0.0-rc10/.go_work/build/src/github.com/opencontainers/runc'
    2. go build -buildmode=pie  -ldflags "-X main.gitCommit=dc9208a3303feef5b3839f4323d9beb36df0a9dd -X main.version=1.0.0-rc10 " -tags "" -o runc .
    3. go: cannot find main module, but found vendor.conf in /home/jht/openwrt-gl-ax1800/build_dir/target-aarch64_cortex-a53_musl/runc-1.0.0-rc10/.go_work/build/src/github.com/opencontainers/runc
    4.         to create a module there, run:
    5.         go mod init
    6. make[4]: *** [Makefile:34: runc] Error 1
    7. make[4]: Leaving directory '/home/jht/openwrt-gl-ax1800/build_dir/target-aarch64_cortex-a53_musl/runc-1.0.0-rc10/.go_work/build/src/github.com/opencontainers/runc'
    8. make[3]: *** [Makefile:85: /home/jht/openwrt-gl-ax1800/build_dir/target-aarch64_cortex-a53_musl/runc-1.0.0-rc10/.built] Error 2
    9. make[3]: Leaving directory '/home/jht/openwrt-gl-ax1800/feeds/packages/utils/runc'
    10. time: package/feeds/packages/runc/compile#1.41#2.15#3.90
    11. make[2]: *** [package/Makefile:113: package/feeds/packages/runc/compile] Error 2
    12. make[2]: Leaving directory '/home/jht/openwrt-gl-ax1800'
    13. make[1]: *** [package/Makefile:107: /home/jht/openwrt-gl-ax1800/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
    14. make[1]: Leaving directory '/home/jht/openwrt-gl-ax1800'
    15. make: *** [/home/jht/openwrt-gl-ax1800/include/toplevel.mk:227:world] 错误 2
    复制代码
        原因是 packages 仓库升级了 golang, 然后导致了 runc 包编译失败:
    1. https://github.com/coolsnowwolf/lede/issues/6465
    复制代码
        这个问题后来已经在 packages 仓库的 master 分支中修复了,所以我直接去 packages 仓库的 master 分支中,在 golang 版本还是 1.17.3 的历史版本中,复制出与 dcoker 相关的包,然后直接替换 feeds/packages/ 中对应的文件,这样就可以正常编译了。我使用的历史版本是:
    1. https://github.com/coolsnowwolf/packages/commit/3d386440272857c382e43b80112d08f5c1eacfb4
    复制代码
        下边是详细步骤:
          1、克隆 openwrt-gl-ax1800 仓库,执行 ./scripts/feeds update -a 和 ./scripts/feeds install -a 命令:
    1. git clone https://github.com/coolsnowwolf/openwrt-gl-ax1800
    2. cd openwrt-gl-ax1800
    3. ./scripts/feeds update -a
    4. ./scripts/feeds install -a
    复制代码
          2、提取 docker 相关的包:
    1. cd ..
    2. git clone https://github.com/coolsnowwolf/packages
    3. cd packages
    4. git reset --hard 3d386440272857c382e43b80112d08f5c1eacfb4
    5. mkdir -pv ../local/utils/
    6. cp -r utils/containerd ../local/utils/
    7. cp -r utils/docker ../local/utils/
    8. cp -r utils/docker-compose ../local/utils/
    9. cp -r utils/dockerd ../local/utils/
    10. cp -r utils/libnetwork ../local/utils/
    11. cp -r utils/runc ../local/utils/
    12. cp -r utils/tini ../local/utils/
    13. cp -r utils/cgroupfs-mount ../local/utils/
    复制代码
          3、将提取的 docker 相关的包复制进 openwrt-gl-ax1800 目录:
    1. cd ../openwrt-gl-ax1800/
    2. rm -rf feeds/packages/utils/cgroupfs-mount/
    3. rm -rf feeds/packages/utils/containerd/
    4. rm -rf feeds/packages/utils/docker-ce/
    5. rm -rf feeds/packages/utils/libnetwork/
    6. rm -rf feeds/packages/utils/runc/
    7. rm -rf feeds/packages/utils/tini/

    8. cp -r ../local/utils/* feeds/packages/utils/

    9. cd package/feeds/packages/
    10. rm docker-ce
    11. ln -s ../../../feeds/packages/utils/docker* ./
    12. cd ../../../
    复制代码
          这是我提取的 docker 相关的包:
          4、经过以上步骤后,执行 make menuconfig 命令,选择 Utilities  ---> docker 和 dockerd 已经可以成功编译 docker 了,但是目前编译出的 openwrt 还不能运行 docker ,因为还需要开启内核相关的功能,有一个检测是否可以运行容器的脚本,脚本连接:check-config.sh ,或者使用下载好的:,在 OpenWRT 终端直接执行脚本即可。
    1. chmod +x check-config.sh
    2. ./check-config.sh
    复制代码
          检测结果分为两部分,Generally Necessary 和 Optional Features ,Generally Necessary 的部分必须支持,Optional Features 的部分不支持也可以。
          比如检测出 CONFIG_CGROUPS 功能为 missing ,就执行 make menuconfig 命令后,使用 "/" 功能搜索 "CONFIG_CGROUPS" , 按照搜索出的结果进入对应选项中来开启此功能。
          
          
          下图是我执行检测脚本后的结果:
          
          我的 bin/targets/ipq60xx/genericconfig.buildinfo 文件,可作为参考。
          5、安装使用 luci-app-dockerman :
    1. cd package
    2. git clone https://github.com/lisaac/luci-app-dockerman
    3. git clone https://github.com/lisaac/luci-lib-docker
    4. cd package
    5. make menuconfig
    复制代码
          选择 LuCI ---> 3. Applications  ---> <*> luci-app-dockerman 执行 make -j1 V=s 命令进行编译。
          6、目前编译好的的 OpenWRT 已经可以运行 docker 了,但是因为 etc/rc.common 文件没有 extra_command 命令,会导致 dockerd 无法开机自启。这个缺陷也已在 lede 仓库中修复了。 可以参考以下的网页修改自己的
    package/base-files/files/etc/rc.common 文件,然后再次编译即可。
          或者直接使用rc.common文件也可以。
    1. https://github.com/coolsnowwolf/lede/issues/7245
    2. https://github.com/coolsnowwolf/lede/commit/22cfbe7faa2e9d32e5c78b273d05cee806861c12
    复制代码
          这是我修改后的 rc.common 文件:
          7、截图及固件:
          
          AXT1800 固件:https://wwqr.lanzouw.com/iAcAf0pv55tg 密码:1n8e
           压缩包解压密码:forum.gl-inet.cn

         




    本帖子中包含更多资源

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

    x
    回复

    使用道具 举报

    15

    主题

    99

    帖子

    1158

    积分

    金牌会员

    Rank: 6Rank: 6

    积分
    1158
    发表于 2022-10-19 02:52:24 | 显示全部楼层
    docker可以挂载到u盘或者tf卡吗?设置存储卷到tf卡?
    回复

    使用道具 举报

    0

    主题

    18

    帖子

    58

    积分

    注册会员

    Rank: 2

    积分
    58
    发表于 2022-10-19 17:14:58 | 显示全部楼层
    这个版本带官方UI不??
    回复

    使用道具 举报

    20

    主题

    318

    帖子

    1455

    积分

    金牌会员

    Rank: 6Rank: 6

    积分
    1455
    发表于 2022-10-19 17:27:10 | 显示全部楼层
    kenysai 发表于 2022-10-19 17:14
    这个版本带官方UI不??

    64位不存在的
    回复

    使用道具 举报

    2

    主题

    11

    帖子

    180

    积分

    注册会员

    Rank: 2

    积分
    180
     楼主| 发表于 2022-10-19 18:18:19 | 显示全部楼层
    240038901 发表于 2022-10-19 02:52
    docker可以挂载到u盘或者tf卡吗?设置存储卷到tf卡?

    我挂到了tf卡上。
    回复

    使用道具 举报

    15

    主题

    99

    帖子

    1158

    积分

    金牌会员

    Rank: 6Rank: 6

    积分
    1158
    发表于 2022-10-19 22:20:20 | 显示全部楼层
    zss0hs 发表于 2022-10-19 18:18
    我挂到了tf卡上。

    docker镜像也是存储在tf卡上吗?就是ram内存少了点,运行5-6个docker估计就顶天了。
    回复

    使用道具 举报

    0

    主题

    19

    帖子

    80

    积分

    注册会员

    Rank: 2

    积分
    80
    发表于 2022-10-20 18:10:54 | 显示全部楼层
    感谢分享。
    回复

    使用道具 举报

    0

    主题

    1

    帖子

    22

    积分

    新手上路

    Rank: 1

    积分
    22
    发表于 2022-10-21 11:09:23 | 显示全部楼层
    谢谢分享 请问这个带docker的固件支持也AX1800吗
    回复

    使用道具 举报

    0

    主题

    1

    帖子

    14

    积分

    新手上路

    Rank: 1

    积分
    14
    发表于 2022-10-22 22:54:33 | 显示全部楼层
    厉害了 膜拜一下
    回复

    使用道具 举报

    0

    主题

    8

    帖子

    44

    积分

    新手上路

    Rank: 1

    积分
    44
    发表于 2022-10-23 15:30:59 | 显示全部楼层
    强!给楼主点赞!
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|gl-inet.cn ( 粤ICP备18130956号 )

    GMT+8, 2024-4-25 06:29 , Processed in 0.026342 second(s), 25 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

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