Compare commits
3 Commits
d51c9e6359
...
6f6d92b659
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f6d92b659 | |||
| 961a87fb6c | |||
| 63cd99cd4d |
13
README.md
13
README.md
@@ -1,6 +1,6 @@
|
||||
# openwrtbuilder
|
||||
|
||||
Sanely build and deploy OpenWRT images using the Image Builder or from source code
|
||||
Sanely build and deploy OpenWRT images using the Image Builder or from source code.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -11,11 +11,10 @@ Sanely build and deploy OpenWRT images using the Image Builder or from source co
|
||||
```(text)
|
||||
--profile,-p PROFILE
|
||||
--release,-r,--version,-v RELEASE ("snapshot", "22.03.3")
|
||||
--buildroot,-b PATH
|
||||
Default: location of openwrtbuilder script
|
||||
--buildroot,-b PATH (Default: script directory)
|
||||
--source
|
||||
Build image from source, not from Image Builder
|
||||
Allows make config options to be passed
|
||||
Allows make config options to be passed in profile
|
||||
--ssh-upgrade HOST
|
||||
Example: root@192.168.1.1
|
||||
--ssh-backup SSH_PATH
|
||||
@@ -25,6 +24,8 @@ Sanely build and deploy OpenWRT images using the Image Builder or from source co
|
||||
--reset
|
||||
Cleanup all source and output files
|
||||
Can be combined with -p to reset a specific profile
|
||||
--yes,-y
|
||||
Assume yes for all questions (automatic mode)
|
||||
--debug,-d
|
||||
--help,-h
|
||||
```
|
||||
@@ -36,8 +37,8 @@ See `./profiles` for example device profile definitions.
|
||||
## Examples
|
||||
|
||||
* `./openwrtbuilder -p r4s -r snapshot --debug`
|
||||
* `./openwrtbuilder -p ax6000 -r 22.03.3 --source --debug`
|
||||
* `./openwrtbuilder -p rpi4 -r 22.03.3 --flash /dev/sdX`
|
||||
* `./openwrtbuilder -p ax6000 -r 23.05.5 --source --debug`
|
||||
* `./openwrtbuilder -p rpi4 -r 23.05.5 --flash /dev/sdX`
|
||||
* `./openwrtbuilder -p linksys -r snapshot --ssh-upgrade root@192.168.1.1`
|
||||
|
||||
## Additional Info
|
||||
|
||||
@@ -153,12 +153,17 @@ parse_input() {
|
||||
|
||||
install_dependencies() {
|
||||
debug "${FUNCNAME[0]}"
|
||||
local lock_file="$BUILDROOT/.dependencies"
|
||||
local -a pkg_list
|
||||
|
||||
# TODO please contribute your platform here
|
||||
local lock_file
|
||||
if ((FROM_SOURCE)); then
|
||||
# For building from source with make
|
||||
lock_file="$BUILDROOT/.dependencies_sc"
|
||||
else
|
||||
lock_file="$BUILDROOT/.dependencies_ib"
|
||||
fi
|
||||
|
||||
if [[ ! -f $lock_file ]]; then
|
||||
if ((FROM_SOURCE)); then
|
||||
# For building from source code
|
||||
# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
|
||||
case "$ID" in
|
||||
fedora|centos)
|
||||
@@ -304,9 +309,7 @@ install_dependencies() {
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Skip dependency installation if lock file is present
|
||||
[[ -f $lock_file ]] && return
|
||||
fi
|
||||
|
||||
pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file"
|
||||
}
|
||||
@@ -769,10 +772,15 @@ main() {
|
||||
extract "$ib_file" "$BUILDDIR" || return $?
|
||||
add_repos
|
||||
make_images
|
||||
# Verify output iamges
|
||||
for outfile in "$BINDIR"/*.img.gz; do
|
||||
# Verify output image for stock builds (in testing)
|
||||
if [[ ! -v P_ARR[packages] || -z ${P_ARR[packages]} ]]; then
|
||||
shopt -s nullglob
|
||||
local -a outfiles=("$BINDIR"/*.img.gz "$BINDIR"/*.img)
|
||||
shopt -u nullglob
|
||||
for outfile in "${outfiles[@]}"; do
|
||||
verify "$outfile" "$ib_sha256_file" || return 1
|
||||
done
|
||||
fi
|
||||
#copyFiles
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user