|
本帖最后由 wulishui 于 2024-3-25 18:05 编辑
搞了三天,都特么想扔了,搞了这么多年没这么窝囊。
第一次花了一晚上整理好,编译到一般,发现N多依赖找不到。以为是忘了 ./scripts/feeds install -a (不可能忘,十年八年的固定动作),去执一遍,也不行啊。
删库,重来。
这次有些人为的错误,这次花了12个小时编译完成。安装kmod时发现kernel hash不对,这次是真自己忘了改kernel hash了。改好重新编译是不行的,会报kernel 小版本依赖错误,需要make clean。但make clean之后等于重新来过,为了不留下暗病,我还不如删库重来。
又删库,重来。
make kernel_menuconfig过程中去整理package,发现很多package找不到。我又怀疑是是忘了 ./scripts/feeds install -a (仔细一想,绝对没有),为什么会这样?于是终止make。
又删库,重来。
这次多了个心思, ./scripts/feeds install -a 后仔细翻看记录。发现 N 多 ”WARNING: Not overriding core package“,以往从没遇到过。
为了验证是什么原因,又删库,重来。这次加个 -f 看看。
这次翻看完整记录,只报少了个依赖:
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
这没什么问题,实际上是存在的。
问题是什么并没有验证出来。
目前是怀疑有一个步骤出问题:
除了官方package,我们通常有一个自己维护的package库,比如lean的源码就有一个lean的package库。通常我们都是先 ./scripts/feeds update -a 然后 ./scripts/feeds install -a,再去整理package。这次我是先把自己的package复制进去了再去 ./scripts/feeds install -a ,问题会不会出在这里(但是以前都是这么干,而且lean的源码他lean的package库早就在那里了)?再去验证。
上一次是 ./scripts/feeds update -a 后 ./scripts/feeds install -a -f,并没有先把自己的库放进去。
这一次我要先把自己的库放进去然后./scripts/feeds update -a 、 ./scripts/feeds install -a :
Installing all packages from feed packages.
Overriding core package 'aria2' with version from packages
WARNING: Not overriding core package 'aria2'; use -f to force
WARNING: Not overriding core package 'aria2'; use -f to force
Overriding core package 'coremark' with version from packages
Overriding core package 'hd-idle' with version from packages
Overriding core package 'https-dns-proxy' with version from packages
Overriding core package 'ksmbd-tools' with version from packages
Overriding core package 'libidn2' with version from packages
WARNING: Not overriding core package 'libidn2'; use -f to force
Overriding core package 'microsocks' with version from packages
Overriding core package 'miniupnpd' with version from packages
Overriding core package 'mwan3' with version from packages
Overriding core package 'netdata' with version from packages
Overriding core package 'nlbwmon' with version from packages
Overriding core package 'ntfs-3g' with version from packages
WARNING: Not overriding core package 'ntfs-3g'; use -f to force
WARNING: Not overriding core package 'ntfs-3g'; use -f to force
Overriding core package 'open-vm-tools' with version from packages
WARNING: Not overriding core package 'open-vm-tools'; use -f to force
Overriding core package 'proxychains-ng' with version from packages
Overriding core package 'rp-pppoe' with version from packages
WARNING: Not overriding core package 'rp-pppoe'; use -f to force
WARNING: Not overriding core package 'rp-pppoe'; use -f to force
Overriding core package 'transmission' with version from packages
WARNING: Not overriding core package 'transmission'; use -f to force
Overriding core package 'transmission-web-control' with version from packages
WARNING: Not overriding core package 'transmission'; use -f to force
Overriding core package 'ttyd' with version from packages
果然出问题了,注意它会提示用”use -f to force“,但其实你多来一遍用-f发现,卵用都没有的,这个”-f“是无效的。
究其原因是,自己的库中包含了同名的package,并且不是放在官方原来的位置(其实这里可以忽略不管,如果你只想用自己维护的版本的话)。
只是一下子你搞不明白为什么会这样,这里给我们提供了个思路,也就是我们自己维护的版本较新,可以先放进去,执行 ./scripts/feeds install -a 时会自动跳过我们已有的package,不用我们一一去整理了,这反而是好事。---经过半天实践这样不好,会出问题,package杂乱不堪,编译报错!在这个坑里浪费很多时间精力了!还是得老老实实按下面步骤整理!
我花了3天时间帮你们踩出了这个坑。
所以以后最好步骤是:
第一步:拉 openwrt 主库
第二步:./scripts/feeds update -a
第三步:./scripts/feeds install -a
第四步:整理package,把自己的库复制进package,把官方库中重复的删除
第五步:make menuconfig,选构架机型和部件
第六步:make -j2 download
第二第三步要分开走,为什么?因为你知道的原因,第二步经常中途失败,为了方便观察以免留下隐患,分开做。
在这里安li一下南京U的镜像源,你再也不用在执行第二步时捏着蛋骂某些人了:
主库:https://git.nju.edu.cn/nju/openwrt.git,git用法和官方库一样。
feeds源:
src-git packages https://git.nju.edu.cn/nju/openwrt-packages.git^063b2393cbc3e5aab9d2b40b2911cab1c3967c59
src-git luci https://git.nju.edu.cn/nju/openwrt-luci.git^b07cf9dcfc37e021e5619a41c847e63afbd5d34a
src-git routing https://git.nju.edu.cn/nju/openwrt-routing.git^648753932d5a7deff7f2bdb33c000018a709ad84
src-git telephony https://git.nju.edu.cn/nju/openwrt-telephony.git^86af194d03592121f5321474ec9918dd109d3057
也就是用“https://git.nju.edu.cn/nju/openwrt-”替换到openwrt官方源地址即可。
|
|