summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mayer <markus.mayer@linaro.org>2014-01-28 14:11:15 -0800
committerMarkus Mayer <markus.mayer@linaro.org>2014-01-28 14:11:15 -0800
commitb147c2b7c89dca31a8a15beaae081541984226ab (patch)
treeb3033e1b430944b832799884d451364fc7a52a2b
Initial commit
-rwxr-xr-xbinaries/devmembin0 -> 13820 bytes
-rwxr-xr-xbinaries/fw_printenvbin0 -> 18220 bytes
-rw-r--r--binaries/getmac8
-rwxr-xr-xbinaries/libprocps.so.1.1.1bin0 -> 47076 bytes
-rwxr-xr-xbinaries/psbin0 -> 63496 bytes
-rwxr-xr-xconf/30-bcm-text31
-rw-r--r--conf/default-hostname.conf31
-rw-r--r--conf/fstab10
-rw-r--r--conf/fw_env.config1
-rw-r--r--conf/hosts.template9
-rwxr-xr-xconf/rc.local18
-rw-r--r--conf/usb05
-rw-r--r--tools/.linaro2sparserc95
-rwxr-xr-xtools/flash-all.sh26
-rwxr-xr-xtools/linaro2sparse.sh60
-rwxr-xr-xtools/make-gpt-tablesbin0 -> 17876 bytes
-rwxr-xr-xtools/make_ext4fsbin0 -> 131248 bytes
-rwxr-xr-xtools/mkgpt.sh61
-rwxr-xr-xtools/send-patch.pl102
-rwxr-xr-xtools/simg2imgbin0 -> 94372 bytes
-rwxr-xr-xtools/update_master_git83
21 files changed, 540 insertions, 0 deletions
diff --git a/binaries/devmem b/binaries/devmem
new file mode 100755
index 0000000..6fab219
--- /dev/null
+++ b/binaries/devmem
Binary files differ
diff --git a/binaries/fw_printenv b/binaries/fw_printenv
new file mode 100755
index 0000000..e9ebe1a
--- /dev/null
+++ b/binaries/fw_printenv
Binary files differ
diff --git a/binaries/getmac b/binaries/getmac
new file mode 100644
index 0000000..f50454a
--- /dev/null
+++ b/binaries/getmac
@@ -0,0 +1,8 @@
+#!/bin/sh
+prg=`basename $0`
+vendor_prefix=00:10:18
+serial=`fw_printenv serial-number 2>/dev/null | cut -d= -f2`
+board_part=`printf "%06x\n" "$serial" | sed -e 's/\(..\)\(..\)\(..\)/\1:\2:\3/'`
+mac="$vendor_prefix:$board_part"
+
+echo "$mac"
diff --git a/binaries/libprocps.so.1.1.1 b/binaries/libprocps.so.1.1.1
new file mode 100755
index 0000000..b1b001e
--- /dev/null
+++ b/binaries/libprocps.so.1.1.1
Binary files differ
diff --git a/binaries/ps b/binaries/ps
new file mode 100755
index 0000000..9edf394
--- /dev/null
+++ b/binaries/ps
Binary files differ
diff --git a/conf/30-bcm-text b/conf/30-bcm-text
new file mode 100755
index 0000000..372ff65
--- /dev/null
+++ b/conf/30-bcm-text
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# 30-bcm-text - add Broadcom signature to motd
+# Copyright (C) 2013 Broadcom Corporation
+#
+# Author: Markus Mayer <mmayer@broadcom.com>
+#
+# 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; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+PACKAGE_USER=##USER##
+PACKAGE_HOST=##HOST##
+PACKAGE_DATE=##DATE##
+PACKAGE_TAR=##TARBALL##
+
+printf "\n===============================================================================\n"
+printf "Root file system created by $PACKAGE_USER on $PACKAGE_HOST.\n"
+printf "Source tar-ball: $PACKAGE_TAR\n"
+printf "Created on $PACKAGE_DATE\n"
+printf "===============================================================================\n"
diff --git a/conf/default-hostname.conf b/conf/default-hostname.conf
new file mode 100644
index 0000000..7361afc
--- /dev/null
+++ b/conf/default-hostname.conf
@@ -0,0 +1,31 @@
+#
+# This task is run on startup to determine the system's default hostname based
+# on the platform the system is running on.
+# The hostname is only set if /etc/hostname does not exist.
+
+description "set default hostname"
+
+start on local-filesystems
+task
+
+script
+ HOSTNAME=/etc/hostname
+ HOSTS=/etc/hosts
+ HOSTSTEMP="$HOSTS.template"
+
+ if [ ! -r "$HOSTNAME" ]; then
+ echo "Setting up default hostname..."
+ hardware=`grep '^Hardware' /proc/cpuinfo | sed -e 's/.*: *//'`
+ if [ "$hardware" = "Broadcom Application Processor" ]; then
+ board="bcm-281xx-board"
+ else
+ cpu=`echo "$hardware" | awk '{ print $1 }' | \
+ sed -e 's/^[Bb][Cc][Mm]//'`
+ board="bcm-$cpu-board"
+ fi
+ echo "$board.localdomain" >"$HOSTNAME"
+ test -r "$HOSTSTEMP" && \
+ sed -e "s/bcm-XXX-board/$board/" <"$HOSTSTEMP" >"$HOSTS"
+ test -r "$HOSTNAME" && hostname -F /etc/hostname
+ fi
+end script
diff --git a/conf/fstab b/conf/fstab
new file mode 100644
index 0000000..bccfcc8
--- /dev/null
+++ b/conf/fstab
@@ -0,0 +1,10 @@
+# /etc/fstab: static file system information.
+#
+# Use 'blkid' to print the universally unique identifier for a
+# device; this may be used with UUID= as a more robust way to name devices
+# that works even if disks are added and removed. See fstab(5).
+#
+# <file system> <mount point> <type> <options> <dump> <pass>
+proc /proc proc nodev,noexec,nosuid 0 0
+#/dev/mmcblk0p12 / ext4 errors=remount-ro 0 1
+LABEL=capri-nano / ext4 errors=remount-ro 0 1
diff --git a/conf/fw_env.config b/conf/fw_env.config
new file mode 100644
index 0000000..2e26b32
--- /dev/null
+++ b/conf/fw_env.config
@@ -0,0 +1 @@
+/dev/mmcblk0p8 0 0x1000 0x100
diff --git a/conf/hosts.template b/conf/hosts.template
new file mode 100644
index 0000000..f9aca7d
--- /dev/null
+++ b/conf/hosts.template
@@ -0,0 +1,9 @@
+127.0.0.1 localhost
+127.0.1.1 bcm-XXX-board
+
+# The following lines are desirable for IPv6 capable hosts
+::1 ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
diff --git a/conf/rc.local b/conf/rc.local
new file mode 100755
index 0000000..f013c66
--- /dev/null
+++ b/conf/rc.local
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+# By default this script does nothing.
+
+echo "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
+echo ""
+echo 0 > /proc/sys/kernel/hung_task_timeout_secs
+
+exit 0
diff --git a/conf/usb0 b/conf/usb0
new file mode 100644
index 0000000..4eb648a
--- /dev/null
+++ b/conf/usb0
@@ -0,0 +1,5 @@
+auto usb0
+iface usb0 inet static
+ address 192.168.1.2
+ netmask 255.255.255.0
+ gateway 192.168.1.1
diff --git a/tools/.linaro2sparserc b/tools/.linaro2sparserc
new file mode 100644
index 0000000..2e90e12
--- /dev/null
+++ b/tools/.linaro2sparserc
@@ -0,0 +1,95 @@
+BASEDIR="$HOME/Development/linaro"
+HAS_CUSTOMIZE=1
+
+customize()
+{
+ FILES="hosts hostname"
+ for f in $FILES; do
+ echo "Removing /etc/$f..."
+ sudo rm -f "binary/etc/$f"
+ done
+ CONF="$BASEDIR/conf"
+ FILES="fstab fw_env.config hosts.template" # rc.local
+ for f in $FILES; do
+ echo "Copying custom $f into /etc..."
+ sudo cp -p "$CONF/$f" binary/etc
+ sudo chown root:root "binary/etc/$f"
+ done
+ FILES="default-hostname.conf"
+ for f in $FILES; do
+ echo "Copying $f into /etc/init..."
+ sudo cp -p "$CONF/$f" binary/etc/init
+ sudo chown root:root "binary/etc/init/$f"
+ done
+
+ # Parsing of /etc/network/interfaces.d/* is broken on saucy,
+ # so we have to append our configuration to "interfaces" for now.
+ echo "Copying usb0 Gadget Ethernet configuration..."
+ TMPFILE="/tmp/$prg-usb0.$$"
+ INTERFACES="binary/etc/network/interfaces"
+ cat "$CONF/usb0" "$INTERFACES" >>"$TMPFILE"
+ sudo mv "$TMPFILE" "$INTERFACES"
+ sudo chmod 755 "$INTERFACES"
+ sudo chown root:root "$INTERFACES"
+
+ BINARIES="$BASEDIR/binaries"
+ FILES="devmem fw_printenv getmac"
+ for f in $FILES; do
+ echo "Copying custom $f..."
+ test -d binary/usr/local/bin && \
+ sudo mkdir -p binary/usr/local/bin
+ sudo cp -p "$BINARIES/$f" binary/usr/local/bin
+ sudo chown root:root "binary/usr/local/bin/$f"
+ done
+ (
+ cd binary/usr/local/bin
+ sudo ln -s fw_printenv fw_setenv
+ )
+ BINARIES="$BASEDIR/binaries"
+ FILES="ps"
+ for f in $FILES; do
+ echo "Copying custom $f..."
+ sudo cp -p "$BINARIES/$f" binary/bin
+ sudo chown root:root "binary/bin/$f"
+ done
+ LIBRARIES="$BASEDIR/binaries"
+ FILES="libprocps.so.1.1.1"
+ for f in $FILES; do
+ sym=`echo "$f" | sed -e 's,\(\.so\.[0-9]*\).*,\1,'`
+ echo "Copying custom $f..."
+ sudo cp -p "$BINARIES/$f" binary/lib/arm-linux-gnueabihf
+ sudo chown root:root "binary/lib/arm-linux-gnueabihf/$f"
+ echo "Creating symlink $sym..."
+ (
+ cd binary/lib/arm-linux-gnueabihf
+ sudo ln -s "$f" "$sym"
+ )
+ done
+ FILES="ureadahead.conf ureadahead-other.conf"
+ for f in $FILES; do
+ if [ -r "binary/etc/init/$f" ]; then
+ echo "Turning off $f"
+ sudo mv "binary/etc/init/$f" "binary/etc/init/$f.off"
+ fi
+ done
+
+ echo "Fixing up motd path..."
+ PAM="binary/etc/pam.d/login"
+ TMPFILE="/tmp/$prg-login.$$"
+ sed -e 's,motd=/run/motd.dynamic,motd=/run/motd,' < "$PAM" >"$TMPFILE"
+ sudo mv "$TMPFILE" "$PAM"
+ sudo chmod 644 "$PAM"
+ sudo chown root:root "$PAM"
+
+ echo "Setting up custom Broadcom banner..."
+ TMPFILE="/tmp/$prg-motd.$$"
+ MOTD="binary/etc/update-motd.d/30-bcm-text"
+ sed -e "s,##USER##,'$USER'," \
+ -e "s,##HOST##,'`uname -n`'," \
+ -e "s,##DATE##,'`date`'," \
+ -e "s,##TARBALL##,'$tarball'," \
+ < "$CONF/30-bcm-text" >"$TMPFILE"
+ sudo mv "$TMPFILE" "$MOTD"
+ sudo chmod 755 "$MOTD"
+ sudo chown root:root "$MOTD"
+}
diff --git a/tools/flash-all.sh b/tools/flash-all.sh
new file mode 100755
index 0000000..68b40b6
--- /dev/null
+++ b/tools/flash-all.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+prg=`basename $0`
+
+fastboot=`which fastboot`
+FIRMWARE="linaro-gpt.bin fbi.bin loader.bin hw-blob.bin u-boot.bin u-boot-env.bin"
+
+if [ "$fastboot" = "" ]; then
+ echo "$prg: could not find \"fastboot\" binary in your PATH" 1>&2
+ exit 1
+fi
+
+owner=`stat -c %U "$fastboot"`
+if [ "$owner" != "root" ]; then
+ echo "$prg: $fastboot is not owned by root" 1>&2
+ exit 1
+fi
+if [ ! -u "$fastboot" ]; then
+ echo "$prg: $fastboot does not have the SUID bit set" 1>&2
+ exit 1
+fi
+
+for f in $FIRMWARE; do
+ gpt=`echo "$f" | sed -e 's/^linaro-//' -e 's/\.bin$//'`
+ echo "$f -> $gpt"
+ "$fastboot" flash "$gpt" "$f"
+done
diff --git a/tools/linaro2sparse.sh b/tools/linaro2sparse.sh
new file mode 100755
index 0000000..f6de889
--- /dev/null
+++ b/tools/linaro2sparse.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+prg=`basename $0`
+tarball="$1"
+ext4img="$2"
+size="$3"
+tmpdir="/tmp/$prg.$$"
+rcfile=`echo ".$prg" | sed -e 's/\.sh$//'`rc
+pwd=`pwd`
+
+test "$size" = "" && size="2G"
+
+die()
+{
+ echo "$prg: $1" 1>&2
+ exit 1
+}
+
+if [ "$1" = "-h" -o $# -lt 2 ]; then
+ echo "usage: $prg <linaro-tar-ball> <ext4-image-name> (<size>)" 1>&2
+ echo "" 1>&2
+ echo "This script turns a Linaro tar-ball into a sparse EXT4 image." 1>&2
+ echo "This image can then be flashed onto a Capri board as rootfs." 1>&2
+ echo "" 1>&2
+ echo "Size defaults to 2GB." 1>&2
+ exit 1
+fi
+
+test -r "$tarball" || echo "Can't open $tarball"
+echo "$tarball" | grep '^/' >/dev/null
+if [ $? != 0 ]; then
+ tarball="$pwd/$tarball"
+ echo "tarball is now $tarball"
+fi
+
+trap 'rm -rf $tmpdir' EXIT
+
+mkdir "$tmpdir" || die "Can't create working directory $tmpdir"
+if [ -r "$rcfile" ]; then
+ echo "Reading $rcfile..."
+ . "$pwd/$rcfile"
+elif [ -r "$HOME/$rcfile" ]; then
+ echo "Reading $HOME/$rcfile..."
+ . "$HOME/$rcfile"
+fi
+
+echo "$prg needs to run some commands as root via sudo."
+(
+ cd "$tmpdir"
+ sudo tar xvfz "$tarball"
+ sudo rm -rf binary/dev
+ sudo mkdir binary/dev
+
+ test -z $HAS_CUSTOMIZE || customize
+
+ echo "Generating $size image $pwd/$ext4img"
+ sudo ~/bin/make_ext4fs -L capri-nano -s -l $size "$pwd/$ext4img" binary
+ sudo rm -rf binary
+ sudo chown $USER "$pwd/$ext4img"
+ sudo chgrp $USER "$pwd/$ext4img"
+)
diff --git a/tools/make-gpt-tables b/tools/make-gpt-tables
new file mode 100755
index 0000000..c01c18d
--- /dev/null
+++ b/tools/make-gpt-tables
Binary files differ
diff --git a/tools/make_ext4fs b/tools/make_ext4fs
new file mode 100755
index 0000000..f9ee883
--- /dev/null
+++ b/tools/make_ext4fs
Binary files differ
diff --git a/tools/mkgpt.sh b/tools/mkgpt.sh
new file mode 100755
index 0000000..efbe49e
--- /dev/null
+++ b/tools/mkgpt.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+prg=`basename $0`
+
+LINARO_TABLE="gpt,0x000000000,0x000010000,0
+ fbi,0x000020000,0x000020000,0
+ custom-cert,0x000040000,0x000010000,0
+ boot-parm,0x000050000,0x000010000,0
+ loader,0x000060000,0x000020000,0
+ u-boot,0x002200000,0x000100000,0
+ hw-blob,0x002300000,0x000040000,0
+ u-boot-env,0x002340000,0x000001000,0
+ device-tree,0x002350000,0x000020000,0
+ vc-firmware,0x003000000,0x000800000,0
+ boot,0x003800000,0x001000000,0
+ system,0x004800000,0x0a0000000,0
+ kpanic,0x0a4800000,0x001700000,0
+ recovery,0x0a5f00000,0x004000000,0
+ misc,0x0a9f00000,0x001000000,0
+ cache,0x0aaf00000,0x050000000,0
+ userdata,0x0faf00000,0x2b0000000,0"
+
+ORIG_TABLE="gpt,0x000000000,0x000010000,0
+ fbi,0x000020000,0x000020000,0
+ custom-cert,0x000040000,0x000010000,0
+ boot-parm,0x000050000,0x000010000,0
+ loader,0x000060000,0x000020000,0
+ sys-parm-ind,0x000080000,0x000080000,0
+ sys-parm-dep,0x000100000,0x000010000,0
+ parm-spml-ind,0x000110000,0x000010000,0
+ parm-spml-dep,0x000150000,0x000010000,0
+ umts-cal,0x0001d0000,0x000020000,0
+ cp-boot,0x0001f0000,0x000008000,0
+ cp-image,0x000200000,0x000d00000,0
+ cp-pod,0x000f00000,0x000100000,0
+ dsp-pram,0x001f20000,0x000080000,0
+ dsp-dram,0x002000000,0x000200000,0
+ u-boot,0x002200000,0x000100000,0
+ dt-blob,0x002300000,0x000040000,0
+ u-boot-env,0x002340000,0x000001000,0
+ mobicore,0x002f80000,0x000080000,0
+ vc-firmware,0x003000000,0x000800000,0
+ boot,0x003800000,0x001000000,0
+ system,0x004800000,0x020000000,0
+ userdata,0x024800000,0x080000000,0
+ kpanic,0x0a4800000,0x001700000,0
+ recovery,0x0a5f00000,0x001000000,0
+ misc,0x0a6f00000,0x001000000,0
+ cache,0x0a7f00000,0x050000000,0"
+
+if [ "$1" = "-h" ]; then
+ echo "usage: $prg [-O]" 1>&2
+ echo "Creates a Linaro GPT binary. If -O is given, it also creates" 1>&2
+ echo "the \"original\" partition table used on the Capri AP board." 1>&2
+ exit 1
+elif [ "$1" = "-O" ]; then
+ make-gpt-tables -v1 -b 0 -o orig-table.img -s 0x3b6000000 $ORIG_TABLE
+else
+ echo "$prg: unknown argument" 1>&2
+fi
+
+make-gpt-tables -v1 -b 0 -o linaro-gpt.bin -s 0x3b6000000 $LINARO_TABLE
diff --git a/tools/send-patch.pl b/tools/send-patch.pl
new file mode 100755
index 0000000..73d1610
--- /dev/null
+++ b/tools/send-patch.pl
@@ -0,0 +1,102 @@
+#!/usr/bin/perl
+
+use strict;
+use Getopt::Std;
+
+my $prg = $0;
+$prg =~ s|.*/||;
+
+my $dryrun='--dry-run';
+my %recipients = (
+ # Lists
+ 'arm' => 'ARM Kernel List <linux-arm-kernel@lists.infradead.org>',
+ 'devtree' => 'Device Tree List <devicetree@vger.kernel.org>',
+ 'gpio' => 'Linux GPIO List <linux-gpio@vger.kernel.org>',
+ 'lkml' => 'Linux Kernel Mailing List <linux-kernel@vger.kernel.org>',
+ 'mmc' => 'Linux MMC List <linux-mmc@vger.kernel.org>',
+ 'watchdog' => 'Linux Watchdog List <linux-watchdog@vger.kernel.org>',
+ 'patches' => 'Linaro Patches <patches@linaro.org>',
+
+ # ARM folks
+ 'acourbot' => 'Alexandre Courbot <gnurou@gmail.com>',
+ 'arnd' => 'Arnd Bergmann <arnd@arndb.de>',
+ 'chris' => 'Chris Ball <cjb@laptop.org>',
+ 'grant' => 'Grant Likely <grant.likely@linaro.org>',
+ 'linus' => 'Linus Walleij <linus.walleij@linaro.org>',
+ 'olof' => 'Olof Johansson <olof@lixom.net>',
+ 'rob' => 'Rob Herring <rob.herring@calxeda.com>',
+ 'russell' => 'Russell King <linux@arm.linux.org.uk>',
+ 'sudeep' => 'Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>',
+
+ 'gnomes' => 'One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>',
+
+ # Subsystem maintainers
+ 'wim' => 'Wim Van Sebroeck <wim@iguana.be>',
+ 'guenter' => 'Guenter Roeck <linux@roeck-us.net>',
+
+ # Device Tree folks
+ 'swarren' => 'Stephen Warren <swarren@wwwdotorg.org>',
+ 'rherring' => 'Rob Herring <rob.herring@calxeda.com>',
+ 'pmoll' => 'Pawel Moll <pawel.moll@arm.com>',
+ 'mrutland' => 'Mark Rutland <mark.rutland@arm.com>',
+ 'icampbell' => 'Ian Campbell <ijc+devicetree@hellion.org.uk>',
+
+ # Landing Team folks
+ 'alex' => 'Alex Elder <alex.elder@linaro.org>',
+ 'csd' => 'Christian Daudt <bcm@fixthebug.org>',
+ 'matt' => 'Matt Porter <matt.porter@linaro.org>',
+ 'tim' => 'Tim Kryger <tim.kryger@linaro.org>',
+ 'echan' => 'Edwin Chan <echan@broadcom.com>',
+);
+
+sub expand_alias
+{
+ my $flagname = shift;
+ my $optval = shift;
+ my $ret;
+
+ foreach my $alias (split(/[ ,;:]/, $optval)) {
+ if ($alias =~ /@/) {
+ $ret .= ' ' if ($ret ne '');
+ $ret .= "--$flagname '".$alias."'";
+ } elsif ($recipients{$alias}) {
+ $ret .= ' ' if ($ret ne '');
+ $ret .= "--$flagname '".$recipients{$alias}."'";
+ } else {
+ print(STDERR "$prg: unknown alias $alias\n");
+ }
+ }
+ return $ret;
+}
+
+my ($cc_list, $to_list, $file_list, $auto_ccs);
+my %opts;
+my $ret;
+
+if ($#ARGV < 0) {
+ print(STDERR "usage: $prg -t <recipient> (<recipient> ...)\n".
+ (" " x (length($prg) + 7)).
+ "[-c <recipient> (<recipient> ...)\n".
+ (" " x (length($prg) + 7)).
+ "<file> (<file> ...)\n");
+ print(STDERR "Known recipients: \n");
+ foreach my $rcpt (keys(%recipients)) {
+ print(STDERR "\t$rcpt\n");
+ }
+ exit(1);
+}
+
+if (!getopts('c:ft:', \%opts)) {
+ print(STDERR "$prg: invalid arguments\n");
+ exit(1);
+}
+
+$file_list = join(' ', @ARGV);
+$to_list = expand_alias('to', $opts{'t'});
+$cc_list = expand_alias('cc', $opts{'c'});
+$dryrun = '' if ($opts{'f'});
+
+$auto_ccs .= "--cc '".$recipients{'patches'}."'";
+
+print("git send-email $dryrun $to_list $auto_ccs $cc_list $file_list\n");
+system("git send-email $dryrun $to_list $auto_ccs $cc_list $file_list\n");
diff --git a/tools/simg2img b/tools/simg2img
new file mode 100755
index 0000000..f91be6f
--- /dev/null
+++ b/tools/simg2img
Binary files differ
diff --git a/tools/update_master_git b/tools/update_master_git
new file mode 100755
index 0000000..3ae0c92
--- /dev/null
+++ b/tools/update_master_git
@@ -0,0 +1,83 @@
+#!/bin/sh
+prg=`basename $0`
+
+linaro_user="markus.mayer"
+repobase="$HOME/Development/upstreaming"
+reponame="lt-public"
+repo="$repobase/$reponame"
+
+call_git()
+{
+ #if [ "$1" != "push" ]; then
+ out=`git $@ 2>&1`
+ ret=$?
+ if [ "$out" != "" -a "$out" != "\n" ]; then
+ echo "$out" | grep -v '^[+|]' | \
+ awk '{ print "[GIT] ", $0; }'
+ fi
+ #fi
+ return $ret
+}
+
+if [ "$1" = "init" ]; then
+ echo "=== Initializing local repo for LT sync ==="
+ if [ -d "$repo" ]; then
+ echo "$repo already exists."
+ echo -n "Remove it? (Y/N) "
+ read ans
+ if [ "$ans" != "Y" -a "$ans" != "y" ]; then
+ echo "=== Aborted ==="
+ exit 1
+ fi
+ rm -rf "$repo"
+ fi
+ cd "$repobase"
+ git clone git://git.ric.broadcom.com/map/upstreaming.git \
+ -b current_kernel "$reponame"
+ cd "$reponame"
+ git remote add lt "ssh://$linaro_user@broadcom.git.linaro.org/srv/landing-teams.git.linaro.org/broadcom/kernel-private.git"
+ git remote add public 'ssh://git@git.linaro.org/landing-teams/working/broadcom/kernel.git'
+ git remote add mainline 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
+ cd "$cwd"
+fi
+
+if [ ! -d "$repo" ]; then
+ echo "$prg: $repo doesn't exist. Run $prg init." 1>&2
+ exit 1
+fi
+
+cd "$repo"
+
+remotes=`git remote`
+
+echo "=== Fetching branches ==="
+for r in $remotes; do
+ echo "Fetching remote $r..."
+ call_git fetch $r
+done
+
+if [ "$1" = "init" ]; then
+ echo "$reponame setup completed."
+ exit 0
+fi
+
+echo "--- Checking out master ---"
+git branch | grep master >/dev/null
+if [ $? = 0 ]; then
+ git checkout master
+else
+ git checkout -t mainline/master
+fi
+
+call_git pull
+
+for tagflag in "" --tags; do
+ test "$tagflag" = "" && echo "--- Pushing updates ---"
+ test "$tagflag" = "" || echo "--- Pushing tags ---"
+ for remote in lt public; do
+ call_git push $tagflag $remote master:master
+ done
+done
+
+cd "$cwd"
+echo "Done."