Skip to content

Building HyperModem images from source

George edited this page Sep 2, 2020 · 1 revision

Define environment variables:

export OPENWRT_PATH=$HOME/openwrt
export HYPERMODEM_PATH=$HOME/hypermodem-packages
export OUTPUT_PATH=/tmp/images

Download the SDK and packages:

git clone https://git.openwrt.org/openwrt/openwrt.git $OPENWRT_PATH
git clone https://github.com/popura-network/hypermodem-packages.git $HYPERMODEM_PATH

Checkout to the latest stable version, i.e.:

cd $OPENWRT_PATH
git checkout v19.07.3

Create the feeds.conf file:

cp $OPENWRT_PATH/feeds.conf.default $OPENWRT_PATH/feeds.conf 
echo "src-link hypermodem $HYPERMODEM_PATH" >> $OPENWRT_PATH/feeds.conf

Create the $OPENWRT_PATH/hyperbuilder.sh script:

#!/bin/bash

./scripts/feeds update -a
./scripts/feeds install -a

for conf in `ls $HYPERMODEM_PATH/profiles/*.config`; do
	cp $conf .config
	make defconfig
	make download
	make -j5
done

mkdir -p $OUTPUT_PATH
# COPY images to $OUTPUT_PATH

# rpi
for fname in `find bin/targets -name *ext4-factory.img.gz`; do
	cp $fname $OUTPUT_PATH
done

# allwinner A20/A3X
for fname in `find bin/targets -name *ext4-sdcard.img.gz`; do
	cp $fname $OUTPUT_PATH
done

# x86
cp bin/targets/x86/generic/openwrt-x86-generic-combined-ext4.img.gz $OUTPUT_PATH

cd $OUTPUT_PATH

sha256sum *.img.gz > sha256sums.txt

cat sha256sums.txt

Run the hyperbuilder.sh script in the $OPENWRT_PATH directory. Compiled images will be copied to the $OUTPUT_PATH directory.

Clone this wiki locally