-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake.sh
More file actions
executable file
·32 lines (26 loc) · 775 Bytes
/
make.sh
File metadata and controls
executable file
·32 lines (26 loc) · 775 Bytes
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
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: ./setup.sh <board>"
echo "Example: ./setup.sh raspberrypi3"
exit 1
fi
cd ./buildroot
if [[ $1 == "menuconfig"* ]]; then
make BR2_EXTERNAL=../external_tree menuconfig
else
make BR2_EXTERNAL=../external_tree $1_defconfig
BOARDDIR=$1
export BOARDDIR
fi
echo "Do you want to execute 'make clean' before building? (y/N)"
read -r answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
echo "Cleaning..."
make clean
echo "Cleaned."
fi
echo "Building..."
make
# coping .img and .iso files from output/images to images folder. Don't worry about the error message if it cant find it for one of them.
cp ./output/images/*.img ../image/$BOARDDIR.img
cp ./output/images/*.iso ../image/$BOARDDIR.iso