pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


build_rovema_kernel.ksh
Posted by Anonymous on Tue 12th Dec 2023 16:02
raw | new post

  1. #!/bin/ksh93
  2.  
  3. #
  4. # build_rovema_kernel.ksh
  5. #
  6. # Writte by Roland Mainz <roland.mainz@nrubsig.org>
  7. #
  8.  
  9. #
  10. # build Linux kernel 6.6-RT15
  11. #
  12.  
  13. function build_kernel
  14. {
  15.         set -o errexit
  16.  
  17.         mkdir build_kernel
  18.         cd build_kernel/
  19.         git clone -b v6.6-rt15 git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
  20.         cd linux-rt-devel/
  21.         cp ../../myconfig_linux_v6_6_rt15.config .config
  22.  
  23.  
  24.         #
  25.         # fixme: add patches here
  26.         # - rt RCU patch
  27.         # - default boot args patch
  28.         # - i915 patches
  29.         # - rt udev dir
  30.         #
  31.  
  32.         time nice -n 19 ksh -c 'CC="gcc -m32" make -j12 bindeb-pkg 2>&1 | tee buildlog.log'
  33.  
  34.         return 0
  35. }
  36.  
  37.  
  38. #
  39. # build custom igb_avb module
  40. #
  41. function build_igbavb
  42. {
  43.         set -o errexit
  44.  
  45.         mkdir build_igbavb
  46.         cd build_igbavb/
  47.  
  48.         git clone https://github.com/Avnu/igb_avb.git
  49.  
  50.         cd igb_avb/
  51.  
  52.         # apply patches
  53.         git am <'../../0001-libigb-Use-PTHREAD_PRIO_INHERIT-for-mutex-to-avoid-r.patch'
  54.         git am <'../../0002-Disable-pci_-_pcie_error_reporting-for-Linux-kernels.patch'
  55.  
  56.         #
  57.         # build kernel module
  58.         #
  59.         cd kmod/
  60.         CC="gcc -m32" make -j4 -C "$PWD/../../../build_kernel/linux-rt-devel/" KSRC="$PWD/../../../build_kernel/linux-rt-devel/" M=$PWD
  61.         cd ..
  62.  
  63.         #
  64.         # build shared library vesion of libigb.a
  65.         #
  66.         cd lib
  67.         CC="gcc -m32" make all
  68.         gcc -m32 -shared -fPIC -o libigb.so -Wl,--whole-archive libigb.a -Wl,--no-whole-archive -lpthread
  69.  
  70.         return 0
  71. }
  72.  
  73. build_igbavb
  74.  
  75. # EOF.

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at