summaryrefslogtreecommitdiffstats
path: root/tegra-install-kernel.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tegra-install-kernel.sh')
-rwxr-xr-xtegra-install-kernel.sh44
1 files changed, 44 insertions, 0 deletions
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