kernel_6.1.sh 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. shopt -s extglob
  3. rm -rf target/linux package/kernel package/boot package/firmware
  4. mkdir new; cp -rf .git new/.git
  5. cd new
  6. git reset --hard origin/master
  7. cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* config/Config-images.in config/Config-kernel.in include/image*.mk include/trusted-firmware-a.mk include/bpf.mk scripts/ubinize-image.sh scripts/target-metadata.pl package/utils/bcm27xx-utils package/devel/perf package/network/config/qosify ../
  8. cd -
  9. sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk
  10. #sed -i "s/\$(PKG_VERSION)-\$(PKG_RELEASE)/\$(PKG_VERSION)-r\$(PKG_RELEASE)/" include/package-defaults.mk
  11. cp -rf devices/common/patches/rootfstargz.patch.main devices/common/patches/rootfstargz.patch
  12. cp -rf devices/common/patches/qca-ssdk.patch.main devices/common/patches/qca-ssdk.patch
  13. cp -rf devices/common/patches/ebpf.patch.main devices/common/patches/ebpf.patch
  14. cp -rf devices/common/patches/nonshared.patch.main devices/common/patches/nonshared.patch
  15. git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.1
  16. wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.1/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-6.1/
  17. wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -P package/kernel/linux/modules/
  18. rm -rf target/linux/generic/hack-6.1/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch}
  19. wget -N https://raw.githubusercontent.com/openwrt/openwrt/main/include/u-boot.mk -P include/
  20. wget -N https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -P package/kernel/mt76/patches/
  21. cd feeds/packages
  22. rm -rf kernel libs/xr_usb_serial_common net/xtables-addons
  23. git_clone_path master https://github.com/openwrt/packages kernel libs/xr_usb_serial_common net/xtables-addons
  24. cd ../../
  25. wget -N https://raw.githubusercontent.com/openwrt/packages/master/net/coova-chilli/patches/011-kernel517.patch -P package/feeds/packages/coova-chilli/patches/
  26. sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf
  27. sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab
  28. sed -i "s/no-lto,/no-lto no-mold,/" include/package.mk
  29. sed -i "s/OpenWrt/Kwrt/g" package/base-files/files/bin/config_generate package/base-files/image-config.in config/Config-images.in Config.in include/u-boot.mk include/version.mk package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh || true