Compare commits
24 Commits
433e4bf971
...
fd3cef6915
| Author | SHA1 | Date | |
|---|---|---|---|
| fd3cef6915 | |||
| 82c53029e0 | |||
| be53ed782c | |||
| bc025c1c3d | |||
| 95f8d688cd | |||
| 38c4bdc864 | |||
| 90b9a68bd3 | |||
| edf0cd7910 | |||
| 8619045bbe | |||
| 214bd46da4 | |||
| b58093a243 | |||
| f251a19215 | |||
| 5a4f6e0988 | |||
| 99146b1913 | |||
| 18fc3abcc9 | |||
| 64c5b2bbc3 | |||
| 633356a6a3 | |||
| d5bedbd09c | |||
| 8bd218c677 | |||
| d496a1670d | |||
| cd86dcffbc | |||
| 254ca3b3ec | |||
| efe4666078 | |||
| 94da35b60e |
@@ -10,7 +10,7 @@
|
||||
#
|
||||
|
||||
# Set default release
|
||||
: "${RELEASE:="23.05.0-rc2"}"
|
||||
: "${RELEASE:="23.05.3"}"
|
||||
|
||||
printHelp() {
|
||||
debug "${FUNCNAME[0]}"
|
||||
@@ -43,7 +43,7 @@ printHelp() {
|
||||
|
||||
EXAMPLES
|
||||
./openwrtbuilder -p r4s -r snapshot
|
||||
./openwrtbuilder -p ax6000 -r 23.05.0-rc2 --source --debug
|
||||
./openwrtbuilder -p ax6000 -r 23.05.0-rc3 --source --debug
|
||||
./openwrtbuilder -p rpi4 -r 22.03.3 --flash /dev/sdX
|
||||
./openwrtbuilder -p linksys -r snapshot --ssh-upgrade root@192.168.1.1
|
||||
EOF
|
||||
@@ -232,13 +232,20 @@ installDependencies() {
|
||||
"diffutils"
|
||||
"python2"
|
||||
"python3"
|
||||
"python3-setuptools"
|
||||
"python3-pyelftools"
|
||||
"perl-base"
|
||||
"perl-Data-Dumper"
|
||||
"perl-File-Compare"
|
||||
"perl-File-Copy"
|
||||
"perl-FindBin"
|
||||
"perl-IPC-Cmd"
|
||||
"perl-Thread-Queue"
|
||||
"perl-Time-Piece"
|
||||
"perl-JSON-PP"
|
||||
"swig"
|
||||
"clang" # for qosify
|
||||
"llvm15-libs"
|
||||
)
|
||||
;;
|
||||
debian|ubuntu)
|
||||
@@ -457,7 +464,7 @@ makeImages() {
|
||||
PACKAGES="$PACKAGES" \
|
||||
FILES="$FILESDIR" \
|
||||
--directory="$BUILDDIR" \
|
||||
--jobs="$(nproc)" \
|
||||
--jobs="$(($(nproc) - 1))" \
|
||||
> "$BUILDDIR/make.log"
|
||||
}
|
||||
|
||||
@@ -570,7 +577,7 @@ fromSource() {
|
||||
[0-9][0-9].[0-9][0-9].*)
|
||||
local branch="openwrt-${RELEASE%.*}"
|
||||
local tag="v$RELEASE"
|
||||
if askOk "Use HEAD of $branch branch (y, recommended) or $tag tag (n)?"; then
|
||||
if askOk "Use $branch branch HEAD (y, recommended) or $tag tag (N)?"; then
|
||||
wt_commit="origin/$branch"
|
||||
else
|
||||
wt_commit="$tag"
|
||||
@@ -582,7 +589,7 @@ fromSource() {
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ -d "$GITWORKTREEDIR" ]] && rm -rf "$GITWORKTREEDIR"
|
||||
# [[ -d "$GITWORKTREEDIR" ]] && rm -rf "$GITWORKTREEDIR"
|
||||
|
||||
execute "${wt_cmd[@]}" "$wt_commit"
|
||||
|
||||
@@ -666,12 +673,13 @@ fromSource() {
|
||||
|
||||
# Make image
|
||||
(( DEBUG )) && make_opts+=("V=s")
|
||||
execute make "${make_opts[@]}" defconfig
|
||||
execute make "${make_opts[@]}" dirclean
|
||||
execute make "${make_opts[@]}" download
|
||||
#execute make -f Makefile.aperl inst_perl MAP_TARGET=perl
|
||||
#execute make -f Makefile.aperl map_clean
|
||||
execute make "${make_opts[@]}" "-j$(nproc)" world
|
||||
|
||||
execute make "${make_opts[@]}" defconfig download clean
|
||||
|
||||
make_opts+=("-j$(($(nproc) - 2))")
|
||||
#make_opts+=("-j1") # for debugging purposes
|
||||
|
||||
execute make "${make_opts[@]}" world
|
||||
|
||||
popd || return 1
|
||||
|
||||
@@ -698,7 +706,7 @@ extract() {
|
||||
debug "${FUNCNAME[0]}"
|
||||
declare archive="$1"
|
||||
declare out_dir="$2"
|
||||
if ! execute tar -xf "$archive" -C "$out_dir" --strip-components 1; then
|
||||
if ! execute tar -axf "$archive" -C "$out_dir" --strip-components 1; then
|
||||
echo "Extraction failed"
|
||||
return 1
|
||||
fi
|
||||
@@ -816,7 +824,7 @@ main() {
|
||||
|
||||
if [[ "$RELEASE" == "snapshot" ]]; then
|
||||
declare url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET"
|
||||
declare url_filename="openwrt-imagebuilder-${TARGET//\//-}.Linux-x86_64.tar.xz"
|
||||
declare url_filename="openwrt-imagebuilder-${TARGET//\//-}.Linux-x86_64.tar.zst"
|
||||
declare img_fname="openwrt-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
|
||||
else
|
||||
declare url_prefix="https://downloads.openwrt.org/releases/$RELEASE/targets/$TARGET"
|
||||
|
||||
29
profiles
29
profiles
@@ -53,8 +53,8 @@ r4s['packages']="\
|
||||
r4s['kopts']="\
|
||||
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y \
|
||||
CONFIG_BTRFS_PROGS_ZSTD=y \
|
||||
CONFIG_TARGET_ROOTFS_PARTSIZE=1024 \
|
||||
CONFIG_TARGET_KERNEL_PARTSIZE=128"
|
||||
CONFIG_TARGET_ROOTFS_PARTSIZE=512 \
|
||||
CONFIG_TARGET_KERNEL_PARTSIZE=32"
|
||||
r4s['files']="\
|
||||
/mnt/backup"
|
||||
|
||||
@@ -75,6 +75,18 @@ ax6000['packages']="\
|
||||
# -wpad-basic-mbedtls \
|
||||
# wpad-mesh-mbedtls"
|
||||
|
||||
# WDS mesh nodes
|
||||
declare -Ag ax6000_ap
|
||||
ax6000_ap['device']="xiaomi_redmi-router-ax6000-stock"
|
||||
ax6000_ap['target']="mediatek/filogic"
|
||||
ax6000_ap['release']="snapshot"
|
||||
ax6000_ap['filesystem']="squashfs"
|
||||
ax6000_ap['packages']="\
|
||||
$default_packages \
|
||||
avahi-daemon \
|
||||
smcroute \
|
||||
ca-bundle"
|
||||
|
||||
# For converted uboots
|
||||
# declare -Ag ax6000_uboot
|
||||
# ax6000_uboot['device']="xiaomi_redmi-router-ax6000-ubootmod"
|
||||
@@ -94,7 +106,7 @@ ax6000['packages']="\
|
||||
declare -Ag n5100
|
||||
n5100['device']="generic"
|
||||
n5100['target']="x86/64"
|
||||
n5100['filesystem']="ext4"
|
||||
n5100['filesystem']="squashfs"
|
||||
n5100['packages']="\
|
||||
$default_packages \
|
||||
luci-app-wireguard \
|
||||
@@ -108,6 +120,8 @@ n5100['packages']="\
|
||||
kmod-fs-btrfs \
|
||||
btrfs-progs \
|
||||
block-mount \
|
||||
cryptsetup \
|
||||
kmod-crypto-xts \
|
||||
smcroute \
|
||||
avahi-daemon \
|
||||
curl \
|
||||
@@ -116,13 +130,16 @@ n5100['packages']="\
|
||||
smartmontools \
|
||||
intel-microcode \
|
||||
lm-sensors \
|
||||
-libustream-wolfssl"
|
||||
samba4-server \
|
||||
luci-app-samba4 \
|
||||
tailscale \
|
||||
shadow-useradd"
|
||||
# The following are source mode only
|
||||
n5100['kopts']="\
|
||||
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y \
|
||||
CONFIG_BTRFS_PROGS_ZSTD=y \
|
||||
CONFIG_TARGET_ROOTFS_PARTSIZE=1024 \
|
||||
CONFIG_TARGET_KERNEL_PARTSIZE=128"
|
||||
CONFIG_TARGET_ROOTFS_PARTSIZE=512 \
|
||||
CONFIG_TARGET_KERNEL_PARTSIZE=32"
|
||||
n5100['files']="\
|
||||
/mnt/backup"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user