Initial commit
This commit is contained in:
30
_addons.config
Normal file
30
_addons.config
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
### alpine-fan-control
|
||||||
|
#GIT_FEED _alpine_fan_control=https://github.com/openwrt-xiaomi/openwrt-alpine-fan-control.git
|
||||||
|
CONFIG_FEED__alpine_fan_control=m
|
||||||
|
|
||||||
|
### qBittorrent
|
||||||
|
##GIT_FEED _qBittorrent=https://github.com/openwrt-xiaomi/qBittorrent-openwrt-package.git^887ebfb9f255f78926cc6c643580f897803619f3
|
||||||
|
#CONFIG_FEED__qBittorrent=m
|
||||||
|
|
||||||
|
### luci-app-temp-status
|
||||||
|
#GIT_PACKAGE luci-app-temp-status=https://github.com/openwrt-xiaomi/luci-app-temp-status.git master
|
||||||
|
|
||||||
|
### luci-app-disks-info
|
||||||
|
#GIT_PACKAGE luci-app-disks-info=https://github.com/openwrt-xiaomi/luci-app-disks-info.git master
|
||||||
|
|
||||||
|
### luci-app-diskman
|
||||||
|
#GIT_PACKAGE luci-app-diskman=https://github.com/openwrt-xiaomi/luci-app-diskman.git master
|
||||||
|
|
||||||
|
### luci-theme-argon
|
||||||
|
#GIT_PACKAGE luci-theme-argon=https://github.com/openwrt-xiaomi/luci-theme-argon.git master
|
||||||
|
|
||||||
|
### luci-app-tn-netports
|
||||||
|
#GIT_PACKAGE luci-app-tn-netports=https://github.com/openwrt-xiaomi/luci-app-tn-netports.git master
|
||||||
|
|
||||||
|
### luci-app-timecontrol
|
||||||
|
#GIT_PACKAGE luci-app-timecontrol=https://github.com/openwrt-xiaomi/luci-app-timecontrol.git main
|
||||||
|
|
||||||
|
### qBittorrent
|
||||||
|
##GIT_PACKAGE qBittorrent=https://github.com/openwrt-xiaomi/qBittorrent-openwrt-package.git for-openwrt-21.02
|
||||||
|
|
||||||
2
_argon.config
Normal file
2
_argon.config
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### Argon Theme
|
||||||
|
CONFIG_PACKAGE_luci-theme-argon=y
|
||||||
185
_base.config
Normal file
185
_base.config
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
CONFIG_FEED_luci=y
|
||||||
|
CONFIG_FEED_packages=y
|
||||||
|
CONFIG_FEED_routing=y
|
||||||
|
CONFIG_FEED_telephony=y
|
||||||
|
|
||||||
|
### For compatible official firmwares
|
||||||
|
CONFIG_ALL_KMODS=y
|
||||||
|
CONFIG_ALL_NONSHARED=y
|
||||||
|
CONFIG_DEVEL=y
|
||||||
|
CONFIG_KERNEL_KALLSYMS=n
|
||||||
|
CONFIG_COLLECT_KERNEL_DEBUG=y
|
||||||
|
|
||||||
|
### Per-package build logs in <buildroot>/logs
|
||||||
|
CONFIG_BUILD_LOG=y
|
||||||
|
|
||||||
|
### Include package list in build
|
||||||
|
CONFIG_INCLUDE_CONFIG=y
|
||||||
|
|
||||||
|
### Busybox
|
||||||
|
CONFIG_PACKAGE_busybox=y
|
||||||
|
CONFIG_BUSYBOX_CUSTOM=y
|
||||||
|
##CONFIG_BUSYBOX_CONFIG_DIFF=y
|
||||||
|
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
|
||||||
|
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
|
||||||
|
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS=y
|
||||||
|
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP=y
|
||||||
|
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH=y
|
||||||
|
|
||||||
|
### System utils
|
||||||
|
CONFIG_PACKAGE_dropbear=y
|
||||||
|
CONFIG_PACKAGE_uboot-envtools=y
|
||||||
|
CONFIG_PACKAGE_mtd-utils=y
|
||||||
|
CONFIG_PACKAGE_iw=y
|
||||||
|
CONFIG_PACKAGE_mc=y
|
||||||
|
CONFIG_PACKAGE_luci-app-ttyd=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-ttyd-ru=y
|
||||||
|
|
||||||
|
### Add-on programs
|
||||||
|
CONFIG_PACKAGE_iperf3=y
|
||||||
|
CONFIG_PACKAGE_htop=y
|
||||||
|
CONFIG_PACKAGE_nano=y
|
||||||
|
CONFIG_PACKAGE_ccrypt=y
|
||||||
|
CONFIG_PACKAGE_curl=y
|
||||||
|
CONFIG_PACKAGE_wget=y
|
||||||
|
CONFIG_PACKAGE_patch=y
|
||||||
|
CONFIG_PACKAGE_diffutils=y
|
||||||
|
CONFIG_PACKAGE_tree=y
|
||||||
|
CONFIG_PACKAGE_irqbalance=y
|
||||||
|
CONFIG_DROPBEAR_ECC=y
|
||||||
|
CONFIG_PACKAGE_terminfo=y
|
||||||
|
CONFIG_PACKAGE_zlib=y
|
||||||
|
CONFIG_PACKAGE_ethtool=y
|
||||||
|
CONFIG_PACKAGE_openssl-util=y
|
||||||
|
|
||||||
|
### USB device mount & file systems support
|
||||||
|
CONFIG_PACKAGE_gdisk=y
|
||||||
|
CONFIG_PACKAGE_parted=y
|
||||||
|
CONFIG_PACKAGE_e2fsprogs=y
|
||||||
|
CONFIG_PACKAGE_usbutils=y
|
||||||
|
CONFIG_PACKAGE_block-mount=y
|
||||||
|
CONFIG_PACKAGE_libblkid=y
|
||||||
|
CONFIG_PACKAGE_blkid=y
|
||||||
|
CONFIG_PACKAGE_lsblk=y
|
||||||
|
CONFIG_PACKAGE_lsblk=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-storage=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-cifs=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-exfat=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-ext4=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-hfsplus=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-msdos=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-vfat=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-f2fs=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-ntfs=y
|
||||||
|
CONFIG_PACKAGE_kmod-fs-squashfs=y
|
||||||
|
CONFIG_PACKAGE_kmod-nls-cp1250=y
|
||||||
|
CONFIG_PACKAGE_kmod-nls-cp437=y
|
||||||
|
CONFIG_PACKAGE_kmod-nls-cp850=y
|
||||||
|
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
|
||||||
|
CONFIG_PACKAGE_kmod-nls-iso8859-15=y
|
||||||
|
CONFIG_PACKAGE_kmod-nls-utf8=y
|
||||||
|
|
||||||
|
### WAN proto
|
||||||
|
CONFIG_PACKAGE_kmod-l2tp=y
|
||||||
|
CONFIG_PACKAGE_kmod-pppol2tp=y
|
||||||
|
CONFIG_PACKAGE_kmod-pptp=y
|
||||||
|
|
||||||
|
### PPTP support
|
||||||
|
CONFIG_PACKAGE_luci-proto-ppp=y
|
||||||
|
CONFIG_PACKAGE_ppp-mod-pptp=y
|
||||||
|
|
||||||
|
### kernel support for tunnels, VPNs
|
||||||
|
CONFIG_PACKAGE_kmod-tun=y
|
||||||
|
CONFIG_PACKAGE_kmod-br-netfilter=y
|
||||||
|
CONFIG_PACKAGE_gre=y
|
||||||
|
|
||||||
|
### Relay
|
||||||
|
CONFIG_PACKAGE_relayd=y
|
||||||
|
CONFIG_PACKAGE_luci-proto-relay=y
|
||||||
|
|
||||||
|
### IPv6 support
|
||||||
|
CONFIG_PACKAGE_6in4=y
|
||||||
|
CONFIG_PACKAGE_6to4=y
|
||||||
|
CONFIG_PACKAGE_6rd=y
|
||||||
|
|
||||||
|
### IPv6 NAT support (ip6tables NAT extensions, ipt-nat6 and nf-nat6 kmods)
|
||||||
|
##CONFIG_PACKAGE_ip6tables-mod-nat=y
|
||||||
|
|
||||||
|
### SSL certificates
|
||||||
|
CONFIG_PACKAGE_ca-certificates=y
|
||||||
|
|
||||||
|
### Luci
|
||||||
|
CONFIG_LUCI_LANG_en=y
|
||||||
|
CONFIG_LUCI_LANG_ru=y
|
||||||
|
CONFIG_PACKAGE_luci=y
|
||||||
|
CONFIG_PACKAGE_luci-compat=y
|
||||||
|
CONFIG_PACKAGE_luci-base=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-base-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-mod-admin-full=y
|
||||||
|
CONFIG_PACKAGE_luci-mod-network=y
|
||||||
|
CONFIG_PACKAGE_luci-mod-status=y
|
||||||
|
CONFIG_PACKAGE_luci-mod-system=y
|
||||||
|
CONFIG_PACKAGE_luci-app-commands=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-commands-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-ddns=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-ddns-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-firewall=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-firewall-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-opkg=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-opkg-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-uhttpd=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-uhttpd-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-upnp=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-upnp-ru=y
|
||||||
|
|
||||||
|
### Luci themes
|
||||||
|
CONFIG_PACKAGE_luci-theme-bootstrap=y
|
||||||
|
CONFIG_PACKAGE_luci-theme-material=y
|
||||||
|
CONFIG_PACKAGE_luci-theme-openwrt=y
|
||||||
|
CONFIG_PACKAGE_luci-theme-openwrt-2020=y
|
||||||
|
|
||||||
|
### LuCI with HTTPS support (WolfSSL as SSL backend)
|
||||||
|
CONFIG_PACKAGE_luci-ssl=y
|
||||||
|
|
||||||
|
### Luci statistics
|
||||||
|
CONFIG_PACKAGE_luci-app-statistics=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-statistics-ru=y
|
||||||
|
CONFIG_PACKAGE_collectd-mod-conntrack=y
|
||||||
|
CONFIG_PACKAGE_collectd-mod-cpufreq=y
|
||||||
|
CONFIG_PACKAGE_collectd-mod-entropy=y
|
||||||
|
CONFIG_PACKAGE_collectd-mod-ping=y
|
||||||
|
CONFIG_PACKAGE_collectd-mod-thermal=y
|
||||||
|
CONFIG_PACKAGE_collectd-mod-uptime=y
|
||||||
|
|
||||||
|
### WLAN/WPS support
|
||||||
|
CONFIG_PACKAGE_wpad-wolfssl=y
|
||||||
|
CONFIG_WPA_SUPPLICANT_INTERNAL=y
|
||||||
|
CONFIG_WPA_RFKILL_SUPPORT=y
|
||||||
|
## CONFIG_WPA_MSG_MIN_PRIORITY=2
|
||||||
|
## CONFIG_WPA_MSG_MIN_PRIORITY=4
|
||||||
|
|
||||||
|
### Wake On Lan
|
||||||
|
##CONFIG_PACKAGE_luci-app-wol=y
|
||||||
|
##CONFIG_PACKAGE_luci-i18n-wol-ru=y
|
||||||
|
|
||||||
|
### WatchCat - Restart network interfaces or reboot if pings to hosts fail, or set up periodic reboots
|
||||||
|
CONFIG_PACKAGE_luci-app-watchcat=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-watchcat-ru=y
|
||||||
|
|
||||||
|
### IP Tables tool
|
||||||
|
CONFIG_PACKAGE_kmod-ipt-ipopt=y
|
||||||
|
CONFIG_PACKAGE_iptables-mod-ipopt=y
|
||||||
|
|
||||||
|
### Adblock package with Luci support
|
||||||
|
CONFIG_PACKAGE_adblock=y
|
||||||
|
CONFIG_PACKAGE_luci-app-adblock=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-adblock-ru=y
|
||||||
|
|
||||||
|
### BanIP package with Luci support
|
||||||
|
CONFIG_PACKAGE_banip=y
|
||||||
|
CONFIG_PACKAGE_luci-app-banip=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-banip-ru=y
|
||||||
|
|
||||||
|
### nlbwmon app (OpenWrt Traffic Usage Monitor)
|
||||||
|
CONFIG_PACKAGE_luci-app-nlbwmon=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-nlbwmon-ru=y
|
||||||
5
_printer.config
Normal file
5
_printer.config
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
### USB Printer support
|
||||||
|
CONFIG_PACKAGE_kmod-usb-printer=y
|
||||||
|
CONFIG_PACKAGE_p910nd=y
|
||||||
|
CONFIG_PACKAGE_luci-app-p910nd=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-app-p910nd-ru=y
|
||||||
9
_proxy.config
Normal file
9
_proxy.config
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
### DNS and Proxy
|
||||||
|
CONFIG_PACKAGE_luci-app-nextdns=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-nextdns-ru=y
|
||||||
|
|
||||||
|
CONFIG_PACKAGE_luci-app-dnscrypt-proxy=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-dnscrypt-proxy-ru=y
|
||||||
|
|
||||||
|
CONFIG_PACKAGE_dnscrypt-proxy2=y
|
||||||
|
|
||||||
4
_samba.config
Normal file
4
_samba.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
### Samba
|
||||||
|
CONFIG_PACKAGE_luci-app-samba4=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-samba4-ru=y
|
||||||
|
CONFIG_PACKAGE_samba4-utils=y
|
||||||
10
_torrents.config
Normal file
10
_torrents.config
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
### Torrent clients
|
||||||
|
CONFIG_PACKAGE_transmission-web=y
|
||||||
|
#CONFIG_PACKAGE_transmission-web-control=y
|
||||||
|
CONFIG_PACKAGE_luci-app-transmission=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-transmission-ru=y
|
||||||
|
|
||||||
|
CONFIG_PACKAGE_luci-app-minidlna=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-minidlna-ru=y
|
||||||
|
|
||||||
|
|
||||||
6
_wifi_en.config
Normal file
6
_wifi_en.config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
### WiFi default config
|
||||||
|
CONFIG_PACKAGE_MAC80211_ENABLE=y
|
||||||
|
CONFIG_PACKAGE_MAC80211_COUNTRY="US"
|
||||||
|
#CONFIG_PACKAGE_MAC80211_SSID=""
|
||||||
|
CONFIG_PACKAGE_MAC80211_ENCRYPTION="psk2"
|
||||||
|
CONFIG_PACKAGE_MAC80211_PASSWORD="12345678"
|
||||||
61
r3d.config
Normal file
61
r3d.config
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
CONFIG_TARGET_ipq806x=y
|
||||||
|
CONFIG_TARGET_ipq806x_generic=y
|
||||||
|
CONFIG_TARGET_ipq806x_generic_DEVICE_xiaomi_r3d=y
|
||||||
|
|
||||||
|
#CONFIG_TARGET_MULTI_PROFILE=y
|
||||||
|
#CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_xiaomi_r3d="-dnsmasq"
|
||||||
|
#CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||||
|
|
||||||
|
#include _addons.config
|
||||||
|
#include _base.config
|
||||||
|
#include _wifi_en.config
|
||||||
|
#include _printer.config
|
||||||
|
#include _samba.config
|
||||||
|
#include _torrents.config
|
||||||
|
#include _proxy.config
|
||||||
|
#include _argon.config
|
||||||
|
|
||||||
|
### Temp and sensors
|
||||||
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
|
CONFIG_PACKAGE_lm-sensors-detect=y
|
||||||
|
CONFIG_PACKAGE_alpine-fan-control=y
|
||||||
|
CONFIG_PACKAGE_luci-app-alpine-fan-control=y
|
||||||
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
|
|
||||||
|
### HDD tools
|
||||||
|
CONFIG_PACKAGE_smartmontools=y
|
||||||
|
CONFIG_PACKAGE_hdparm=y
|
||||||
|
CONFIG_PACKAGE_hd-idle=y
|
||||||
|
CONFIG_PACKAGE_luci-app-hd-idle=y
|
||||||
|
#CONFIG_PACKAGE_luci-i18n-hd-idle-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-disks-info=y
|
||||||
|
#CONFIG_PACKAGE_luci-i18n-disks-info-ru=y
|
||||||
|
CONFIG_PACKAGE_luci-app-diskman=y
|
||||||
|
|
||||||
|
### Network Ports viewer
|
||||||
|
CONFIG_PACKAGE_luci-app-tn-netports=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-tn-netports-ru=y
|
||||||
|
|
||||||
|
### Network traffic
|
||||||
|
CONFIG_PACKAGE_luci-app-sqm=y
|
||||||
|
CONFIG_PACKAGE_luci-i18n-sqm-ru=y
|
||||||
|
|
||||||
|
### TimeControl
|
||||||
|
CONFIG_PACKAGE_luci-app-timecontrol=y
|
||||||
|
|
||||||
|
### qBittorrent
|
||||||
|
#CONFIG_PACKAGE_boost=y
|
||||||
|
#CONFIG_PACKAGE_boost-system=y
|
||||||
|
#CONFIG_PACKAGE_rblibtorrent=y
|
||||||
|
#CONFIG_PACKAGE_qBittorrent=y
|
||||||
|
|
||||||
|
### FileBrowser
|
||||||
|
CONFIG_PACKAGE_luci-app-filebrowser=y
|
||||||
|
|
||||||
|
### DNSMasq
|
||||||
|
CONFIG_PACKAGE_dnsmasq-full=y
|
||||||
|
|
||||||
|
### CPU Freq
|
||||||
|
CONFIG_PACKAGE_luci-app-cpufreq=y
|
||||||
|
|
||||||
110
xcommon.sh
Normal file
110
xcommon.sh
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
XSUPPORTEDVER=21
|
||||||
|
XREPOADDR=https://github.com/openwrt-xiaomi
|
||||||
|
XDEFBRANCH=xq-21.02.1
|
||||||
|
|
||||||
|
logmsg() {
|
||||||
|
echo "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
logerr() {
|
||||||
|
echo "ERROR: $@" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
die() {
|
||||||
|
logerr $@
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#[ ! -d "$XDIR" ] && die "Base directory not defined"
|
||||||
|
|
||||||
|
get_cfg_inc_lst() {
|
||||||
|
local cfg=$1
|
||||||
|
local k=$( grep -o -P '(?<=^#include ).*' "$cfg" 2> /dev/null )
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_feed_lst() {
|
||||||
|
local cfg=$1
|
||||||
|
local k=$( grep -o -P '(?<=^CONFIG_FEED_).*(?==[y|m])' "$cfg" 2> /dev/null )
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_feed_url() {
|
||||||
|
local cfg=$1
|
||||||
|
local name=$2
|
||||||
|
local k=$( grep -o -P "(?<=^#GIT_FEED $name=).*" "$cfg" 2> /dev/null )
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_expkg_lst() {
|
||||||
|
local cfg=$1
|
||||||
|
local k=$( grep -o -P '(?<=^#GIT_PACKAGE ).*(?==)' "$cfg" 2> /dev/null )
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_expkg_url() {
|
||||||
|
local cfg=$1
|
||||||
|
local name=$2
|
||||||
|
local k=$( grep -o -P "(?<=^#GIT_PACKAGE $name=).*" "$cfg" 2> /dev/null )
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_board() {
|
||||||
|
local cfg=$1
|
||||||
|
local k=$( grep -o -P "(?<=^CONFIG_TARGET_)[a-z0-9]+(?==y)" "$cfg" 2> /dev/null )
|
||||||
|
[ $( echo "$k" | wc -l ) != 1 ] && { echo ""; return 0; }
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_subtarget() {
|
||||||
|
local cfg=$1
|
||||||
|
local board=$2
|
||||||
|
local k=$( grep -o -P "(?<=^CONFIG_TARGET_"$board"_)[a-z0-9]+(?==y)" "$cfg" 2> /dev/null )
|
||||||
|
[ $( echo "$k" | wc -l ) != 1 ] && { echo ""; return 0; }
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_dev_lst() {
|
||||||
|
local cfg=$1
|
||||||
|
local board=$2
|
||||||
|
local subtarget=$3
|
||||||
|
local k=$( grep -o -P "(?<=^CONFIG_TARGET_"$board"_"$subtarget"_DEVICE_).*(?==y)" "$cfg" 2> /dev/null )
|
||||||
|
[ $( echo "$k" | wc -l ) != 1 ] && { echo ""; return 0; }
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_cfg_pkg_flag() {
|
||||||
|
local cfg=$1
|
||||||
|
local name=$2
|
||||||
|
local k=$( grep -o -P "(?<=^CONFIG_PACKAGE_$name=).*" "$cfg" 2> /dev/null )
|
||||||
|
echo "$k"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
35
xcreate.sh
Normal file
35
xcreate.sh
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
export XDIR=$SCRIPT_DIR
|
||||||
|
|
||||||
|
. ./xcommon.sh
|
||||||
|
|
||||||
|
[ -z "$*" ] && die "No options found!"
|
||||||
|
|
||||||
|
while getopts "v:" opt; do
|
||||||
|
case $opt in
|
||||||
|
v ) TARGET_BRANCH=$OPTARG;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -z "$TARGET_BRANCH" ] && TARGET_BRANCH=$XDEFBRANCH
|
||||||
|
|
||||||
|
[ -d "$XDIR/$TARGET_BRANCH" ] && die "Directory '$TARGET_BRANCH' already exist!"
|
||||||
|
|
||||||
|
XREPOWRT=$XREPOADDR/openwrt.git
|
||||||
|
git clone $XREPOWRT -b $TARGET_BRANCH $TARGET_BRANCH
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
rm -rf ./$TARGET_BRANCH
|
||||||
|
die "Repository '$XREPOWRT' not found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
XTOPDIR=$XDIR/$TARGET_BRANCH
|
||||||
|
|
||||||
|
find . -maxdepth 1 -type f -name "*.sh" -exec chmod 775 -- {} + >/dev/null
|
||||||
|
find . -maxdepth 1 -type f -name "*.sh" -exec cp {} $XTOPDIR \; >/dev/null
|
||||||
|
find . -maxdepth 1 -type f -name "*.config" -exec cp {} $XTOPDIR \; >/dev/null
|
||||||
|
|
||||||
|
echo "Repository '$TARGET_BRANCH' created!"
|
||||||
|
#cd $XTOPDIR
|
||||||
|
|
||||||
53
xmake.sh
Normal file
53
xmake.sh
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
export XDIR=$SCRIPT_DIR
|
||||||
|
|
||||||
|
. ./xcommon.sh
|
||||||
|
|
||||||
|
XTARGET=
|
||||||
|
OPT_FULL_REBUILD=false
|
||||||
|
while getopts "t:f" opt; do
|
||||||
|
case $opt in
|
||||||
|
t) XTARGET=$OPTARG;;
|
||||||
|
f) OPT_FULL_REBUILD=true;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -z "$XTARGET" ] && die "Target config not specified!"
|
||||||
|
CFG=$XDIR/$XTARGET.config
|
||||||
|
[ ! -f "$CFG" ] && die "File '$XTARGET.config' not found!"
|
||||||
|
|
||||||
|
if [ "$OPT_FULL_REBUILD" = "true" ]; then
|
||||||
|
make clean
|
||||||
|
rm -rf tmp
|
||||||
|
#rm -rf feeds/luci.tmp
|
||||||
|
#rm -rf feeds/packages.tmp
|
||||||
|
#rm -rf staging_dir/packages
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f .config
|
||||||
|
cp -f "$CFG" .config
|
||||||
|
inclst=$( get_cfg_inc_lst $CFG )
|
||||||
|
for inc in $inclst; do
|
||||||
|
echo -e "\n\n" >> .config
|
||||||
|
[ ! -f "$XDIR/$inc" ] && die "File '$inc' not found!"
|
||||||
|
cat $XDIR/$inc >> .config
|
||||||
|
done
|
||||||
|
#cp -f .config current.config
|
||||||
|
|
||||||
|
make defconfig
|
||||||
|
|
||||||
|
if [ $( get_cfg_pkg_flag "$XDIR/.config" "dnsmasq-full" ) = "y" ]; then
|
||||||
|
echo "Forced using dnsmasq-full !!!"
|
||||||
|
sed -i '/CONFIG_DEFAULT_dnsmasq=y/d' $XDIR/.config
|
||||||
|
sed -i '/CONFIG_PACKAGE_dnsmasq=y/d' $XDIR/.config
|
||||||
|
fi
|
||||||
|
|
||||||
|
MAKE_JOBS=$( grep processor /proc/cpuinfo | tail -n 1 | awk '{print $3}' )
|
||||||
|
|
||||||
|
#make tools/install -j$MAKE_JOBS
|
||||||
|
#make toolchain/install -j$MAKE_JOBS
|
||||||
|
|
||||||
|
make PARALLEL_BUILD=1 -j $MAKE_JOBS download world
|
||||||
|
|
||||||
78
xupdate.sh
Normal file
78
xupdate.sh
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
export XDIR=$SCRIPT_DIR
|
||||||
|
export XADDONSDIR=$XDIR/package/addons
|
||||||
|
FEEDSDIR=$XDIR/package/feeds
|
||||||
|
ADDONSCFG=$XDIR/_addons.config
|
||||||
|
|
||||||
|
. ./xcommon.sh
|
||||||
|
|
||||||
|
OPT_FULL_UPDATE=false
|
||||||
|
while getopts "f" opt; do
|
||||||
|
case $opt in
|
||||||
|
f) OPT_FULL_UPDATE=true;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
[ ! -d "$FEEDSDIR/package" ] && OPT_FULL_UPDATE=true
|
||||||
|
|
||||||
|
rm -rf tmp
|
||||||
|
if [ "$OPT_FULL_UPDATE" = "true" ]; then
|
||||||
|
rm -rf feeds/luci.tmp
|
||||||
|
rm -rf feeds/packages.tmp
|
||||||
|
#rm -rf feeds
|
||||||
|
#rm -rf package/feeds
|
||||||
|
rm -rf staging_dir/packages
|
||||||
|
rm -rf $XADDONSDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
git reset --hard HEAD
|
||||||
|
|
||||||
|
git fetch
|
||||||
|
[ "$?" != "0" ] && die "Can't fetch current repository"
|
||||||
|
|
||||||
|
git pull --force "origin"
|
||||||
|
[ "$?" != "0" ] && die "Can't pull current repository"
|
||||||
|
|
||||||
|
rm -f feeds.conf
|
||||||
|
cp -f feeds.conf.default feeds.conf
|
||||||
|
feed_lst=$( get_cfg_feed_lst "$ADDONSCFG" )
|
||||||
|
for feed in $feed_lst; do
|
||||||
|
value=$( get_cfg_feed_url "$ADDONSCFG" $feed )
|
||||||
|
#echo "$feed = '$value'"
|
||||||
|
echo "src-git $feed $value" >> feeds.conf
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$OPT_FULL_UPDATE" = "true" ]; then
|
||||||
|
./scripts/feeds update -a
|
||||||
|
./scripts/feeds install -a
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLONE_ADDONS=true
|
||||||
|
if [ "$CLONE_ADDONS" = "true" ]; then
|
||||||
|
mkdir $XADDONSDIR
|
||||||
|
pkg_lst=$( get_cfg_expkg_lst "$ADDONSCFG" )
|
||||||
|
for pkg in $pkg_lst; do
|
||||||
|
value=$( get_cfg_expkg_url "$ADDONSCFG" $pkg )
|
||||||
|
#echo "$pkg = '$value'"
|
||||||
|
url=$( echo "$value" | cut -d " " -f 1 )
|
||||||
|
branch=$( echo "$value" | cut -d " " -f 2 )
|
||||||
|
#echo "'$url' / '$branch'"
|
||||||
|
if [ ! -d "$XADDONSDIR/$pkg" ]; then
|
||||||
|
git clone $url -b $branch $XADDONSDIR/$pkg
|
||||||
|
[ "$?" != "0" ] && die "Can't clone repository '$url'"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$OPT_FULL_UPDATE" = "true" ]; then
|
||||||
|
./scripts/feeds install -a
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$OPT_FULL_UPDATE" = "true" ]; then
|
||||||
|
./vermagic_update.sh ipq806x generic
|
||||||
|
./vermagic_update.sh ramips mt7621
|
||||||
|
./vermagic_update.sh mediatek mt7622
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "All git sources updated!"
|
||||||
Reference in New Issue
Block a user