mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-29 01:09:42 +02:00
4808ec76e8
Signed-off-by: Xiangfu Liu <xiangfu.z@gmail.com>
68 lines
1.5 KiB
Diff
68 lines
1.5 KiB
Diff
From 15ed8daa3f7a56f32d8b9bbce9ec2dab47c79704 Mon Sep 17 00:00:00 2001
|
|
From: xiangfu <xiangfu.z@gmail.com>
|
|
Date: Thu, 23 Apr 2009 08:30:49 +0800
|
|
Subject: [PATCH] add build script
|
|
|
|
---
|
|
build | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
|
|
1 files changed, 48 insertions(+), 0 deletions(-)
|
|
create mode 100755 build
|
|
|
|
diff --git a/build b/build
|
|
new file mode 100755
|
|
index 0000000..7c6180b
|
|
--- /dev/null
|
|
+++ b/build
|
|
@@ -0,0 +1,48 @@
|
|
+#!/bin/sh
|
|
+#
|
|
+# Kernel building helper script (C)2009 PI
|
|
+# xiangfu <xiangfu.z@openmoko.org>
|
|
+#
|
|
+# Licensed under GPLv3 or later
|
|
+#
|
|
+#
|
|
+# you need to run this from the top level source dir, but it creates all
|
|
+# object files into a subdir given in the first argument, eg
|
|
+#
|
|
+#
|
|
+#
|
|
+# this radically speeds up swapping between build contexts. Note the config
|
|
+# for each build lives in the subdir.
|
|
+
|
|
+PARALLEL=16
|
|
+
|
|
+if [ -z "$1" ] ; then
|
|
+ echo "Specify the build subdir, eg, PI which contains the .config"
|
|
+ echo "and will hold the object files"
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+mkdir -p $1
|
|
+
|
|
+if [ -z "$CROSS_COMPILE" ]; then
|
|
+ export CROSS_COMPILE=/opt/mipseltools-gcc412-glibc261/bin/mipsel-linux-
|
|
+fi
|
|
+make O=$1 pi_defconfig
|
|
+
|
|
+
|
|
+VERSION=
|
|
+if [ -d .git ] ; then
|
|
+ HEAD=`git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16`
|
|
+ BRANCH=`git branch | grep ^\* | cut -d' ' -f2 | sed s/-hist//g`
|
|
+ VERSION=-$PRODUCT\_$BRANCH
|
|
+fi
|
|
+
|
|
+if make -j$PARALLEL O=$1 uImage ; then
|
|
+ cp arch/mips/boot/uImage $1/uImage$VERSION-$HEAD
|
|
+ cp arch/mips/boot/uImage /home/xiangfu/virtual_share/usbboot/usbboot1.4a-tools/
|
|
+ exit 0
|
|
+fi
|
|
+
|
|
+exit 1
|
|
+
|
|
+
|
|
--
|
|
1.6.0.4
|
|
|