initiail import of Linux 4.1 kernel config
[ps3linux_kernel_configs.git] / build-kernel.sh
blobf0d25794d256e9c2640f99f99eb9e06475178178
1 #!/bin/sh
3 # Copyright (C) 2012, 2013 glevand <geoffrey.levand@mail.ru>
4 # All rights reserved.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published
8 # by the Free Software Foundation; version 2 of the License.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 if [ $# -lt 1 ]; then
21 echo "usage: $0 <version> [<local version>]" >&2
22 exit 1
25 VERSION=$1
26 LOCALVERSION=$2
27 INSTALL_DIR=linux-${VERSION}${LOCALVERSION}-build
29 #make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- menuconfig
31 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- clean
32 make -j4 ARCH=powerpc CROSS_COMPILE=powerpc64-linux- LOCALVERSION=$LOCALVERSION
34 rm -rf $HOME/$INSTALL_DIR*
35 mkdir -p $HOME/$INSTALL_DIR/boot
37 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- install INSTALL_PATH=$HOME/$INSTALL_DIR/boot LOCALVERSION=$LOCALVERSION
38 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- modules_install INSTALL_MOD_PATH=$HOME/$INSTALL_DIR LOCALVERSION=$LOCALVERSION
39 make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- headers_install INSTALL_HDR_PATH=$HOME/$INSTALL_DIR/usr LOCALVERSION=$LOCALVERSION
41 cd $HOME
42 tar cvJf $INSTALL_DIR.tar.xz $INSTALL_DIR