-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.bash
executable file
·48 lines (35 loc) · 1.09 KB
/
.travis.bash
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
BUILDROOT_RELEASE=2014.08
cd ~
# Install dependencies.
apt-get update && DEBIAN_FRONTEND=noninteractive\
apt-get install -y build-essential libncurses5-dev rsync cpio python unzip bc wget
# Install Buildroot.
wget -nv http://buildroot.uclibc.org/downloads/buildroot-$BUILDROOT_RELEASE.tar.bz2 &&\
tar xf buildroot-*.tar* &&\
rm buildroot-*.tar* &&\
ln -s buildroot-* buildroot &&\
mkdir -v buildroot/patches
(
cd buildroot
# Create rootfs overlay.
mkdir -vpm775 rootfs_overlay/srv
# Download and configure post-build script.
wget -nv https://raw.githubusercontent.com/Docker-nano/Buildroot/$BUILDROOT_RELEASE/in/post_build.sh &&\
chmod -v +x post_build.sh
)
# Install toolchain.
wget -nv https://github.com/Docker-nano/crosstool-NG/releases/download/1.0.1/x86_64-nano-linux-uclibc.tar.xz &&\
tar xf *.tar* &&\
ln -s "$(tar tf *.tar* | head -1)" toolchain &&\
rm *.tar*
cd -
cp in/buildroot.conf ~/buildroot/.config
cp in/*.patch ~/buildroot/patches
cp -r in/httpd ~/buildroot/package/httpd
# Configure Buildroot.
(
cd ~/buildroot
# Apply patches.
patch -p0 -i patches/*
)