mirror of https://github.com/aredn/aredn.git
feature: Add scripts for generating images.
These scripts are intended to be run by Jenkins. minimal/no error checking is done with these scripts at this time. Some ENV variables needs to be set before executing these scripts.
This commit is contained in:
parent
741bb65e4b
commit
885e93b241
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd "$BUILDROOTBASE"
|
||||
|
||||
# Prep the feeds file
|
||||
echo "src-git arednpackages git://git.aredn.org/aredn_packages;develop" > feeds.conf
|
||||
cat feeds.conf.default >> feeds.conf
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -p arednpackages olsrd
|
||||
./scripts/feeds install perl
|
||||
./scripts/feeds install -p arednpackages vtun
|
||||
./scripts/feeds install snmpd
|
||||
|
||||
SHORT_COMMIT=$(echo "$GIT_COMMIT" | awk '{ string=substr($0, 1, 8); print string; }' )
|
||||
SHORT_BRANCH=$(echo "$GIT_BRANCH" | awk 'match($0,"/"){print substr($0,RSTART+1)}')
|
||||
|
||||
if ( -z "$BUILD_SET_VERSION" ); then
|
||||
echo "$BUILD_SET_VERSION" > "$BUILDROOTBASE/files/etc/mesh-release"
|
||||
else
|
||||
echo "${SHORT_BRANCH}-${BUILD_NUMBER}-${SHORT_COMMIT}" > "$BUILDROOTBASE/files/etc/mesh-release"
|
||||
fi
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
<<'LICENSE'
|
||||
Part of AREDN -- Used for creating Amateur Radio Emergency Data Networks
|
||||
Copyright (C) 2015 Conrad Lara
|
||||
See Contributors file for additional contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional Terms:
|
||||
|
||||
Additional use restrictions exist on the AREDN(TM) trademark and logo.
|
||||
See AREDNLicense.txt for more info.
|
||||
|
||||
Attributions to the AREDN Project must be retained in the source code.
|
||||
If importing this code into a new or existing project attribution
|
||||
to the AREDN project must be added to the source code.
|
||||
|
||||
You must not misrepresent the origin of the material conained within.
|
||||
|
||||
Modified versions must be modified to attribute to the original source
|
||||
and be marked in reasonable ways as differentiate it from the original
|
||||
version.
|
||||
|
||||
LICENSE
|
||||
|
||||
. "$SCRIPTBASE/sh2ju.sh"
|
||||
|
||||
rm "$BUILDROOTBASE/.config" 2> /dev/null
|
||||
|
||||
touch "$BUILDROOTBASE/.config"
|
||||
|
||||
for file in "$SCRIPTBASE"/buildsteps/kconfig/*
|
||||
do
|
||||
$file >> "$BUILDROOTBASE/.config"
|
||||
done
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd "$BUILDROOTBASE"
|
||||
|
||||
|
||||
make defconfig
|
||||
# Tools Build
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 tools/install -j3
|
||||
# toolchain build
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 toolchain/install
|
||||
#kernel compile
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 target/compile -j3
|
||||
# package compile
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 package/compile -j3
|
||||
#package installation
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 package/install -j3
|
||||
#package index
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 package/index
|
||||
#image generation
|
||||
make IGNORE_ERRORS=m V=99 BUILD_LOG=1 target/install -j3
|
||||
|
||||
# Cleanup for now until fix cleanup module
|
||||
rm -Rf build_dir/*
|
||||
rm -Rf staging_dir/*
|
||||
|
||||
SHORT_COMMIT=$(echo "$GIT_COMMIT" | awk '{ string=substr($0, 1, 8); print string; }' )
|
||||
SHORT_BRANCH=$(echo "$GIT_BRANCH" | awk 'match($0,"/"){print substr($0,RSTART+1)}')
|
||||
|
||||
if ( -z "$BUILD_SET_VERSION" ); then
|
||||
MYBUILDNAME="$BUILD_SET_VERSION"
|
||||
else
|
||||
MYBUILDNAME="${SHORT_BRANCH}-${BUILD_NUMBER}-${SHORT_COMMIT}"
|
||||
fi
|
||||
rename "s/openwrt/AREDN-$MYBUILDNAME/g" bin/ar71xx/*
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
<<'LICENSE'
|
||||
Part of AREDN -- Used for creating Amateur Radio Emergency Data Networks
|
||||
Copyright (C) 2015 Conrad Lara
|
||||
See Contributors file for additional contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional Terms:
|
||||
|
||||
Additional use restrictions exist on the AREDN(TM) trademark and logo.
|
||||
See AREDNLicense.txt for more info.
|
||||
|
||||
Attributions to the AREDN Project must be retained in the source code.
|
||||
If importing this code into a new or existing project attribution
|
||||
to the AREDN project must be added to the source code.
|
||||
|
||||
You must not misrepresent the origin of the material conained within.
|
||||
|
||||
Modified versions must be modified to attribute to the original source
|
||||
and be marked in reasonable ways as differentiate it from the original
|
||||
version.
|
||||
|
||||
LICENSE
|
||||
|
||||
# For now lets just return static entries
|
||||
cat << EOF
|
||||
CONFIG_TARGET_ar71xx=y
|
||||
CONFIG_TARGET_ar71xx_Default=y
|
||||
CONFIG_ARCH=mips
|
||||
EOF
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
<<'LICENSE'
|
||||
Part of AREDN -- Used for creating Amateur Radio Emergency Data Networks
|
||||
Copyright (C) 2015 Conrad Lara
|
||||
See Contributors file for additional contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional Terms:
|
||||
|
||||
Additional use restrictions exist on the AREDN(TM) trademark and logo.
|
||||
See AREDNLicense.txt for more info.
|
||||
|
||||
Attributions to the AREDN Project must be retained in the source code.
|
||||
If importing this code into a new or existing project attribution
|
||||
to the AREDN project must be added to the source code.
|
||||
|
||||
You must not misrepresent the origin of the material conained within.
|
||||
|
||||
Modified versions must be modified to attribute to the original source
|
||||
and be marked in reasonable ways as differentiate it from the original
|
||||
version.
|
||||
|
||||
LICENSE
|
||||
|
||||
# For now lets just return static entries
|
||||
cat << EOF
|
||||
CONFIG_ATH_USER_REGD=y
|
||||
EOF
|
|
@ -0,0 +1,82 @@
|
|||
#!/bin/sh
|
||||
<<'LICENSE'
|
||||
Part of AREDN -- Used for creating Amateur Radio Emergency Data Networks
|
||||
Copyright (C) 2015 Conrad Lara
|
||||
See Contributors file for additional contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional Terms:
|
||||
|
||||
Additional use restrictions exist on the AREDN(TM) trademark and logo.
|
||||
See AREDNLicense.txt for more info.
|
||||
|
||||
Attributions to the AREDN Project must be retained in the source code.
|
||||
If importing this code into a new or existing project attribution
|
||||
to the AREDN project must be added to the source code.
|
||||
|
||||
You must not misrepresent the origin of the material conained within.
|
||||
|
||||
Modified versions must be modified to attribute to the original source
|
||||
and be marked in reasonable ways as differentiate it from the original
|
||||
version.
|
||||
|
||||
LICENSE
|
||||
|
||||
# For now lets just return static entries
|
||||
|
||||
# Kernel Config entries for packages that should be a part of the build
|
||||
cat <<'EOF'
|
||||
CONFIG_ALL=y
|
||||
CONFIG_PACKAGE_bridge=y
|
||||
CONFIG_PACKAGE_busybox=y
|
||||
CONFIG_PACKAGE_dnsmasq=y
|
||||
CONFIG_PACKAGE_dropbear=y
|
||||
CONFIG_PACKAGE_iptables=y
|
||||
CONFIG_PACKAGE_kmod-ipt-nathelper=y
|
||||
CONFIG_PACKAGE_kmod-usb-core=y
|
||||
CONFIG_PACKAGE_kmod-usb-uhci=y
|
||||
CONFIG_PACKAGE_kmod-usb2=y
|
||||
CONFIG_PACKAGE_libgcc=y
|
||||
CONFIG_PACKAGE_mtd=y
|
||||
CONFIG_PACKAGE_ppp=y
|
||||
CONFIG_PACKAGE_ppp-mod-pppoe=y
|
||||
CONFIG_PACKAGE_uhttpd=y
|
||||
CONFIG_PACKAGE_olsrd=y
|
||||
CONFIG_PACKAGE_perl=y
|
||||
CONFIG_PACKAGE_olsrd-mod-arprefresh=y
|
||||
CONFIG_PACKAGE_olsrd-mod-dyn-gw=y
|
||||
CONFIG_PACKAGE_olsrd-mod-httpinfo=y
|
||||
CONFIG_PACKAGE_olsrd-mod-nameservice=y
|
||||
CONFIG_PACKAGE_olsrd-mod-txtinfo=y
|
||||
CONFIG_PACKAGE_olsrd-mod-dot-draw=y
|
||||
CONFIG_PACKAGE_olsrd-mod-watchdog=y
|
||||
CONFIG_PACKAGE_olsrd-mod-secure=y
|
||||
CONFIG_PACKAGE_perlbase-essential=y
|
||||
CONFIG_PACKAGE_perlbase-xsloader=y
|
||||
CONFIG_PACKAGE_perlbase-file=y
|
||||
CONFIG_PACKAGE_perlbase-perlio=y
|
||||
CONFIG_PACKAGE_libpcap=y
|
||||
CONFIG_PACKAGE_tcpdump-mini=y
|
||||
CONFIG_PACKAGE_ntpclient=y
|
||||
CONFIG_PACKAGE_xinetd=y
|
||||
CONFIG_PACKAGE_kmod-ipv6=y
|
||||
CONFIG_PACKAGE_ip6tables=y
|
||||
CONFIG_PACKAGE_kmod-ip6tables=y
|
||||
CONFIG_PACKAGE_libip6tc=y
|
||||
CONFIG_PACKAGE_ip=y
|
||||
CONFIG_PACKAGE_iptables-mod-ipopt=y
|
||||
CONFIG_PACKAGE_iwinfo=y
|
||||
CONFIG_PACKAGE_libiwinfo=y
|
||||
CONFIG_PACKAGE_socat=y
|
||||
EOF
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
<<'LICENSE'
|
||||
Part of AREDN -- Used for creating Amateur Radio Emergency Data Networks
|
||||
Copyright (C) 2015 Conrad Lara
|
||||
See Contributors file for additional contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional Terms:
|
||||
|
||||
Additional use restrictions exist on the AREDN(TM) trademark and logo.
|
||||
See AREDNLicense.txt for more info.
|
||||
|
||||
Attributions to the AREDN Project must be retained in the source code.
|
||||
If importing this code into a new or existing project attribution
|
||||
to the AREDN project must be added to the source code.
|
||||
|
||||
You must not misrepresent the origin of the material conained within.
|
||||
|
||||
Modified versions must be modified to attribute to the original source
|
||||
and be marked in reasonable ways as differentiate it from the original
|
||||
version.
|
||||
|
||||
LICENSE
|
||||
|
||||
SCRIPTBASE=$(dirname "$(readlink -f "$0")")
|
||||
export SCRIPTBASE
|
||||
|
||||
if [ "$1" != "" ]
|
||||
then
|
||||
BUILDROOTBASE=$1
|
||||
else
|
||||
BUILDROOTBASE="$PWD"
|
||||
fi
|
||||
|
||||
export BUILDROOTBASE
|
||||
|
||||
if [ ! -d "$BUILDROOTBASE" ]
|
||||
then
|
||||
|
||||
echo "ERROR: $BUILDROOTBASE doesn't exist"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Run pre-tests
|
||||
"$SCRIPTBASE"/tests-prebuild.sh "${BUILDROOTBASE}/files"
|
||||
|
||||
for file in $SCRIPTBASE/buildsteps/*
|
||||
do
|
||||
if ( [ -x "$file" ] && [ -f "$file" ] ); then
|
||||
echo "BUILDSTEP: $file"
|
||||
$file
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue