-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·35 lines (28 loc) · 1.24 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
TARGET=${TARGET:-"bcm27xx"}
SUBTARGET=${SUBTARGET:-"bcm2711"}
PROFILE=${PROFILE:-"rpi-4"}
EXTRA_PACKAGES=${EXTRA_PACKAGES}
FILES=${FILES:-"../files/generic"}
OPENWRT_MIRROR=https://downloads.openwrt.org
OPENWRT_VERSION="21.02.1"
DEFAULT_PACKAGES="luci \
luci-proto-ppp luci-proto-3g luci-proto-ncm luci-proto-qmi luci-proto-gre luci-proto-wireguard luci-proto-ipv6 \
luci-app-yggdrasil luci-app-ddns \
luci-i18n-base-ru luci-theme-openwrt-2020 \
usb-modeswitch kmod-usb-wdm kmod-usb-net-cdc-ether umbim kmod-usb-net-cdc-mbim \
kmod-mt7601u \
wpad -wpad-basic-wolfssl \
xl2tpd stubby drill getdns"
PACKAGES="$DEFAULT_PACKAGES $EXTRA_PACKAGES"
file_name=openwrt-imagebuilder-$OPENWRT_VERSION-$TARGET-$SUBTARGET.Linux-x86_64.tar.xz
builder_directory=openwrt-imagebuilder-$OPENWRT_VERSION-$TARGET-$SUBTARGET.Linux-x86_64
if [ ! -d $builder_directory ]; then
echo "download and extract the builder"
IMAGE_BUILDER_URL=$OPENWRT_MIRROR/releases/$OPENWRT_VERSION/targets/$TARGET/$SUBTARGET/$file_name
wget $IMAGE_BUILDER_URL && tar xJf $file_name || exit 2
fi
cd $builder_directory
make image FILES="$FILES" PROFILE="$PROFILE" PACKAGES="$PACKAGES"
echo -e "\n\nSuccess! Your HyperModem firmware:\n"
ls $PWD/bin/targets/$TARGET/$SUBTARGET/*