elektronomikon.org

Example installation of linux_gpib

	  Search for the current raspbian sd-card image (raspbian lite is fine) - in this example "2019-09-26-raspbian-buster-lite.zip".
	  >unzip 2019-09-26-raspbian-buster-lite.zip
	  Insert a sd-card (larger than 16GB recommended) and burn the .img file created in the last step onto the card using Balena etcher or similiar.
	  After the image is successfully transferred, insert the card into your raspberry pi (2..4) and boot.
	  On your raspberry pi change to user root and download the current linux-gpib package from https://sourceforge.net/projects/linux-gpib/files/
	  For example with wget:
	  > sudo su -
	  > wget https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/4.3.0/linux-gpib-4.3.0.tar.gz
	  unzip the package:
	  > tar xzf linux-gpib-4.3.0.tar.gz
	  change into created directory and extract both kernel and user parts
	  > cd linux-gpib-4.3.0
	  > tar xzf linux-gpib-kernel-4.3.0.tar.gz
	  > tar xzf linux-gpib-user-4.3.0.tar.gz
	  configure, compile and install the linux-gpib userland
	  > cd linux-gpib-user-4.3.0
	  > ./configure
	  > make
	  > make install
	  change to parent directory and download the raspi patch
	  > cd ..
	  > wget https://raw.githubusercontent.com/elektronomikon/raspi_gpib_driver/master/linux-gpib-kernel-4.2.0_raspi_gpib.patch
	  as the patch was for linux-gpib-4.2.0, replace each occurance of 4.2.0 with 4.3.0 and apply the patch
	  (change patch here, with nano for example)
	  > 'patch -p0 < linux-gpib-kernel-4.2.0_raspi_gpib.patch'
	  install the header files for your linux kernel
	  > apt install raspberrypi-kernel-headers
	  change to linux-gpib-kernel directory, build and install
	  > cd linux-gpib-kernel-4.3.0
	  > make
	  > make install
	  update the kernels list of modules and load raspi_gpib
	  > depmod -a
	  > modprobe raspi_gpib
	  change the default configuration file to use board_type = "raspi_gpib"
	  > nano /usr/local/etc/gpib.conf
	  set up the linux-gpib devices
	  > gpib_config
	  linux-gpib is now set-up and ready to use, example:
	  > ibterm -d9 -s96