云编译打包,首页状态页面相关信息补丁打包不上
oktty opened this issue · 0 comments
oktty commented
云打包配置
steps:
- name: Checkout
uses: actions/checkout@main
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ needs.build.result }} == 'success' && !cancelled()
run: |
sudo -E apt-get -qq update
sudo -E apt-get -qq install ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison btrfs-progs \
build-essential bzip2 ca-certificates ccache cmake coreutils cpio curl device-tree-compiler fastjar flex g++-multilib \
gawk gcc-multilib gettext git git-core gperf gzip haveged help2man intltool jq libc6-dev-i386 libelf-dev libfuse-dev \
libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev \
libssl-dev libtool libz-dev lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pigz pkgconf python2.7 \
python3 python3-pip python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig tar \
texinfo uglifyjs unzip upx upx-ucl vim wget xmlto xsltproc xxd xz-utils yasm zip zlib1g-dev zstd
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
sudo rm -rf /etc/apt/sources.list.d/* /usr/local/lib/android /opt/ghc /usr/share/dotnet /usr/local/graalvm /usr/local/.ghcup \
/usr/local/share/powershell /usr/local/share/chromium /usr/local/lib/node_modules
sudo timedatectl set-timezone "$TZ"
- name: Download Artifact Target
uses: actions/download-artifact@main
id: downloadArtifact
if: ${{ needs.build.result }} == 'success' && !cancelled()
with:
name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
path: ${{ env.PACK_DOWNLOAD_TARGET_PATH }}
- name: Package OpenWrt Firmware
uses: ophub/flippy-openwrt-actions@main
if: ${{ steps.downloadArtifact.outcome }} == 'success' && !cancelled()
env:
OPENWRT_ARMVIRT: ${{ env.PACK_DOWNLOAD_TARGET_PATH }}/*rootfs.tar.gz
PACKAGE_SOC: ${{ env.PACK_PACKAGE_SOC }}
KERNEL_VERSION_NAME: ${{ env.PACK_KERNEL_VERSION_NAME }}
KERNEL_AUTO_LATEST: true
- name: Organize files
id: organize
if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()
run: |
cd ${{ env.PACKAGED_OUTPUTPATH }}
rm -rf *rootfs.tar.gz *rootfs.tar.gz.sha
echo "status=success" >> $GITHUB_OUTPUT
- name: Upload firmware directory
uses: actions/upload-artifact@main
if: ${{ steps.organize.outputs.status }} == 'success' && !cancelled()
with:
name: OpenWrt_firmware_${{ env.PACK_PACKAGE_SOC }}_${{ env.PACK_KERNEL_VERSION_NAME }}${{ env.FILE_DATE }}
path: ${{ env.PACKAGED_OUTPUTPATH }}
打包完成后首页文件代码对比patch文件后发现补丁文件中,下面代码没有打上
+ "sysctl -n -e net.netfilter.nf_conntrack_max net.nf_conntrack_max net.ipv4.netfilter.ip_conntrack_max | head -n 1"):match("%d+")) or 4096
+ local user_info = luci.sys.exec("cat /proc/net/arp | grep -E 'br-lan|eth0' | grep '0x2' | wc -l")
+ local cpu_stat = luci.sys.exec("/usr/bin/cpustat 2>/dev/null") or { }
+ local eth_info = luci.sys.exec("/usr/bin/cpustat -e 2>/dev/null")
+ local eth_cnt = luci.sys.exec("/usr/bin/cpustat -ec 2>/dev/null")
+ ethinfo = eth_info,
+ ethcount = eth_cnt,
+ wifinets = stat.wifi_networks(),
+ cpustat = cpu_stat
+ if (e = document.getElementById('cpustat'))
+ e.innerHTML = info.cpustat;
+ <tr><td width="33%"><%:Architecture%></td><td><%=luci.sys.exec("/usr/bin/cpustat -a 2>/dev/null")%></td></tr>
+ <tr><td width="33%"><%:CPU状态%></td><td id="cpustat">-</td></tr>
以及以下代码被修改
<tr><td width="33%"><%:Kernel Version%></td><td><%=luci.sys.exec("uname -r | awk -F '-' '{print $1}'") or "?"%></td></tr>
源码中是
<tr><td width="33%"><%:Kernel Version%></td><td><%=unameinfo.release or "?"%></td></tr>
- 编译使用的是lede大佬的源码
麻烦F大有空看下,谢谢了