-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_armhf.sh
26 lines (26 loc) · 1000 Bytes
/
build_armhf.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
#!/bin/bash
buildarch=armhf
apt install libext2fs2 debootstrap qemu-user-static wget
fallocate -l 1.8G smoothwan.img
mkfs.ext4 smoothwan.img
tune2fs -U 337d0b9f-8716-42b2-b316-312811aef984 smoothwan.img
mkdir mnt
mount smoothwan.img mnt/
cd mnt
debootstrap --arch=$buildarch buster . http://ftp.de.debian.org/debian
mount --bind /dev dev
mount --bind /proc proc
mount --bind /sys sys
ln -s /bin/bash bin/ash
chroot . sh -c "/usr/bin/apt update && apt -y install wget"
chroot . /usr/bin/echo "deb https://packages.ntop.org/apt/buster_pi/ armhf/" >> etc/apt/sources.list
chroot . /usr/bin/echo "deb https://packages.ntop.org/apt/buster_pi/ all/" >> etc/apt/sources.list
chroot . /usr/bin/apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update
chroot . /usr/bin/apt-get -y -o APT::Get::AllowUnauthenticated=true install ntopng
umount dev
umount proc
umount sys
cd ..
umount mnt
gzip smoothwan.img
mv smoothwan.img.gz smoothwan_debuster_armv7l.img.gz