2009-03-18 13:02:53 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2011-01-09 18:46:16 +01:00
|
|
|
################################################################################
|
|
|
|
|
# This file is part of OpenELEC - http://www.openelec.tv
|
2012-02-29 13:11:22 +01:00
|
|
|
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
2011-01-09 18:46:16 +01:00
|
|
|
#
|
|
|
|
|
# This Program is free software; you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
# any later version.
|
|
|
|
|
#
|
|
|
|
|
# This Program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
2012-02-29 13:11:22 +01:00
|
|
|
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
2011-01-09 18:46:16 +01:00
|
|
|
# http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2010-07-21 18:54:45 +02:00
|
|
|
. config/options $1
|
2009-03-18 13:02:53 +01:00
|
|
|
|
2009-05-16 23:35:27 +02:00
|
|
|
LINUX=`ls -d $PKG_BUILD`
|
2009-03-18 13:02:53 +01:00
|
|
|
|
2009-04-03 23:14:18 +02:00
|
|
|
if [ -f $PROJECT_DIR/$PROJECT/$1/$1.$TARGET_ARCH.conf ]; then
|
|
|
|
|
KERNEL_CFG_FILE=$PROJECT_DIR/$PROJECT/$1/$1.$TARGET_ARCH.conf
|
|
|
|
|
else
|
2009-04-02 17:44:03 +02:00
|
|
|
KERNEL_CFG_FILE=$PKG_DIR/config/$1.$TARGET_ARCH.conf
|
2009-04-03 23:14:18 +02:00
|
|
|
fi
|
2009-03-18 13:02:53 +01:00
|
|
|
|
|
|
|
|
sed -i -e "s|^HOSTCC[[:space:]]*=.*$|HOSTCC = $HOST_CC|" \
|
|
|
|
|
-e "s|^HOSTCXX[[:space:]]*=.*$|HOSTCXX = $HOST_CXX|" \
|
|
|
|
|
-e "s|^ARCH[[:space:]]*?=.*$|ARCH = $TARGET_ARCH|" \
|
|
|
|
|
-e "s|^CROSS_COMPILE[[:space:]]*?=.*$|CROSS_COMPILE = $TARGET_PREFIX|" \
|
|
|
|
|
$LINUX/Makefile
|
|
|
|
|
|
|
|
|
|
cp $KERNEL_CFG_FILE $LINUX/.config
|
2011-05-18 01:16:47 +02:00
|
|
|
sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$ROOT/$BUILD/image/initramfs.cpio\"|" \
|
2009-03-18 13:02:53 +01:00
|
|
|
$LINUX/.config
|
|
|
|
|
|
2012-08-17 17:17:50 +02:00
|
|
|
# disable PPP support if not enabled
|
|
|
|
|
if [ ! "$PPTP_SUPPORT" = yes ]; then
|
|
|
|
|
sed -i -e "s|^CONFIG_PPP=.*$|# CONFIG_PPP is not set|" $LINUX/.config
|
|
|
|
|
fi
|
|
|
|
|
|
2012-05-19 02:28:16 +02:00
|
|
|
# disable swap support if not enabled
|
|
|
|
|
if [ ! "$SWAP_SUPPORT" = yes ]; then
|
|
|
|
|
sed -i -e "s|^CONFIG_SWAP=.*$|# CONFIG_SWAP is not set|" $LINUX/.config
|
|
|
|
|
fi
|
|
|
|
|
|
2010-04-20 03:15:29 +02:00
|
|
|
# copy some extra firmware to linux tree
|
|
|
|
|
cp -R $PKG_DIR/firmware/* $LINUX/firmware
|
|
|
|
|
|
2009-03-18 13:02:53 +01:00
|
|
|
make -C $LINUX oldconfig
|