-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
53 lines (40 loc) · 1.39 KB
/
install.sh
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
48
49
50
51
52
53
#!/bin/bash
# This script builds a lightning-boot image.
set -e
. $PROJECT_PATH/scripts/functions
# make sure all of the environment variables are good
check_vars
set_standard_opts $*
pushd $PROJECT_PATH/lightning-boot-2.0/
if [ "$CLEAN" == "1" ]; then
make clean
fi
# grab the kernel config
LINUX_CONFIG=include/linux/autoconf.h
if [ -e $KERNELDIR/$LINUX_CONFIG ]; then
cp $KERNELDIR/$LINUX_CONFIG ./include/
else
echo "Error: $KERNELDIR/$LINUX_CONFIG not found, you must configure and build the kernel before running this script."
exit 1
fi
# grab the machine types
MACH_TYPES=include/asm-arm/mach-types.h
if [ -e $KERNELDIR/$MACH_TYPES ]; then
cp $KERNELDIR/$MACH_TYPES ./include/
else
echo "Error: $KERNELDIR/$MACH_TYPES not found, you must configure and build the kernel for ARM before running this script."
exit 1
fi
LINUX_DRIVERS=$KERNELDIR/drivers/lf1000
cp $LINUX_DRIVERS/dpc/dpc_hal.h ./include/
cp $LINUX_DRIVERS/mlc/mlc_hal.h ./include/
cp $LINUX_DRIVERS/pwm/pwm_hal.h ./include/
UBOOT_SUPPORT=$UBOOTLOADERS KERNELDIR=$KERNELDIR CROSS_COMPILE=$CROSS_COMPILE make
# echo "" >> lightning-boot.bin
VERSION=`grep "CURRENT_MAJOR_VERSION=" ../packages/version/install.sh | cut -d = -f 2`
# BUILD=`svn info $PROJECT_PATH | grep Revision | awk '{print $2}'`
# BUILD=1337
# echo "VERSION:$VERSION.$BUILD" >> lightning-boot.bin
# echo "" >> lightning-boot.bin
cp lightning-boot.bin $TFTP_PATH/
popd