海运的博客

debian11或pve编译安装最新版qbittorrent-nox

发布时间:February 5, 2023 // 分类: // No Comments

安装编译环境:

apt install build-essential pkg-config automake libtool

编译libtorrent-rasterbar-1.2.18:

apt install libboost-system-dev libssl-dev
#也可使用git clone最新代码
#git clone --branch RC_1_2 --depth=1 --recurse-submodules https://github.com/arvidn/libtorrent.git
wget https://github.com/arvidn/libtorrent/releases/download/v1.2.18/libtorrent-rasterbar-1.2.18.tar.gz
tar zxf libtorrent-rasterbar-1.2.18.tar.gz 
cd libtorrent-rasterbar-1.2.18/  
./configure --prefix=/usr/local/libtorrent-1.2.18 CXXFLAGS=-std=c++14  
make -j$(nproc) && make install

编译qbittorrent-nox4.5.0:

apt install qtbase5-dev qttools5-dev libqt5svg5-dev zlib1g-dev
#也可使用git clone最新代码
#git clone --branch v4_5_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.5.0.tar.gz
tar zxf release-4.5.0.tar.gz 
cd qBittorrent-release-4.5.0/  
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.18/include/               
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.18/lib/pkgconfig
./configure --prefix=/usr/local/qbittorrent-4.5.0 --disable-gui 
make -j$(nproc) && make install

qbittorrent 4.5.0版本web不能显示中文解决:

sed -i 's/value="zh">/value="zh_CN">/' src/webui/www/private/views/preferences.html

如只安装一个版本的libtorren启动qbittorrent:

echo '/usr/local/libtorrent/lib' > /etc/ld.so.conf.d/libtorrent-x86_64.conf 
ldconfig
/usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

多个版本libtorren:

LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/ /usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

systemd service添加:

Environment="LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/"

用cmake编译libtorrent-2.0版本及qbittorrent4.5.0:

apt install cmake ninja-build
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-2.0.8 -DCMAKE_CXX_STANDARD=14 
cmake --build build
cmake --install build
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-2.0.8/include/              
export PKG_CONFIG_PATH=/usr/local/libtorrent-2.0.8/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.0-lt20 -DGUI=OFF -DSTACKTRACE=OFF 
cmake --build build
cmake --install build

debian11使用qt6编译qbittorrent,需开启bullseye-backports源:

apt install qt6-base-dev qt6-tools-dev zlib1g-dev -t bullseye-backports
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.1 -DGUI=OFF -DSTACKTRACE=OFF -DQT6=ON

如要在其它机器上运行需安装依赖:

apt install libqt6network6 libqt6sql6 libqt6xml6 libqt6core6 -t bullseye-backports 

libtorrent-2.0.8使用注意,默认磁盘io类型为内存映射文件,qbittorrent占用shr内存很大,且关闭系统缓存后下载上传很慢。
将磁盘io更改为posix无此问题。

经典版本4.3.9:

#wget https://github.com/arvidn/libtorrent/releases/download/v1.2.14/libtorrent-rasterbar-1.2.14.tar.gz
#tar zxf libtorrent-rasterbar-1.2.14.tar.gz 
#cd libtorrent-rasterbar-1.2.14/
git clone --branch RC_1_2 https://github.com/arvidn/libtorrent.git
cd libtorrent
#qbittorrent4.39发布时使用的libtorrent版本
git checkout 28ebc276224021d93d958e2f2de445c35898a23e
git submodule update --init --recursive
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-1.2.14 -DCMAKE_CXX_STANDARD=14 
cmake --build build  
cmake --install build
git clone --branch v4_3_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent/
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.14/include/  
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.14/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.3.9 -DGUI=OFF -DSTACKTRACE=OFF
cmake --build build  
cmake --install build

https://web.archive.org/web/20211102073721/https://www.qbittorrent.org/download.php
https://github.com/qbittorrent/qBittorrent/wiki#compilation
https://github.com/qbittorrent/qBittorrent/wiki/Compilation:-Debian-and-Ubuntu
https://github.com/qbittorrent/qBittorrent/wiki/Compilation-with-CMake:-common-information
https://github.com/arvidn/libtorrent/blob/RC_2_0/docs/building.rst#building-with-cmake

x86运行arm64 docker

发布时间:January 19, 2023 // 分类: // 1 Comment

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --name test -i -t arm64v8/ubuntu /bin/bash

更多:
https://github.com/multiarch/qemu-user-static

编译纯净版k2p padavan支持802.11 kvr固件

发布时间:December 14, 2022 // 分类: // No Comments

安装依赖及下载源码:

