diff options
Diffstat (limited to 'tegra-install-kernel.sh')
| -rwxr-xr-x | tegra-install-kernel.sh | 44 |
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 | |||
| 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 | ||
