summaryrefslogtreecommitdiffstats
path: root/panda-install-kernel.sh
blob: 70fc900c6f77c1b69f4a4044084636892da180b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

if [ $# -ne 2 ] ; then
	error "Usage: `basename $0` <REMOTE-KDIR> <BOOT-SCRIPT>"
fi

. $(dirname $0)/arm-installer-common.sh

# This is machine specific, AFAIK.
LOAD_ADDR=0x80008000
ENTRY_POINT=0x80008000

TMP_MOUNT=$(mktemp -d)

# The FAT u-boot bootloader partition.
UBOOT_PART=/dev/mmcblk0p1

KVERSION=$(getversion)
CONFIG_FILE="config-$KVERSION"

fetchfiles

mkuboot > /dev/null

mkscript

moveconfig

doinitramfs

mkuinitrd

echo "Mounting u-boot partition ..." >&2
sudo mount $UBOOT_PART $TMP_MOUNT
echo "done." >&2

UBOOT_PATH=$TMP_MOUNT
copy_to_uboot

echo "Unmounting u-boot partition ..." >&2
sudo umount $TMP_MOUNT
echo "done." >&2

rm_tmp_files
rm -rf $TMP_MOUNT

echo "All done!" >&2