mm: include CMA pages in lowmem_reserve at boot
[platform/kernel/linux-rpi.git] / build-rpi4.sh
1 #!/bin/bash
2
3 NCPUS=`cat /proc/cpuinfo | grep processor | wc -l`
4
5 if [ $# != 1 ]; then
6         echo "Usage : $0 <architecture>"
7         echo "  architecture : arm or arm64"
8         echo "  e.g) $0 arm"
9         exit
10 fi
11
12 # Check this system has ccache
13 check_ccache()
14 {
15         type ccache
16         if [ "$?" -eq "0" ]; then
17                 CCACHE=ccache
18         fi
19 }
20
21 check_ccache
22
23 if [ $1 = "arm" ]; then
24         echo "ARM"
25
26         rm -f arch/arm/boot/zImage
27         rm -f arch/arm/boot/dts/*.dtb
28
29         if ! [ -e .config ] ; then
30                 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- tizen_bcm2711_defconfig
31         fi
32
33         make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j $NCPUS
34
35         if [ ! -f "./arch/arm/boot/zImage" ]; then
36                 echo "Build fail"
37                 exit 1
38         fi
39 elif [ $1 = "arm64" ]; then
40         echo "ARM64"
41
42         rm -f arch/arm64/boot/Image
43         rm -f arch/arm64/boot/dts/broadcom/*.dtb
44
45         if ! [ -e .config ] ; then
46                 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- tizen_bcm2711_defconfig
47         fi
48         make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8
49         if [ ! -f "./arch/arm64/boot/Image" ]; then
50                 echo "Build fail"
51                 exit 1
52         fi
53 fi
54
55 scripts/mkbootimg_rpi4.sh