diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/armada-388-clearfog.dtb | bin | 0 -> 19429 bytes | |||
-rwxr-xr-x | tools/get_latest_iso.py | 31 | ||||
-rw-r--r-- | tools/gpl-header-template | 17 | ||||
-rwxr-xr-x | tools/run-qemu-image.sh | 16 | ||||
-rw-r--r-- | tools/submod-mk | 84 | ||||
-rw-r--r-- | tools/u-boot-spl.kwb | bin | 0 -> 557788 bytes |
6 files changed, 148 insertions, 0 deletions
diff --git a/tools/armada-388-clearfog.dtb b/tools/armada-388-clearfog.dtb Binary files differnew file mode 100755 index 00000000..cc25d96f --- /dev/null +++ b/tools/armada-388-clearfog.dtb diff --git a/tools/get_latest_iso.py b/tools/get_latest_iso.py new file mode 100755 index 00000000..4a2ea9a8 --- /dev/null +++ b/tools/get_latest_iso.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +import os +import sys +from lxml import html +from urllib.parse import unquote +import requests + +BASE_URL = 'https://downloads.vyos.io/' +PAGE_URL = BASE_URL+'?dir=rolling/current/amd64' + + +def download(): + page = requests.get(PAGE_URL) + tree = html.fromstring(page.content) + path = '//*[@id="directory-listing"]/li/a[1]/@href' + isos = [x for x in tree.xpath(path) if os.path.splitext(x)[1] == '.iso'] + latest_iso_url = os.path.join(BASE_URL, isos[-1]) + filename = unquote(os.path.basename(latest_iso_url)) + print(filename) + if os.path.exists(filename): + print("{} already exists".format(filename)) + sys.exit(0) + r = requests.get(latest_iso_url) + with open(filename, 'wb') as fd: + for chunk in r.iter_content(chunk_size=128): + fd.write(chunk) + + +if __name__ == '__main__': + download() diff --git a/tools/gpl-header-template b/tools/gpl-header-template new file mode 100644 index 00000000..63be9d9a --- /dev/null +++ b/tools/gpl-header-template @@ -0,0 +1,17 @@ +# Copyright (C) 2016 VyOS maintainers and contributors +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 or later as +# published by the Free Software Foundation. +# +# 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/>. +# +# File: +# Purpose: + diff --git a/tools/run-qemu-image.sh b/tools/run-qemu-image.sh new file mode 100755 index 00000000..b021ebd6 --- /dev/null +++ b/tools/run-qemu-image.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +VM_NAME='vyos_qemu' +VM_IMAGE='./packer_build/qemu/vyos_qemu_image.img' +MEMORY_SIZE='1024' +NCPUS=1 +SSH_PORT=2222 + +qemu-system-x86_64 \ + -name "${VM_NAME}" \ + -m ${MEMORY_SIZE} \ + -net nic,vlan=0,model=virtio \ + -net user,vlan=0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \ + -drive if=virtio,file=${VM_IMAGE} \ + -machine accel=kvm \ + -cpu host -smp ${NCPUS} diff --git a/tools/submod-mk b/tools/submod-mk new file mode 100644 index 00000000..eb61da18 --- /dev/null +++ b/tools/submod-mk @@ -0,0 +1,84 @@ +#!/bin/bash +# +# **** License **** +# +# Copyright (C) 2013 Vyatta, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# 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/>. +# +# **** End License **** + +progname=${0##*/} +shopt -s nullglob +shopt -s extglob +cd packages + +info=echo +trace= +noclean="-nc" +build="debuild -i -b -uc -us" + +declare -a submodule +declare -a debs +for debian in !(installer|linux-kernel-di-i386-2.6)/debian ; do + smod=${debian%/*} + debs=( ${smod}_*.deb ) + if [ ${#debs[@]} -eq 0 ] ; then + submodule+=( $smod ) + fi +done + +while [ $# -gt 0 ] ; do + case "$1" in + -h | --help ) + cat <<-EOF +Usage: $progname [Options] [ SUBMODULE... ] +Options: + -n | --do-nothing DonĀ“t actually remove or build anything, + just show what would be done + -q | --quiet Quiet, don't print progress info + -c | --clean Clean build + -b | --binary Skip source package build (default) + -s | --source Build binary and source packages + -S | --signed-source Build and sign packages + +If no SUBMODULE(s) given, build all checked-out submodules w/o debs. +EOF + exit 0;; + -n | --do-nothing ) + trace=echo + shift;; + -q | --quiet ) + info='#' + shift;; + -c | --clean ) + noclean= + shift;; + -b | --binary ) + shift ;; # default + -s | --source ) + build="git buildpackage -uc -us" + shift;; + -S | --signed-source ) + build="git buildpackage" + shift;; + * ) + submodule=( $@ ) + break;; + esac +done + +for (( i=0; i<${#submodule[@]}; i++)) ; do + eval $info P: ${submodule[i]} + ( cd ${submodule[i]} && eval $trace $build $noclean ) || exit $? +done diff --git a/tools/u-boot-spl.kwb b/tools/u-boot-spl.kwb Binary files differnew file mode 100644 index 00000000..1ea4d759 --- /dev/null +++ b/tools/u-boot-spl.kwb |