Compare commits
2 Commits
2ce592b693
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d83b552c7 | |||
| ec8fb8f960 |
@@ -1,25 +1,25 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Build and deploy OpenWRT images using shell-style device profiles, via source code or the official Image Builder.
|
# Build and deploy OpenWRT images using shell-style device profiles, via source code or the official Image Builder.
|
||||||
# Copyright 2022-25 Bryan C. Roessler
|
# Copyright 2022-26 Bryan C. Roessler
|
||||||
# Apache 2.0 License
|
# Apache 2.0 License
|
||||||
# See README and ./profiles for device configuration
|
# See README and ./profiles for device configuration
|
||||||
|
|
||||||
# Set default release
|
# Set default release
|
||||||
: "${DEFAULT_RELEASE:=${RELEASE:="25.12.3"}}"
|
: "${DEFAULT_RELEASE:=${RELEASE:="25.12.3"}}" # do find all replace
|
||||||
|
|
||||||
# @internal
|
# @internal
|
||||||
print_help() {
|
usage() {
|
||||||
debug "${FUNCNAME[0]}"
|
debug "${FUNCNAME[0]}"
|
||||||
|
|
||||||
cat <<-'EOF'
|
cat <<-'EOF'
|
||||||
Build and deploy OpenWRT images using convenient profiles.
|
Build and deploy OpenWRT images using convenient profiles.
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
openwrtbuilder [OPTION [VALUE]]... -p PROFILE [-p PROFILE]...
|
openwrtbuilder [OPTIONS] [-p PROFILE]...
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
--profile,-p PROFILE
|
--profile,-p PROFILE
|
||||||
--release,-r,--version,-v RELEASE ("snapshot", "24.10.5")
|
--release,-r,--version,-v RELEASE ("snapshot", "25.12.3")
|
||||||
Default: From profile or hardcoded RELEASE
|
Default: From profile or hardcoded RELEASE
|
||||||
--buildroot,-b PATH
|
--buildroot,-b PATH
|
||||||
Default: location of openwrtbuilder script
|
Default: location of openwrtbuilder script
|
||||||
@@ -45,7 +45,7 @@ print_help() {
|
|||||||
EXAMPLES
|
EXAMPLES
|
||||||
openwrtbuilder -p r4s -r snapshot
|
openwrtbuilder -p r4s -r snapshot
|
||||||
openwrtbuilder -p ax6000 -r 23.05.0-rc3 --mode source --debug
|
openwrtbuilder -p ax6000 -r 23.05.0-rc3 --mode source --debug
|
||||||
openwrtbuilder -p rpi4 -r 24.10.0 --flash /dev/sdX
|
openwrtbuilder -p rpi4 -r 25.12.3 --flash /dev/sdX
|
||||||
openwrtbuilder -p linksys -r snapshot --ssh-upgrade root@192.168.1.1
|
openwrtbuilder -p linksys -r snapshot --ssh-upgrade root@192.168.1.1
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ init() {
|
|||||||
else
|
else
|
||||||
echo "/etc/os-release not found"
|
echo "/etc/os-release not found"
|
||||||
echo "Your OS is unsupported"
|
echo "Your OS is unsupported"
|
||||||
print_help
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -149,14 +149,14 @@ parse_input() {
|
|||||||
--depends) FORCE_DEPENDS=1 ;;
|
--depends) FORCE_DEPENDS=1 ;;
|
||||||
--yes|-y) YES=1 ;;
|
--yes|-y) YES=1 ;;
|
||||||
--debug|-d) echo "Debugging on"; DEBUG=1 ;;
|
--debug|-d) echo "Debugging on"; DEBUG=1 ;;
|
||||||
--help|-h) print_help; exit 0 ;;
|
--help|-h) usage; exit 0 ;;
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "Incorrect options provided"
|
echo "Incorrect options provided"
|
||||||
print_help; exit 1
|
usage; exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
profiles
2
profiles
@@ -31,7 +31,6 @@ declare -Ag r4s=(
|
|||||||
[kconfigs]="${default_kconfigs[*]} \
|
[kconfigs]="${default_kconfigs[*]} \
|
||||||
CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32 \
|
CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32 \
|
||||||
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_PROGS_ZSTD=y"
|
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_PROGS_ZSTD=y"
|
||||||
[files]="/mnt/backup"
|
|
||||||
# For 24.10 branch (Linux 6.6)
|
# For 24.10 branch (Linux 6.6)
|
||||||
# [cherrypicks]="https://github.com/wurzerj/openwrt.git:59d6e31 \
|
# [cherrypicks]="https://github.com/wurzerj/openwrt.git:59d6e31 \
|
||||||
# https://github.com/wurzerj/openwrt.git:bb251b8" # fix inconsistent reboot
|
# https://github.com/wurzerj/openwrt.git:bb251b8" # fix inconsistent reboot
|
||||||
@@ -69,7 +68,6 @@ declare -Ag n5100=(
|
|||||||
[kconfigs]="${default_kconfigs[*]} \
|
[kconfigs]="${default_kconfigs[*]} \
|
||||||
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_PROGS_ZSTD=y \
|
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_PROGS_ZSTD=y \
|
||||||
CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32"
|
CONFIG_TARGET_ROOTFS_PARTSIZE=512 CONFIG_TARGET_KERNEL_PARTSIZE=32"
|
||||||
# [files]="/mnt/backup"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -Ag w1700k=(
|
declare -Ag w1700k=(
|
||||||
|
|||||||
Reference in New Issue
Block a user