# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/comedi-driver/pkg_linux_post.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- make_comedi() { echo '------------------------------------------' echo "Entering make_comedi function from comedi-driver package" echo "TODO: remove hardcoding" echo '------------------------------------------' tar $taropt `match_source_file -p comedi comedi-driver` -C ../ pushd ../comedi-0.7.76 # This patch fixes the error which is already corrected in svn. # The line below should be removed after the version is out # patch ./comedi/Makefile.am < $base/package/*/comedi-driver/destdir_fix.patch # var_append confopt ' ' "--datadir=$root" # var_append confopt ' ' "--with-machine=$lx_cpu" # var_append confopt ' ' "--with-rpm-target=$lx_cpu" # var_append confopt ' ' "--with-kernel-release=$lx_kernelrelease" # var_append confopt ' ' "--with-linuxconfig=$kerneldir" # var_append confopt ' ' "--with-modulesdir=$moduledir" # var_append confopt ' ' "--with-modulesdeveldir=$root/lib/modules" var_append confopt ' ' "--with-linuxdir=$kerneldir" #* var_append confopt ' ' "--enable-kbuild" # due to removal of "dev_link_t" in recent kernels, pcmcia has to be disabled # (this comment is true for comedi-0.7.72) var_append confopt ' ' "--disable-pcmcia" # TODO: Both RTAI and RTLinux options should be automatically # selected/deselected upon using these packages! #specify path to RTAI installation or build directory var_append confopt ' ' "--with-rtaidir=$root/$prefix/realtime" var_append makeopt ' ' "CC=$KCC" # var_append makeopt ' ' "DESTDIR=$root/" # var_append makeinstopt ' ' "DEPMOD=true" # cross: # var_append confopt ' ' "--host=$arch_target" # var_append confopt ' ' "--build=$arch_build" # var_append confopt ' ' "--prefix=$root/$prefix" #* var_append confopt ' ' "--prefix=$root/$prefix" # eval autogen.sh eval_config_command $confopt eval $MAKE echo '------------------------------------------' echo "Installing comedi" echo '------------------------------------------' echo "MAKE=$MAKE" # eval $MAKE install DESTDIR=$root/ DEPMOD=/bin/true INSTALL_MOD_DIR=comedi INSTALL_MOD_PATH=$root$moduledir eval $MAKE install DESTDIR=$root/ # Need to copy some header files cp include/linux/comedi.h include/linux/comedilib.h $root/usr/include/linux/ # cp include/linux/comedi.h include/linux/comedilib.h /usr/local/include/ echo '------------------------------------------' echo "Installation of comedi finished" echo '------------------------------------------' # Had problems creating dev nodes. Will disable them for now. # The code is disabled for now # echo "Creating /dev/comedi devices..." # echo '------------------------------------------' # mknod -m 666 $root/dev/comedi0 c 98 0 # for n in `seq 0 3`; # do # f="$root/dev/comedi$n" # if [ ! -c $f ]; then # mknod -m 666 $f c 98 $n # fi # done popd } hook_add postmake 3 make_comedi #hook_add premake 3 make_comedi