2013-07-04 08:05:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2013 Frank Liepold / 1&1 Internet AG
|
|
|
|
#
|
|
|
|
# Copying and distribution of this file, with or without modification,
|
|
|
|
# are permitted in any medium without royalty provided the copyright
|
|
|
|
# notice and this notice are preserved. This file is offered as-is,
|
|
|
|
# without any warranty.
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
## defaults for module make_mars
|
|
|
|
##
|
|
|
|
## builds the mars kernel module
|
|
|
|
|
|
|
|
## enable_make_mars
|
|
|
|
|
|
|
|
## Set to 0 or 1. Enable / disable this module.
|
|
|
|
|
|
|
|
enable_make_mars=0
|
|
|
|
|
|
|
|
|
|
|
|
## make_mars_src_directory
|
|
|
|
##
|
|
|
|
## Directory containing mars modules sources.
|
|
|
|
|
2013-12-10 14:32:40 +00:00
|
|
|
make_mars_src_directory=/home/fl/mars/mars-git-hub
|
2013-07-04 08:05:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
## make_mars_kernel_src_directory
|
|
|
|
##
|
|
|
|
## Directory containing kernel sources, of the kernel used to build the
|
|
|
|
## mars module.
|
|
|
|
##
|
|
|
|
## To build the mars module, 2 modifications in the kernel source directory
|
|
|
|
## _mars_kernel_src_directory are
|
|
|
|
## necessary:
|
|
|
|
##
|
|
|
|
## 1. There must be a link (see make_mars_build_link below)
|
|
|
|
##
|
|
|
|
## <make_mars_kernel_src_directory>/block/mars -> <make_mars_src_directory>
|
|
|
|
##
|
|
|
|
## The link will be created if not existent.
|
|
|
|
##
|
|
|
|
## 2. The file <make_mars_kernel_src_directory>/block/Kconfig must contain the
|
|
|
|
## line
|
|
|
|
##
|
|
|
|
## source block/mars/kernel/Kconfig
|
|
|
|
##
|
|
|
|
## in the if BLOCK section. This line will be generated if not present.
|
|
|
|
## see make_mars_kconfig_file
|
|
|
|
|
2013-11-07 09:33:43 +00:00
|
|
|
make_mars_kernel_src_directory=/home/fl/mars/linux-infong-3.2
|
2013-07-04 08:05:39 +00:00
|
|
|
|
|
|
|
make_mars_build_link=block/mars
|
|
|
|
make_mars_kconfig_file=block/Kconfig
|
|
|
|
make_mars_block_makefile=block/Makefile
|
|
|
|
# contains the name of the kernel release
|
|
|
|
make_mars_kernel_release_file=include/config/kernel.release
|
|
|
|
make_mars_kconfig_replace_text="source block/mars/kernel/Kconfig"
|
|
|
|
# if current gcc installation does not support plugins
|
|
|
|
export DISABLE_PAX_PLUGINS=y
|
|
|
|
|
|
|
|
|
|
|
|
## make_mars_save_boot_configuration
|
|
|
|
##
|
|
|
|
## Function to save the current boot configuration, so that after "make
|
|
|
|
## install" in the kernel source directory (see
|
|
|
|
## make_mars_kernel_src_directory above) the old kernel will be used after
|
|
|
|
## a reboot. See also make_mars_restore_boot_configuration
|
|
|
|
## These function are os dependant. Normally "make install" calls
|
|
|
|
## /sbin/installkernel (if INSTALLKERNEL is not set).
|
|
|
|
|
|
|
|
make_mars_save_boot_configuration="make_mars_save_boot_configuration"
|
|
|
|
|
|
|
|
make_mars_restore_boot_configuration="make_mars_restore_boot_configuration"
|