cyberchallenge-modem/build.sh
2020-05-21 16:52:16 +02:00

22 lines
750 B
Bash
Executable File

#!/usr/bin/env bash
# for dependencies
# apt install -t build-essential libncurses-dev bison flex libssl-dev libelf-dev
echo "[+] Starting build script..."
mkdir -p target/overlay/var/www/html
echo "[+] Cloning buildroot"
git clone https://github.com/buildroot/buildroot.git target/buildroot
echo "[+] Building the keygen"
echo "[+] Adding customization files"
cp -R buildroot/* target/buildroot # copy buildroot configs
cp -R conf/* target/overlay # copy target system config files
cp -R webpanel/* target/overlay/var/www/html # copy the webpanel
cp -R update/* target/overlay #copy the update script and certificate
echo "[+] Building the image"
N=`grep -c '^processor' /proc/cpuinfo`
cd target/buildroot
make pcengines_apu2_defconfig
make -j$N