diff options
author | Jonathan Herman <hermanjl@ringo.cs.unc.edu> | 2013-01-17 16:15:24 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@ringo.cs.unc.edu> | 2013-01-17 16:15:24 -0500 |
commit | fc71c5f09bc8bd60e2e8e09bdb57b3143bc9d22f (patch) | |
tree | eb3704ddc91060892ba815db4c139c5fe1495bc4 | |
parent | af4fe0000741e08e12f0d6139dcb4c2affc7a714 (diff) |
Added Tegra kernel install scripts.
-rw-r--r-- | arm-installer-common.sh | 13 | ||||
-rwxr-xr-x | odroid-install-kernel.sh | 6 | ||||
-rwxr-xr-x | panda-install-kernel.sh | 6 | ||||
-rwxr-xr-x | tegra-install-kernel.sh | 44 |
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. |
7 | HOST="pound.cs.unc.edu" | 7 | HOST="pound.cs.unc.edu" |
8 | # User doing the builds. | ||
9 | USER="cjk" | ||
10 | 8 | ||
11 | # Not installed on the U-Boot partition. | 9 | # Not installed on the U-Boot partition. |
12 | ZIMAGE_FILE="zImage" | 10 | ZIMAGE_FILE="zImage" |
@@ -37,14 +35,10 @@ error() { | |||
37 | exit 1 | 35 | exit 1 |
38 | } | 36 | } |
39 | 37 | ||
40 | if [ $# -ne 2 ] ; then | ||
41 | error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>" | ||
42 | fi | ||
43 | |||
44 | KERN_DIR=$1 | 38 | KERN_DIR=$1 |
45 | BOOT_TXT=$2 | 39 | BOOT_TXT=${2-""} |
46 | 40 | ||
47 | if [ ! -f "$BOOT_TXT" ] ; then | 41 | if [ ! -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" |
49 | fi | 43 | fi |
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 | ||
134 | copy_to_uboot() { | 129 | copy_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 | ||
3 | if [ $# -ne 2 ] ; then | ||
4 | error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>" | ||
5 | fi | ||
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 | ||
21 | fetchfiles | 25 | fetchfiles |
22 | 26 | ||
23 | mkuboot | 27 | mkuboot > /dev/null |
24 | 28 | ||
25 | mkscript | 29 | mkscript |
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 | ||
3 | if [ $# -ne 2 ] ; then | ||
4 | error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>" | ||
5 | fi | ||
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 | ||
17 | fetchfiles | 21 | fetchfiles |
18 | 22 | ||
19 | mkuboot | 23 | mkuboot > /dev/null |
20 | 24 | ||
21 | mkscript | 25 | mkscript |
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 | |||
3 | if [ $# -ne 1 ] ; then | ||
4 | error "Usage: `basename $0` <REMOTE-KDIR>" | ||
5 | fi | ||
6 | |||
7 | . $(dirname $0)/arm-installer-common.sh | ||
8 | |||
9 | LOAD_ADDR=0x81008000 | ||
10 | ENTRY_POINT=0x81008000 | ||
11 | |||
12 | USB_PART=/dev/sdb1 | ||
13 | TMP_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 | ||
16 | BOOT_IMAGE=vmlinux.uimg | ||
17 | |||
18 | KVERSION=$(getversion) | ||
19 | CONFIG_FILE="config-$KVERSION" | ||
20 | |||
21 | fetchfiles | ||
22 | |||
23 | mkuboot | ||
24 | |||
25 | moveconfig | ||
26 | |||
27 | echo "Mounting USB partition ..." >&2 | ||
28 | sudo mount $USB_PART $TMP_MOUNT | ||
29 | echo "done." >&2 | ||
30 | |||
31 | if [ ! -d "$TMP_MOUNT/boot" ]; then | ||
32 | sudo rm -f "$TMP_MOUNT/boot" | ||
33 | sudo mkdir "$TMP_MOUNT/boot" | ||
34 | fi | ||
35 | sudo cp $out_image "$TMP_MOUNT/boot/$BOOT_IMAGE" | ||
36 | |||
37 | echo "Unmounting USB partition ..." >&2 | ||
38 | sudo umount $TMP_MOUNT | ||
39 | echo "done." >&2 | ||
40 | |||
41 | rm_tmp_files | ||
42 | rm -rf $TMP_MOUNT | ||
43 | |||
44 | echo "All done!" >&2 | ||