目次
文書の過去の版を表示しています。
Podman OpenWrt ビルド環境 - Podman OpenWrt Build Environment
ビルドの流れ...🤔
$ podman run --name openwrt_builder --rm -ti -v `pwd`/openwrt_home:/home/tomoyan -e "TERM=$TERM" tomoyan596/openwrt_builder zsh
$ git clone --depth 1 https://git.openwrt.org/openwrt/openwrt.git
Cloning into 'openwrt'... remote: Enumerating objects: 11659, done. remote: Counting objects: 100% (11659/11659), done. remote: Compressing objects: 100% (9810/9810), done. remote: Total 11659 (delta 1855), reused 6833 (delta 1009), pack-reused 0 Receiving objects: 100% (11659/11659), 13.34 MiB | 179.00 KiB/s, done. Resolving deltas: 100% (1855/1855), done. Updating files: 100% (9903/9903), done.
$ cd openwrt
本家の feed は重い...😅
$ ./scripts/feeds update -a
Updating feed 'packages' from 'https://git.openwrt.org/feed/packages.git' ... Cloning into './feeds/packages'... remote: Enumerating objects: 7327, done. remote: Counting objects: 100% (7327/7327), done. remote: Compressing objects: 100% (6010/6010), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output failed. Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git' ... Cloning into './feeds/luci'... remote: Enumerating objects: 10852, done. remote: Counting objects: 100% (10852/10852), done. remote: Compressing objects: 100% (4950/4950), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output failed. Updating feed 'routing' from 'https://git.openwrt.org/feed/routing.git' ... Cloning into './feeds/routing'... remote: Enumerating objects: 288, done. remote: Counting objects: 100% (288/288), done. remote: Compressing objects: 100% (232/232), done. remote: Total 288 (delta 9), reused 90 (delta 0), pack-reused 0 Receiving objects: 100% (288/288), 119.84 KiB | 447.00 KiB/s, done. Resolving deltas: 100% (9/9), done. Updating feed 'telephony' from 'https://git.openwrt.org/feed/telephony.git' ... Cloning into './feeds/telephony'... remote: Enumerating objects: 273, done. remote: Counting objects: 100% (273/273), done. remote: Compressing objects: 100% (255/255), done. remote: Total 273 (delta 5), reused 179 (delta 5), pack-reused 0 Receiving objects: 100% (273/273), 226.26 KiB | 422.00 KiB/s, done. Resolving deltas: 100% (5/5), done. Updating feed 'video' from 'https://github.com/openwrt/video.git' ... Cloning into './feeds/video'... remote: Enumerating objects: 166, done. remote: Counting objects: 100% (166/166), done. remote: Compressing objects: 100% (127/127), done. remote: Total 166 (delta 12), reused 119 (delta 2), pack-reused 0 (from 0) Receiving objects: 100% (166/166), 69.49 KiB | 2.78 MiB/s, done. Resolving deltas: 100% (12/12), done. Create index file './feeds/packages.index' Checking 'true'... ok. Checking 'false'... ok. Checking 'working-make'... ok. Checking 'case-sensitive-fs'... ok. Checking 'proper-umask'... ok. Checking 'gcc'... updated. Checking 'working-gcc'... ok. Checking 'g++'... updated. Checking 'working-g++'... ok. Checking 'ncurses.h'... ok. Checking 'git'... updated. Checking 'rsync'... updated. Checking 'perl-data-dumper'... ok. Checking 'perl-findbin'... ok. Checking 'perl-file-copy'... ok. Checking 'perl-file-compare'... ok. Checking 'perl-thread-queue'... ok. Checking 'perl-ipc-cmd'... ok. Checking 'tar'... updated. Checking 'find'... updated. Checking 'bash'... updated. Checking 'xargs'... updated. Checking 'patch'... updated. Checking 'diff'... updated. Checking 'cp'... updated. Checking 'seq'... updated. Checking 'awk'... updated. Checking 'grep'... updated. Checking 'egrep'... updated. Checking 'getopt'... updated. Checking 'realpath'... updated. Checking 'stat'... updated. Checking 'gzip'... updated. Checking 'unzip'... updated. Checking 'bzip2'... updated. Checking 'wget'... updated. Checking 'install'... updated. Checking 'perl'... updated. Checking 'python'... updated. Checking 'python3'... updated. Checking 'python3-distutils'... ok. Checking 'python3-stdlib'... ok. Checking 'file'... updated. Checking 'which'... updated. Checking 'argp.h'... ok. Checking 'fts.h'... ok. Checking 'obstack.h'... ok. Checking 'libintl.h'... ok. Checking 'ldconfig-stub'... ok. find: ‘feeds/packages’: No such file or directory Collecting package info: done find: ‘feeds/packages’: No such file or directory Collecting target info: done Create index file './feeds/luci.index' find: ‘feeds/luci’: No such file or directory Collecting package info: done find: ‘feeds/luci’: No such file or directory Collecting target info: done Create index file './feeds/routing.index' Collecting package info: done Collecting target info: done Create index file './feeds/telephony.index' ERROR: please fix feeds/telephony/net/freeswitch/Makefile - see logs/feeds/telephony/net/freeswitch/dump.txt for d etails ERROR: please fix feeds/telephony/net/kamailio/Makefile - see logs/feeds/telephony/net/kamailio/dump.txt for detai ls Collecting package info: done Collecting target info: done Create index file './feeds/video.index' ERROR: please fix feeds/video/libs/mesa/Makefile - see logs/feeds/video/libs/mesa/dump.txt for details ERROR: please fix feeds/video/libs/xkeyboard-config/Makefile - see logs/feeds/video/libs/xkeyboard-config/dump.txt for details Collecting package info: done Collecting target info: done
openwrt/feeds.conf
を github.com ミラーに設定する😉
$ cp feeds.conf.default feeds.conf $ nano feeds.conf
src-git packages https://github.com/openwrt/packages.git src-git luci https://github.com/openwrt/luci.git src-git routing https://github.com/openwrt/routing.git src-git telephony https://github.com/openwrt/telephony.git src-git video https://github.com/openwrt/video.git #src-git packages https://git.openwrt.org/feed/packages.git #src-git luci https://git.openwrt.org/project/luci.git #src-git routing https://git.openwrt.org/feed/routing.git #src-git telephony https://git.openwrt.org/feed/telephony.git #src-git video https://github.com/openwrt/video.git #src-git targets https://github.com/openwrt/targets.git #src-git oldpackages http://git.openwrt.org/packages.git #src-link custom /usr/src/openwrt/custom-feed
コンテナで root でビルドしてはいけない...🤔
$ podman run --name openwrt_build -v `pwd`/openwrt:/root/openwrt --rm -ti tomoyan596/openwrt_builder zsh # git clone --depth 1 https://git.openwrt.org/openwrt/openwrt.git # cd openwrt # ./scripts/feeds update -a # ./scripts/feeds install -a # make menuconfig # make -j4 # make -j4 V=sc
configure:39038: error: in `/root/openwrt/build_dir/host/tar-1.35': configure:39040: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) See `config.log' for more details
root で configure するんぢゃねぇよゴルァ😱😅