forked from ev3dev/ev3dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_kernel
executable file
·52 lines (32 loc) · 1.13 KB
/
build_kernel
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
#! /bin/dash
#******************************************************************************************************************
# COMPILE KERNEL
#******************************************************************************************************************
# as normal user on linux pc terminal:
echo
echo -------------------------------------------------------------------------------
echo BUILDING KERNEL
echo -------------------------------------------------------------------------------
echo
sleep 1
project=`pwd`
echo ${project}
. ./env_setup
echo ${AM1808_COMPILER}
PATH=${AM1808_COMPILER}:$PATH
# PATH=${AM1808_UBOOT_DIR}/tools:$PATH
echo ${PATH}
cd ${AM1808_KERNEL}
echo "Now we're in $(pwd)"
arm-none-eabi-gcc -v
if [ "$1" = "clean" ]
then
make distclean ARCH=arm CROSS_COMPILE=${AM1808_ABI}
fi
cp ${project}/ev3dev.config ${AM1808_KERNEL}/.config
echo "CROSS COMPILING KERNEL"
make ARCH=arm CROSS_COMPILE=${AM1808_ABI}
echo "BUILDING BOOTABLE IMAGE"
make -j4 uImage ARCH=arm CROSS_COMPILE=${AM1808_ABI}
echo "COPYING BOOTABLE IMAGE TO LOCAL DIRECTORY"
cp ${AM1808_KERNEL}/arch/arm/boot/uImage ${project}/uImage