summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@ringo.cs.unc.edu>2013-01-17 16:15:24 -0500
committerJonathan Herman <hermanjl@ringo.cs.unc.edu>2013-01-17 16:15:24 -0500
commitfc71c5f09bc8bd60e2e8e09bdb57b3143bc9d22f (patch)
treeeb3704ddc91060892ba815db4c139c5fe1495bc4
parentaf4fe0000741e08e12f0d6139dcb4c2affc7a714 (diff)
Added Tegra kernel install scripts.
-rw-r--r--arm-installer-common.sh13
-rwxr-xr-xodroid-install-kernel.sh6
-rwxr-xr-xpanda-install-kernel.sh6
-rwxr-xr-xtegra-install-kernel.sh44
4 files changed, 59 insertions, 10 deletions
diff --git a/arm-installer-common.sh b/arm-installer-common.sh
index ecbcc89..18857ce 100644
--- a/arm-installer-common.sh
+++ b/arm-installer-common.sh
@@ -5,8 +5,6 @@ set -u
5 5
6# Build host for ARM. 6# Build host for ARM.
7HOST="pound.cs.unc.edu" 7HOST="pound.cs.unc.edu"
8# User doing the builds.
9USER="cjk"
10 8
11# Not installed on the U-Boot partition. 9# Not installed on the U-Boot partition.
12ZIMAGE_FILE="zImage" 10ZIMAGE_FILE="zImage"
@@ -37,14 +35,10 @@ error() {
37 exit 1 35 exit 1
38} 36}
39 37
40if [ $# -ne 2 ] ; then
41 error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>"
42fi
43
44KERN_DIR=$1 38KERN_DIR=$1
45BOOT_TXT=$2 39BOOT_TXT=${2-""}
46 40
47if [ ! -f "$BOOT_TXT" ] ; then 41if [ ! -z "$BOOT_TXT" -o -f "$BOOT_TXT" ] ; then
48 error "Boot script TXT not a file: $BOOT_TXT" 42 error "Boot script TXT not a file: $BOOT_TXT"
49fi 43fi
50 44
@@ -91,6 +85,7 @@ mkuboot() {
91 mkimage -A arm -O linux -T kernel -C none \ 85 mkimage -A arm -O linux -T kernel -C none \
92 -a $LOAD_ADDR -e $ENTRY_POINT \ 86 -a $LOAD_ADDR -e $ENTRY_POINT \
93 -d $TMP_DIR/$ZIMAGE_FILE $TMP_DIR/$UIMAGE_FILE >&2 87 -d $TMP_DIR/$ZIMAGE_FILE $TMP_DIR/$UIMAGE_FILE >&2
88 out_image=$TMP_DIR/$UIMAGE_FILE
94 echo "done." >&2 89 echo "done." >&2
95} 90}
96 91
@@ -133,9 +128,11 @@ mkuinitrd() {
133 128
134copy_to_uboot() { 129copy_to_uboot() {
135 echo "Copying files to u-boot partition ..." >&2 130 echo "Copying files to u-boot partition ..." >&2
131
136 sudo cp $TMP_DIR/$UIMAGE_FILE $UBOOT_PATH/ 132 sudo cp $TMP_DIR/$UIMAGE_FILE $UBOOT_PATH/
137 sudo cp $TMP_DIR/$SCRIPT_FILE $UBOOT_PATH/ 133 sudo cp $TMP_DIR/$SCRIPT_FILE $UBOOT_PATH/
138 sudo cp $TMP_DIR/$INITRD_FILE $UBOOT_PATH/ 134 sudo cp $TMP_DIR/$INITRD_FILE $UBOOT_PATH/
135
139 echo "done." >&2 136 echo "done." >&2
140} 137}
141 138
diff --git a/odroid-install-kernel.sh b/odroid-install-kernel.sh
index 060152f..89911ce 100755
--- a/odroid-install-kernel.sh
+++ b/odroid-install-kernel.sh
@@ -1,5 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3if [ $# -ne 2 ] ; then
4 error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>"
5fi
6
3. $(dirname $0)/arm-installer-common.sh 7. $(dirname $0)/arm-installer-common.sh
4 8
5# This is machine specific, AFAIK. 9# This is machine specific, AFAIK.
@@ -20,7 +24,7 @@ CONFIG_FILE="config-$KVERSION"
20 24
21fetchfiles 25fetchfiles
22 26
23mkuboot 27mkuboot > /dev/null
24 28
25mkscript 29mkscript
26 30
diff --git a/panda-install-kernel.sh b/panda-install-kernel.sh
index 2a7f66a..70fc900 100755
--- a/panda-install-kernel.sh
+++ b/panda-install-kernel.sh
@@ -1,5 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3if [ $# -ne 2 ] ; then
4 error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>"
5fi
6
3. $(dirname $0)/arm-installer-common.sh 7. $(dirname $0)/arm-installer-common.sh
4 8
5# This is machine specific, AFAIK. 9# This is machine specific, AFAIK.
@@ -16,7 +20,7 @@ CONFIG_FILE="config-$KVERSION"
16 20
17fetchfiles 21fetchfiles
18 22
19mkuboot 23mkuboot > /dev/null
20 24
21mkscript 25mkscript
22 26
diff --git a/tegra-install-kernel.sh b/tegra-install-kernel.sh
new file mode 100755
index 0000000..c48f8b0
--- /dev/null
+++ b/tegra-install-kernel.sh
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3if [ $# -ne 1 ] ; then
4 error "Usage: `basename $0` <REMOTE-KDIR>"
5fi
6
7. $(dirname $0)/arm-installer-common.sh
8
9LOAD_ADDR=0x81008000
10ENTRY_POINT=0x81008000
11
12USB_PART=/dev/sdb1
13TMP_MOUNT=$(mktemp -d)
14# Use default boot image name on Tegra instead of creating a new boot script
15# The tegra cannot install a new boot script without manual labor
16BOOT_IMAGE=vmlinux.uimg
17
18KVERSION=$(getversion)
19CONFIG_FILE="config-$KVERSION"
20
21fetchfiles
22
23mkuboot
24
25moveconfig
26
27echo "Mounting USB partition ..." >&2
28sudo mount $USB_PART $TMP_MOUNT
29echo "done." >&2
30
31if [ ! -d "$TMP_MOUNT/boot" ]; then
32 sudo rm -f "$TMP_MOUNT/boot"
33 sudo mkdir "$TMP_MOUNT/boot"
34fi
35sudo cp $out_image "$TMP_MOUNT/boot/$BOOT_IMAGE"
36
37echo "Unmounting USB partition ..." >&2
38sudo umount $TMP_MOUNT
39echo "done." >&2
40
41rm_tmp_files
42rm -rf $TMP_MOUNT
43
44echo "All done!" >&2