apt install unzip libtool-bin curl cmake gperf gawk flex bison nano xxd fakeroot kmod cpio git python3-docutils gettext automake autopoint texinfo build-essential help2man pkg-config zlib1g-dev libgmp3-dev     libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget libc-dev-bin bc
git clone https://github.com/padavanonly/padavan-4.4.git --depth=1
cd padavan-4.4/toolchain-mipsel
./dl_toolchain.sh

编辑trunk/build_firmware_modify注释掉特殊服务,并移除相应asp管理页面,不然编译后有相关菜单。
更新:首次编译前注释相关软件包就行。

rm trunk/user/www/n56u_ribbon_fixed/Shadows*.asp 
rm trunk/user/www/n56u_ribbon_fixed/Advanced_aliddns.asp 
rm trunk/user/www/n56u_ribbon_fixed/Advanced_SQM.asp 
rm trunk/user/www/n56u_ribbon_fixed/Advanced_adbyby.asp

编译固件:

cd trunk/
fakeroot ./build_firmware_modify K2P

使用glibc编译的openwrt支持utf8中文显示和输入

发布时间:December 11, 2022 // 分类: // No Comments

将编译openwrt环境中的locale命令复制到路由上:

scp staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/bin/locale root@192.168.1.1:/usr/local/bin/

在任一linux机器上将生成的utf8编码复制到路由上:

scp /usr/lib/locale/locale-archive 192.168.1.1:/lib/locale/
scp -r /usr/lib/locale/C.UTF-8/  192.168.1.1:/lib/locale/

输入中文:

cat /root/.inputrc 

set meta-flag on
set convert-meta off
set input-meta on
set output-meta on

也可通过以下方法在openwrt路由上生成语言编码,占用内存大,小内存路由会kill。
https://github.com/openwrt/packages/issues/2900

360t7通过usb tll刷入不死uboot和openwrt系统

发布时间:December 5, 2022 // 分类: // No Comments

拆机连接ttl,从外到内依次为txd rxd gnd,也有人说rxd txd gnd。

用SRT连接或其它ssh管理软件:

启动时持续按f加回车键直到进入failsafe模模式:

#开启uboot控制台菜单(可选),开启后可通过uboot命令行更新固件。
#fw_setenv bootmenu_delay 3

# 挂载rootfs并开启telnet
mount_root
sed -i 's/.*local debug=.*/\tlocal debug=1/' /etc/init.d/telnet

# 修改root密码
passwd root
reboot

不开启telnet也可通过ttl配置网络备份系统和刷入uboot:

ifconfig eth0 0.0.0.0
brctl addbr br-lan
ifconfig br-lan 192.168.2.1 netmask 255.255.255.0 up
brctl addif br-lan eth0

重启后通过telnet登录,查看分区表:

cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 08000000 00020000 "spi0.0"
mtd1: 00100000 00020000 "bl2"
mtd2: 00080000 00020000 "u-boot-env"
mtd3: 00200000 00020000 "Factory"
mtd4: 00200000 00020000 "fip"
mtd5: 02400000 00020000 "ubi"
mtd6: 02400000 00020000 "firmware-1"
mtd7: 02400000 00020000 "plugin"
mtd8: 00100000 00020000 "config"
mtd9: 00080000 00020000 "factory"
mtd10: 00700000 00020000 "log"

备份整个路由固件:

nc -l -p 3333 > all.bin
cat /dev/mtd0 | nc 192.168.1.8 3333
#或
nc -l -p 3333 | dd of=all2.bin
dd if=/dev/mtd0 | nc 192.168.1.8 3333

刷入下载的uboot:

wget 192.168.1.8/mt7981_360t7-fip-fixed-parts.bin 
#验证文件是否正确,刷错路由会变砖。
md5sum mt7981_360t7-fip-fixed-parts.bin 
256977db5ca6a17b0f9e73b0ddfd3efd  mt7981_360t7-fip-fixed-parts.bin
mtd -r write mt7981_360t7-fip-fixed-parts.bin fip

关闭电源将电脑ip设置为192.168.1.2,按住reset键路由开机,然后访问192.168.1.1 web界面刷入openwrt固件,使用immortalwrt-mediatek-mt7981-mt7981-360-t7-108M-squashfs-factory.bin,通过openwrt更新可使用immortalwrt-mediatek-mt7981-mt7981-360-t7-108M-squashfs-sysupgrade.bin。

https://cmi.hanwckf.top/p/360t7-firmware/
https://github.com/hanwckf/bl-mt798x
https://github.com/hanwckf/immortalwrt-mt798x

分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档