2022-12-16 15:47:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-01-06 15:24:50 +00:00
|
|
|
# use the SDK to build the module:
|
|
|
|
# https://github.com/IchthysMaranatha/asterisk-chan-quectel
|
|
|
|
# The module is for two vendors, the Quectel-EC* and Simcom SIM7600. In
|
|
|
|
# preparation I bought one of each (EC25EUX and SIM7600G specifically), I don't
|
|
|
|
# really care if only one will work, then I'll just buy more of that specific
|
|
|
|
# vendor's model.
|
|
|
|
# now I noticed there is actually a Makefile for openwrt in the repo already:
|
|
|
|
# https://github.com/IchthysMaranatha/asterisk-chan-quectel/tree/master/openwrt
|
|
|
|
|
2023-01-12 02:55:05 +00:00
|
|
|
tar -xJf /Downloads/openwrt-sdk-${OPENWRT_VERSION}-*.tar.xz
|
|
|
|
|
|
|
|
cp -r feed openwrt-sdk-*/
|
2023-01-08 07:43:25 +00:00
|
|
|
|
2023-01-08 19:26:29 +00:00
|
|
|
pwd=$(pwd)
|
2023-01-12 02:55:05 +00:00
|
|
|
cd openwrt-sdk-*/
|
|
|
|
|
|
|
|
cp feeds.conf.default feeds.conf
|
|
|
|
cat ${pwd}/feeds.conf >> feeds.conf
|
2023-01-08 07:43:25 +00:00
|
|
|
|
|
|
|
./scripts/feeds update -a
|
|
|
|
./scripts/feeds install -a
|
|
|
|
|
|
|
|
make defconfig
|
2023-01-31 20:07:18 +00:00
|
|
|
echo 'CONFIG_PACKAGE_python3-packages=y' >> .config
|
|
|
|
echo 'CONFIG_PACKAGE_python3-packages-list="CherryPy==18.8.0"' >> .config
|
2023-01-08 07:43:25 +00:00
|
|
|
|
2023-01-31 20:07:18 +00:00
|
|
|
make package/python3-packages/compile
|
2023-01-12 02:55:05 +00:00
|
|
|
make package/asterisk-chan-quectel/compile
|
|
|
|
# no signing key
|
|
|
|
make package/index
|
2023-01-08 07:43:25 +00:00
|
|
|
|
2023-01-12 02:55:05 +00:00
|
|
|
sdkdir=$(pwd)
|
|
|
|
cd ${pwd}
|
2023-01-08 07:43:25 +00:00
|
|
|
|
2023-01-12 02:55:05 +00:00
|
|
|
tar -xJf /Downloads/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz
|
2023-01-08 07:43:25 +00:00
|
|
|
|
2023-01-12 02:55:05 +00:00
|
|
|
cd openwrt-imagebuilder-*/
|
|
|
|
cp ${sdkdir}/bin/targets/bcm27xx/bcm2711/packages/*.ipk packages/
|
2023-02-02 05:16:52 +00:00
|
|
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/packages/*.ipk packages/
|
2023-01-12 02:55:05 +00:00
|
|
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/telephony/*.ipk packages/
|
|
|
|
cp ${sdkdir}/bin/packages/aarch64_cortex-a72/quectel/*.ipk packages/
|
|
|
|
|
|
|
|
make info
|
2022-12-16 15:57:02 +00:00
|
|
|
|
2023-01-25 00:09:11 +00:00
|
|
|
# Double the size of the root partition
|
|
|
|
echo "CONFIG_TARGET_ROOTFS_PARTSIZE=208" >> .config
|
|
|
|
|
|
|
|
PACKAGES="kmod-nf-nathelper-extra kmod-rtc-ds1307 \
|
|
|
|
kmod-usb-audio kmod-usb-net-rtl8152 \
|
|
|
|
alsa-lib pciutils usbutils \
|
|
|
|
kmod-usb-net-qmi-wwan libqmi qmi-utils uqmi luci-proto-qmi \
|
|
|
|
shadow-usermod \
|
|
|
|
adguardhome \
|
|
|
|
asterisk \
|
|
|
|
asterisk-app-sms asterisk-pjsip asterisk-bridge-simple \
|
|
|
|
asterisk-codec-alaw asterisk-codec-ulaw \
|
|
|
|
asterisk-res-rtp-asterisk \
|
|
|
|
asterisk-chan-quectel \
|
2023-01-26 17:14:51 +00:00
|
|
|
ca-certificates \
|
2023-01-25 00:09:11 +00:00
|
|
|
collectd collectd-mod-contextswitch collectd-mod-cpu \
|
|
|
|
collectd-mod-curl \
|
|
|
|
collectd-mod-dhcpleases collectd-mod-disk \
|
|
|
|
collectd-mod-dns collectd-mod-entropy \
|
|
|
|
collectd-mod-ethstat collectd-mod-exec \
|
|
|
|
collectd-mod-filecount collectd-mod-fscache \
|
|
|
|
collectd-mod-interface collectd-mod-ipstatistics \
|
|
|
|
collectd-mod-iptables collectd-mod-irq \
|
|
|
|
collectd-mod-iwinfo collectd-mod-load \
|
|
|
|
collectd-mod-memory collectd-mod-network \
|
|
|
|
collectd-mod-nginx collectd-mod-ping \
|
|
|
|
collectd-mod-processes collectd-mod-protocols \
|
|
|
|
collectd-mod-sensors collectd-mod-smart \
|
|
|
|
collectd-mod-sqm collectd-mod-tcpconns \
|
|
|
|
collectd-mod-thermal collectd-mod-uptime \
|
|
|
|
collectd-mod-users collectd-mod-vmem \
|
|
|
|
collectd-mod-wireless \
|
|
|
|
curl etherwake fail2ban \
|
|
|
|
luci-app-https-dns-proxy luci-app-mwan3 luci-app-upnp \
|
2023-01-25 09:16:36 +00:00
|
|
|
luci-ssl-nginx luci-app-acme \
|
2023-01-31 20:07:18 +00:00
|
|
|
python3-packages python3-yaml \
|
2023-01-25 00:09:11 +00:00
|
|
|
wireguard-tools wget-ssl \
|
|
|
|
"
|
|
|
|
|
|
|
|
make image PROFILE=rpi-4 PACKAGES="${PACKAGES}"
|
|
|
|
|
|
|
|
make manifest PROFILE=rpi-4 PACKAGES="${PACKAGES}"
|
2022-12-21 01:24:29 +00:00
|
|
|
|
2023-01-08 19:26:29 +00:00
|
|
|
out=../../out
|
2023-01-06 15:24:50 +00:00
|
|
|
|
2023-01-08 19:26:29 +00:00
|
|
|
mkdir -p ${out}
|
2023-01-12 02:55:05 +00:00
|
|
|
mv bin/targets/bcm27xx/bcm2711/*.gz ${out}
|
|
|
|
mv packages ${out}
|