ASoC: samsung: Prevent clk_get_rate() calls in atomic context
[platform/kernel/linux-exynos.git] / build-kernel-exynos5433.sh
1 #!/bin/bash
2
3 # Check this system has ccache
4 check_ccache()
5 {
6         type ccache
7         if [ "$?" -eq "0" ]; then
8                 CCACHE=ccache
9         fi
10 }
11
12 check_ccache
13
14 rm -f output/linux-*-exynos5433-arm64*.tar
15 rm -f arch/arm64/boot/Image
16 rm -f arch/arm64/boot/dts/exynos/*.dtb
17 if ! [ -d output ] ; then
18         mkdir output
19 fi
20
21 if ! [ -e .config ] ; then
22         make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- tizen_tm2_defconfig
23 fi
24
25 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8
26 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs
27 if [ ! -f "./arch/arm64/boot/Image" ]; then
28         echo "Build fail"
29         exit 1
30 fi
31
32 HOST_ARCH=`uname -m`
33 if [ "$HOST_ARCH" == "x86_64" ]; then
34         cp tools/mkimage.x86_64 tools/mkimage
35 elif [ "$HOST_ARCH" == "i586" ] || [ "$HOST_ARCH" == "i686" ]; then
36         cp tools/mkimage.i686 tools/mkimage
37 else
38         echo "Unknow HOST architecture, u-boot-tools, mkimage is required!"
39 fi
40
41 # create fit style image from its
42 PATH=scripts/dtc:$PATH tools/mkimage -f arch/arm64/boot/tizen-tm2.its output/kernel.img
43
44 # Check kernel version from Makefile
45 _major_version=`cat Makefile | grep "^VERSION = " | awk '{print $3}'`
46 _minor_version=`cat Makefile | grep "^PATCHLEVEL = " | awk '{print $3}'`
47 _extra_version=`cat Makefile | grep "^EXTRAVERSION = " | awk '{print $3}'`
48 _version=${_major_version}.${_minor_version}${_extra_version}
49
50 cd output
51 tar cf linux-${_version}-exynos5433-arm64-fit.tar kernel.img