PACKAGE_NAME=media-build # Source the media_build DKMS version definition conf_dir=$(dirname ${BASH_SOURCE[0]}) . ${conf_dir}/dkms_ver.conf [ -n "$module" ] || module=${PACKAGE_NAME} [ -n "$module_version" ] || module_version=${PACKAGE_VERSION} # The base for the module local dkms_dir="$dkms_tree/$module/$module_version" # This is where DKMS stores all of it's data (after the MAKE[0] step!). local base_dir="$dkms_dir/$kernelver/$arch" # We need an existing path during the build step to create the install # directory, because media build will also install all the modules. The # install directory will be cleaned just after the POST_BUILD step, so # this directory is existing very short on the file system. local media_inst_dir="$dkms_dir/build/_media_inst" # The dynamically generated DKMS configuration file name. This gets sourced by # the top DKMS configuration file (this file), if it exists (see end of this # script). It defines all the built modules depending on the kernel version or # configuration options of medial_build. # # This dynamically generated DKMS configuration file is generated by a post # build command script (gen_dkms_dyn_conf.sh). # # It is important, that it exists when the DKMS install command is executed. local dkms_dyn_conf="$base_dir/dkms_dyn.conf" # The module directory, where DKMS stores the built modules after the build. local dkms_mod_dir="$base_dir/module" AUTOINSTALL=y # The DKMS system will add KERNELRELEASE to the make command line MAKE[0]="make MEDIA_INST_DIR=$media_inst_dir -f Makefile.dkms build" CLEAN="make MEDIA_INST_DIR=$media_inst_dir -f Makefile.dkms clean" POST_BUILD="gen_dkms_dyn_conf.sh $dkms_mod_dir $media_inst_dir $dkms_dyn_conf" #POST_INSTALL="handle_updated_modules.sh $base_dir $kernelver $arch install" CHECK_MODULE_VERSION=n # There have to be at least one module defined in the top DKMS configuration # file, otherwise DKMS throws an error. # Note: This definition gets overridden later by the dynamically generated # DKMS configuration file. # BUILT_MODULE_NAME[0]=dvb-core # # We use here the real build location, because the file needs to exist to # finish the build step. BUILT_MODULE_LOCATION[0]=./v4l # # It is important to use the real module path here, so that the uninstall # command works correctly DEST_MODULE_LOCATION[0]=/kernel/drivers/media/dvb-core # Source the dynamically generated DKMS configuration file. if [ -e $dkms_dyn_conf ]; then . $dkms_dyn_conf fi